Coder Social home page Coder Social logo

Comments (16)

jzaefferer avatar jzaefferer commented on May 30, 2024

Can you provide some more information? What's the full output? What version of the plugin are you using? Do you get the same error when running vnu.jar directly? If that's the case, you should report the issue over there.

from grunt-html.

lagrz avatar lagrz commented on May 30, 2024

"grunt-html": "~1.2.0"

Here is the full output

From the looks of it, the vnu.jar file is the one throwing the errors. Thanks for directing to the right place

from grunt-html.

LaurentGoderre avatar LaurentGoderre commented on May 30, 2024

Are absolutely certain you have Java 7? This looks like the error you get when running it with Java 6

from grunt-html.

lagrz avatar lagrz commented on May 30, 2024

I have java 7 update 51

from grunt-html.

sideshowbarker avatar sideshowbarker commented on May 30, 2024

I think java might need to be called with -Xss512k.
It's also probably good to call it with -XX:ThreadStackSize=2048.

from grunt-html.

jzaefferer avatar jzaefferer commented on May 30, 2024

@lagrz can you test with those extra arguments on your local copy? need to add them here: https://github.com/jzaefferer/grunt-html/blob/d96f01c9b8d95ec7c89c8e1e4cf12ee0a25b5972/lib/htmllint.js#L14

from grunt-html.

lagrz avatar lagrz commented on May 30, 2024

Success! Works with added flags.

from grunt-html.

LaurentGoderre avatar LaurentGoderre commented on May 30, 2024

Interesting!!

from grunt-html.

LaurentGoderre avatar LaurentGoderre commented on May 30, 2024

Should we add those flags or leave it to developers of affected machines to configure their Java with environment variables?

from grunt-html.

LaurentGoderre avatar LaurentGoderre commented on May 30, 2024

I believe this is only an issue for 32 bit OSes. @lagrz are you on a 32 bit OS?

from grunt-html.

LaurentGoderre avatar LaurentGoderre commented on May 30, 2024

You can also fix it by adding to your JAVA_OPTS environment variable

from grunt-html.

lagrz avatar lagrz commented on May 30, 2024

Yes im on a 32 bit OS

from grunt-html.

sideshowbarker avatar sideshowbarker commented on May 30, 2024

The part of the validator code that reads and evaluates the HTML5 schema seems to need a minimum stack size of 512k. On 64-bit systems, I think java uses a default stack size of 1024k, so on those systems it doesn't need to be adjusted for the validator. But I think the java default stack size on, e.g., 32-bit Windows, is only 320k, so it will definitely be a problem there.

FWIW, I think it'd be sane for grunt-html to just invoke java with -Xss512k. As far as I can tell, the validator will still run fine on 64-bit systems with that setting, and I think the may have the added advantage of using less memory—because it doesn't actually need 1024k for each thread. (Actually I think whatever thread handles the schema evaluation is the only one that even needs 512k; whatever other threads are getting run probably don't even need nearly that much.)

from grunt-html.

LaurentGoderre avatar LaurentGoderre commented on May 30, 2024

@sideshowbarker looks like it might need 1024k, now the error that was happening now is happening on 64 bits. Setting the stack size to 1024 fixes it.

from grunt-html.

EricDunsworth avatar EricDunsworth commented on May 30, 2024

@LaurentGoderre FYI, earlier today and tonight I ran npm install and grunt on fully up-to-date local clones of wet-boew/wet-boew master on my workstation (Windows 7 64-bit + Java 6 32-bit) and my home computer (Windows 7 64-bit + Java 7 64-bit). Didn't run into any issues with grunt-html's 512k parameter from pull #25.

Anyways, I'm not against 1024k so long as it doesn't re-introduce any problems in XP 32-bit :P.

from grunt-html.

malah-code avatar malah-code commented on May 30, 2024

Was an issue to my code, but fixed by re-install JAVA
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

from grunt-html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.