Can't increase stack size.

Oxygen is overflowing the stack trying to validate one of my XML files against its schema. However, if I modify this file: C:\Program Files\Oxygen XML Editor 9\oxygen.vmoptions from this: -Xmx700m to this: -Xmx700m -Xss1024k Oxygen fails to start. I select it from the Start Menu and get this message: Error The JVM could not be started. The main method may have thrown an exception. If I delete the Xss option again it works. I've tried values of 512k, 512 and 1024k. This is on XP SP2 with Oxygen build 2007121417 Should the options be on multiple lines? Any help on how I can increase the stack size? FWIW, the failure seems to be on this attribute: <xs:attribute name="values"> <xs:simpleType><xs:restriction base="xs:string"> <xs:pattern value="(-?(\d+|\d*\.\d+)(,-?(\d+|\d*\.\d+))?;)*-?(\d+|\d*\.\d+)(,-?(\d+|\d*\.\d+))?"></xs:pattern> </xs:restriction></xs:simpleType> </xs:attribute> with this value: values="0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109" Is there any way to turn off backtracking for the regexp, which presumably would help here?

Hello, For a new option set in the file oxygen.vmoptions you must add a new line. This is specified in the User Manual. There is no way to modify the algorithm for the regexp. It is an internal algorithm of the XML parser. For your pattern 800 KB is enough for the stack size, that is -Xss800k. Regards, Sorin Gavin Kistner wrote:
Oxygen is overflowing the stack trying to validate one of my XML files against its schema. However, if I modify this file: C:\Program Files\Oxygen XML Editor 9\oxygen.vmoptions from this: -Xmx700m to this: -Xmx700m -Xss1024k Oxygen fails to start. I select it from the Start Menu and get this message: Error The JVM could not be started. The main method may have thrown an exception.
If I delete the Xss option again it works. I've tried values of 512k, 512 and 1024k.
This is on XP SP2 with Oxygen build 2007121417
Should the options be on multiple lines? Any help on how I can increase the stack size?
FWIW, the failure seems to be on this attribute: <xs:attribute name="values"> <xs:simpleType><xs:restriction base="xs:string"> <xs:pattern value="(-?(\d+|\d*\.\d+)(,-?(\d+|\d*\.\d+))?;)*-?(\d+|\d*\.\d+)(,-?(\d+|\d*\.\d+))?"></xs:pattern> </xs:restriction></xs:simpleType> </xs:attribute>
with this value:
values="0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0 .416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109;0.114,0.114;0.129,0.129;0.154,0.154;0.187,0.187;0.226,0.226;0.271,0.271;0.319,0.319;0.368,0.368;0.416,0.416;0.461,0.461;0.500,0.500;0.533,0.533;0.558,0.558;0.573,0.573;0.578,0.578;0.573,0.573;0.558,0.558;0.533,0.533;0.500,0.500;0.461,0.461;0.416,0.416;0.368,0.368;0.319,0.319;0.271,0.271;0.226,0.226;0.187,0.187;0.154,0.154;0.129,0.129;0.114,0.114;0.109,0.109"
Is there any way to turn off backtracking for the regexp, which presumably would help here?

On 14/03/2008, Gavin Kistner <phrogz@mac.com> wrote:
Oxygen is overflowing the stack trying to validate one of my XML files against its schema. However, if I modify this file: C:\Program Files\Oxygen XML Editor 9\oxygen.vmoptions from this: -Xmx700m to this: -Xmx700m -Xss1024k Oxygen fails to start. I select it from the Start Menu and get this message: Error The JVM could not be started. The main method may have thrown an exception.
If I delete the Xss option again it works. I've tried values of 512k, 512 and 1024k.
It fails because the minimum heap size switch is "Xms" not xss... (and I think the default is 1m anyway) Also, setting that switch wouldn't make any difference because that is the amount of memory the JVM grabs at startup - it will continue to use more memory until it hits the value specified by the Xmx switch. I'm afraid I can't help with the main problem of stack overflow, other than to try using Java 1.6 and/or Saxon as the schema processor (assuming your regex was good) -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/

Hello, The stack size parameter (-Xss) makes a difference. The thread stack is not allocated in the heap memory area of the JVM process (-Xmx) so it has no connection with the -Xmx parameter. The default stack size was increased in more recent JVMs. I think it is 1 MB only for the JVMs on 64 bits but it is 512 KB for the JVMs on 32 bits which is less than the minimum required stack size for Gavin's regexp pattern. Anyway I tested the regexp pattern and with -Xss800k and I no longer get StackOverflowError. Regards, Sorin Andrew Welch wrote:
It fails because the minimum heap size switch is "Xms" not xss... (and I think the default is 1m anyway)
Also, setting that switch wouldn't make any difference because that is the amount of memory the JVM grabs at startup - it will continue to use more memory until it hits the value specified by the Xmx switch.
participants (3)
-
Andrew Welch
-
Gavin Kistner
-
Sorin Ristache