Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (290)
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 3532 times)
0 Members and 1 Guest are viewing this topic.
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Posted 2010-11-25 14: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 ]
Online Riven
« League of Dukes »

JGO Overlord


Medals: 437
Projects: 4


Hand over your head.


« Reply #1 - Posted 2010-11-25 15: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Reply #2 - Posted 2010-11-26 00: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!
Try the Free Demo of Titan Attacks
Online Riven
« League of Dukes »

JGO Overlord


Medals: 437
Projects: 4


Hand over your head.


« Reply #3 - Posted 2010-11-26 00: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Reply #4 - Posted 2010-11-26 19: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 ]
Online Riven
« League of Dukes »

JGO Overlord


Medals: 437
Projects: 4


Hand over your head.


« Reply #5 - Posted 2010-11-26 19: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Reply #6 - Posted 2010-11-26 20: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 ]
Online Riven
« League of Dukes »

JGO Overlord


Medals: 437
Projects: 4


Hand over your head.


« Reply #7 - Posted 2010-11-26 21: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (63 views)
2013-05-17 21:29:12

alaslipknot (72 views)
2013-05-16 21:24:48

gouessej (103 views)
2013-05-16 00:53:38

gouessej (100 views)
2013-05-16 00:17:58

theagentd (110 views)
2013-05-15 15:01:13

theagentd (100 views)
2013-05-15 15:00:54

StreetDoggy (145 views)
2013-05-14 15:56:26

kutucuk (168 views)
2013-05-12 17:10:36

kutucuk (167 views)
2013-05-12 15:36:09

UnluckyDevil (176 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.088 seconds with 20 queries.