Closed DanielOaks closed 8 years ago
That must be quite the webpage! Perhaps trim it down a bit, too? ;)
@DanielOaks Thanks for bringing this up. I had not seen this problem. I like the idea of making it a command line option.
I can imagine something like a -b
option (big) that doubles the memory size each time it's added, maybe something like: html5validator -bb
doubling it from 512 to 1024, then from 1024 to 2048? Similar to how multiple levels of verbosity/debugging flags work in some programs.
Otherwise just a simple way of specifying the size manually, --size 2048k
or something simple like that?
@Supuhstar Unfortunately, pages describing technical data can get pretty big :)
I like the -b
, -bb
, -bbb
approach. Nobody knows in any case which file size corresponds to which stack size. Makes this feature more accessible.
How I can workaround this? How to specify the stack size?
P.S. Answering to myself:
--- /usr/lib/python2.7/site-packages/html5validator/validator.py.orig 2016-01-13 18:06:41.974810572 +0100
+++ /usr/lib/python2.7/site-packages/html5validator/validator.py 2016-01-13 18:06:57.563825066 +0100
@@ -68,7 +68,7 @@
raise JavaNotFoundException()
try:
- o = subprocess.check_output(['java', '-Xss512k', '-jar',
+ o = subprocess.check_output(['java', '-jar',
self.vnu_jar_location] + opts + files,
stderr=subprocess.STDOUT,
).decode('utf-8')
@php-coder Interesting. Is this on Windows?
I was under the impression that specifying '-Xss512k' would always increase the stack size (from 128k or 320k). For you however it seems to increase when you remove it. I am not sure, but I found some reference online that on Windows the default is actually 1024k.
@svenkreiss No, it's on Fedora 22 with OpenJDK 1.8.0_60
It also fail in TravisCI with the same error :-( Probably, it's because I still use old build type...
Working on this. The 0.2
branch contains a fix for this. It contains the new command line options -l
, -ll
and -lll
which increase the stack size. It also contains an update of the underlying Java checker. Unfortunately, that now requires Java 8. I updated the readme in the 0.2 branch with instructions.
Any volunteers to test this branch? Unit tests are passing.
I think you can install this branch directly with pip install https://github.com/svenkreiss/html5validator/zipball/0.2
.
I'll try it when I will have a time..
Thank you all!
Version 0.2.1 is now released and should address this. If it does not work out of the box for you, try the new command line options -l
, -ll
and -lll
. Please reopen this issue if you see any problems.
When I'm trying new version it works without any options. I don't know why...
Thank you!
The default in the new version is not to have an -Xss
option when calling Java. Like in your diff a few days ago ;)
Thanks!
I've been running into an issue occasionally while running it, getting this error:
One of the systems I've been getting this bug on is a bad little notebook with not-that-much RAM, but the other is a MBP with 16GB of RAM. Figured I'd ask and see if you've seen this before :)
Thanks for the awesome and useful tool!
edit: Hmm, upping the call to use
-Xss2048k
as recommended did work. Maybe it'd be nice to allow for these sort of higher limits as a command-line option or something?