Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  "An unrecoverable stack overflow has occurred."  (Read 4850 times)
0 Members and 1 Guest are viewing this topic.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Posted 2010-11-25 13:53:49 »

Has anyone seen this before? I've got a lwjgl app occasionally dies with this error (note this is *not* a StackOverflowException, it seems to be some kind of low-level error which kills the vm).

The setup is that I've got a Minecraft map renderer, and a minecraft server wrapper. Most of the time this work, but on one machine the map renderer triggers this error. And it *only* happens when run as a child process of the server wrapper - running it standalone works just fine. The whole setup works just fine on my mac laptop as well, it just seems to be this particular machine.

It occurs both on the 1.6.18 VM and the latest 1.6.22 VM.

Has anyone got any hints as to what this might be, and what to do to debug it?

Thanks

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 845
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2010-11-25 14:38:10 »

Try to create your thread with a larger stacksize:
     new Thread(..., ..., ..., 4*1024*1024)
or
     -XX:ThreadStackSize=4M
to see if that makes a difference.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #2 - Posted 2010-11-25 23:04:32 »

Hmm, I didn't know about that XX option, I'll give it a go, thanks.

I'm still none the wiser as to why it would fail when launched via ProcessBuilder vs. from a command line though. I'm going to try and add a bunch of logging to try and track it down to a particular function.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 845
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2010-11-25 23:34:11 »

Actually, the parameters seems to be in K

So you'd have to pass:
  -XX:ThreadStackSize=4096
for 4M stack (1M is the default)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #4 - Posted 2010-11-26 18:57:23 »

This gets odder. Trying to increase the stack size with that command doesn't help, it still bombs out the same way (without even one of those raw access violation hs_err_pidXXX.log files).

If I remove the other options to manually increase the heap and direct buffer memory, then it seems to work. Of course now my app dies with an out-of-direct-memory exception because I'm loading so much geometry.

Obviously I'm going to have to do something smarter with my geometry caching. Does anyone know a way to query available/allocated/total direct memory at runtime? I'm assuming the Runtime memory queries are for the regular heap only.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 845
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2010-11-26 18:59:24 »

Quote
I'm assuming the Runtime memory queries are for the regular heap only.
Correct.

Quote
Does anyone know a way to query available/allocated/total direct memory at runtime? I'm assuming the Runtime memory queries are for the regular heap only.
IIRC those values are stored in sun.misc.Bits

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2010-11-26 19:15:10 »

I found sun.misc.VM.maxDirectMemory(), which returns a surprising 2Gb (!), but that's on this 64bit Win7 machine, which is not the one with the issue (which is running 32bit XP).

I may try the old-school approach of just allocating as much direct memory as possible up front until an exception is thrown, then doing my own memory management.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 845
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2010-11-26 20:34:49 »

Set a reasonable max though. Nothing worse than to starve other processes from address space.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (37 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!