Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  
  Mative crashes !! driving me nuts !  (Read 1986 times)
0 Members and 1 Guest are viewing this topic.
Offline NewbTon

Junior Devvie




Odejava games rock!


« Posted 2005-03-12 23:12:23 »

Is it true that whenever the scene reaches like 40 objects, with joints joint motors etc, it crashes (on windows) ?

I'm like hmmm.. kind of disapoints me and also makes me wonder if my project is possible at all using ODE.

Are there any good tips that could prevent this ? I know that alot of things in the scene would never touch, (though they are connected with joints ) so  I would like to tell ODE somehow what it should NOT check for to save memory/cpu.


Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2005-03-12 23:50:39 »

Native crashes are a real pain, I agree.

Please give as much info as possible.  Make sure you are using the debug version, and if there are any messages -- try to correct them.  Include the stack dump also.  A more detailed idea of exactly what you are doing would also help.  Have you tried the program on any other Operating Systems?  What OS are you using?

Will.

Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #2 - Posted 2005-03-13 00:16:07 »

Quote
Native crashes are a real pain, I agree.

Please give as much info as possible.  Make sure you are using the debug version, and if there are any messages -- try to correct them.  Include the stack dump also.  A more detailed idea of exactly what you are doing would also help.  Have you tried the program on any other Operating Systems?  What OS are you using?

Will.


Thanks for your quick response.

I'm using Windows (Odejava/java3d).
OK I'm trying to set up a ragdoll with 25 bones.
Bones (bodies) are connected with joints using jointballs. And a jointmotor  
to control the joint around 3 axes using eular mode.
It's working fine with less bones, I'm able to move him to different poses using the jointmotor. So in theory it works fine.  The crash seems to happens when he falll to the floor and every bone touches the floor (a geomplane)


At first I though it was the motors doing it,  but when I remove them it's the same (lasts a little longer before the crash though).


This is the errorlog

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_STACK_OVERFLOW (0xc00000fd) occurred at PC=0x48F4004
Function=[Unknown.]
Library=E:\jdks\j2sdk1.4.2_03\jre\bin\odejava.dll

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
     at org.odejava.ode.OdeJNI.dWorldStep(Native Method)
     at org.odejava.ode.Ode.dWorldStep(Ode.java:558)
     at org.odejava.World.step(World.java:201)
     at net.mikkelp.ode.odeeditor.OdeWindow.actionPerformed(OdeWindow.java:151)
     at j3d.animation.ActionBehavior.processStimulus(ActionBehavior.java:44)
     at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
     - locked <0x105eb100> (a javax.media.j3d.BehaviorRetained)
     - locked <0x105eb100> (a javax.media.j3d.BehaviorRetained)
     at javax.media.j3d.J3dThread.run(J3dThread.java:250)

Dynamic libraries:
0x00400000 - 0x00407000       E:\jdks\j2sdk1.4.2_03\bin\javaw.exe
0x7C900000 - 0x7C9B2000       C:\WINDOWS\system32\ntdll.dll
0x7C800000 - 0x7C8F8000       C:\WINDOWS\system32\kernel32.dll
0x77DC0000 - 0x77E6B000       C:\WINDOWS\system32\ADVAPI32.dll
0x77E70000 - 0x77F01000       C:\WINDOWS\system32\RPCRT4.dll
0x77D30000 - 0x77DC0000       C:\WINDOWS\system32\USER32.dll
0x77F10000 - 0x77F56000       C:\WINDOWS\system32\GDI32.dll
0x77C00000 - 0x77C58000       C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000       E:\jdks\j2sdk1.4.2_03\jre\bin\client\jvm.dll
0x76B30000 - 0x76B5E000       C:\WINDOWS\system32\WINMM.dll
0x10000000 - 0x10007000       E:\jdks\j2sdk1.4.2_03\jre\bin\hpi.dll
0x003E0000 - 0x003EE000       E:\jdks\j2sdk1.4.2_03\jre\bin\verify.dll
0x008A0000 - 0x008B9000       E:\jdks\j2sdk1.4.2_03\jre\bin\java.dll
0x003F0000 - 0x003FD000       E:\jdks\j2sdk1.4.2_03\jre\bin\zip.dll
0x02EA0000 - 0x02FAF000       E:\jdks\j2sdk1.4.2_03\jre\bin\awt.dll
0x72FB0000 - 0x72FD6000       C:\WINDOWS\system32\WINSPOOL.DRV
0x76370000 - 0x7638D000       C:\WINDOWS\system32\IMM32.dll
0x774D0000 - 0x7760D000       C:\WINDOWS\system32\ole32.dll
0x5B250000 - 0x5B288000       C:\WINDOWS\system32\uxtheme.dll
0x03010000 - 0x03060000       E:\jdks\j2sdk1.4.2_03\jre\bin\fontmanager.dll
0x73710000 - 0x73759000       C:\WINDOWS\system32\ddraw.dll
0x73B70000 - 0x73B76000       C:\WINDOWS\system32\DCIMAN32.dll
0x738F0000 - 0x739C0000       C:\WINDOWS\system32\D3DIM700.DLL
0x746E0000 - 0x7472B000       C:\WINDOWS\system32\MSCTF.dll
0x032A0000 - 0x032AC000       C:\WINDOWS\system32\msvcrta.dll
0x77110000 - 0x7719C000       C:\WINDOWS\system32\OLEAUT32.dll
0x71A80000 - 0x71A97000       C:\WINDOWS\system32\WS2_32.dll
0x71A70000 - 0x71A78000       C:\WINDOWS\system32\WS2HELP.dll
0x032B0000 - 0x036AF000       C:\WINDOWS\resources\Themes\luna\luna.msstyles
0x03BF0000 - 0x03C47000       E:\jdks\j2sdk1.4.2_03\jre\bin\J3D.dll
0x6DF20000 - 0x6E048000       C:\WINDOWS\system32\d3d8.dll
0x6DF10000 - 0x6DF16000       C:\WINDOWS\system32\d3d8thk.dll
0x77BF0000 - 0x77BF8000       C:\WINDOWS\system32\VERSION.dll
0x5D5A0000 - 0x5D637000       C:\WINDOWS\system32\COMCTL32.dll
0x03D70000 - 0x03D75000       E:\jdks\j2sdk1.4.2_03\jre\bin\jawt.dll
0x69500000 - 0x698C1000       C:\WINDOWS\system32\nvoglnt.dll
0x048A0000 - 0x04910000       E:\jdks\j2sdk1.4.2_03\jre\bin\odejava.dll
0x7C9C0000 - 0x7D1D7000       C:\WINDOWS\system32\shell32.dll
0x77F60000 - 0x77FD6000       C:\WINDOWS\system32\SHLWAPI.dll
0x773C0000 - 0x774C2000       C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
0x60930000 - 0x60984000       C:\WINDOWS\system32\netapi32.dll
0x71AF0000 - 0x71B02000       C:\WINDOWS\system32\MPR.dll
0x75F40000 - 0x75F47000       C:\WINDOWS\System32\drprov.dll
0x71BE0000 - 0x71BEE000       C:\WINDOWS\System32\ntlanman.dll
0x71CA0000 - 0x71CB7000       C:\WINDOWS\System32\NETUI0.dll
0x71C60000 - 0x71CA0000       C:\WINDOWS\System32\NETUI1.dll
0x71C50000 - 0x71C57000       C:\WINDOWS\System32\NETRAP.dll
0x71BC0000 - 0x71BD3000       C:\WINDOWS\System32\SAMLIB.dll
0x75F50000 - 0x75F59000       C:\WINDOWS\System32\davclnt.dll
0x77910000 - 0x77A05000       C:\WINDOWS\system32\SETUPAPI.dll
0x77B30000 - 0x77B52000       C:\WINDOWS\system32\appHelp.dll
0x76FC0000 - 0x7703F000       C:\WINDOWS\system32\CLBCATQ.DLL
0x77040000 - 0x77108000       C:\WINDOWS\system32\COMRes.dll
0x76970000 - 0x76978000       C:\WINDOWS\system32\LINKINFO.dll
0x76980000 - 0x769A5000       C:\WINDOWS\system32\ntshrui.dll
0x76B10000 - 0x76B21000       C:\WINDOWS\system32\ATL.DLL
0x769B0000 - 0x76A64000       C:\WINDOWS\system32\USERENV.dll
0x76C80000 - 0x76CA8000       C:\WINDOWS\system32\imagehlp.dll
0x59F30000 - 0x59FD1000       C:\WINDOWS\system32\DBGHELP.dll
0x76BE0000 - 0x76BEB000       C:\WINDOWS\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation   total 576K, used 265K [0x10010000, 0x100b0000, 0x104f0000)
 eden space 512K,  51% used [0x10010000, 0x10052310, 0x10090000)
 from space 64K,   0% used [0x100a0000, 0x100a0228, 0x100b0000)
 to   space 64K,   0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation   total 3156K, used 2658K [0x104f0000, 0x10805000, 0x14010000)
  the space 3156K,  84% used [0x104f0000, 0x10788930, 0x10788a00, 0x10805000)
compacting perm gen  total 9984K, used 9941K [0x14010000, 0x149d0000, 0x18010000)
  the space 9984K,  99% used [0x14010000, 0x149c5470, 0x149c5600, 0x149d0000)

Local Time = Sun Mar 13 04:04:53 2005
Elapsed Time = 28
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#


Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #3 - Posted 2005-03-13 00:18:26 »

Ps I use Hashspace, step(), stepsize 0.01
Collision.collide(space)
No I didnt test it on other OS than win XP
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #4 - Posted 2005-03-13 00:30:49 »

*ding* EXCEPTION_STACK_OVERFLOW

I woundered if it could be that.  Stack overflows happen when too many things collide at once, just like what you are saying happened.

There are two options I think:
a) increase the stack size when compiling the .dll
b) don't let all those objects collide at once

I don't know exactly how to do a), but I think it's possible.  I plan on rebuilding the native libraries soon.  Perhaps you could have a look around in the ODE mailing archives and find out how to do this?

Will.


Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #5 - Posted 2005-03-13 00:40:46 »

Quote
*ding* EXCEPTION_STACK_OVERFLOW

I woundered if it could be that.  Stack overflows happen when too many things collide at once, just like what you are saying happened.

There are two options I think:
a) increase the stack size when compiling the .dll
b) don't let all those objects collide at once

I don't know exactly how to do a), but I think it's possible.  I plan on rebuilding the native libraries soon.  Perhaps you could have a look around in the ODE mailing archives and find out how to do this?

Will.



Yes that sounds nice. But I cant prevent things from colliding.  in the collision iteration loop I call ignorecontact () when anything else than the geomplane and the bones (bodies) collides. Theres no need to check whether the bones collides with each other. So I would like to tell ode that.  
How can I tell ODE that it should  not check for a contact between bodyX and bodyY (for instance) ? It looks  like its doing alot of work that I'm not even using for anything.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #6 - Posted 2005-03-13 00:44:22 »

I think there is a way one can diable checks between two Geom types, but I don't know it off the top of my head.

Will.

Offline holodri

Senior Newbie




Java games rock!


« Reply #7 - Posted 2005-03-17 10:38:49 »

maybe a JavaCollision.collide2 would help ?

.. if u put the plane into 'space1' and the ragdoll into 'space2' and just collide the two spaces ..
http://www.ode.org/ode-latest-userguide.html#sec_10_5_0

i didnt try that yet .. so .. can anybody say if i'm right or not ?
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #8 - Posted 2005-03-17 11:29:19 »

Quote

I don't know exactly how to do a), but I think it's possible


Its very possible, and its rather easy to do too. This is a quote from ode's user guide:

Quote

ODE with dWorldStep requires stack space roughly on the order of O(n)+O(m2), where n is the number of bodies and m is the sum of all the joint constraint dimensions. If m is large, this can be a lot of space!
Unix-like operating systems typically allocate stack space as it is needed, with an upper limit that might be in the hundreds of Mb. Windows compilers normally allocate a much smaller stack. If you experience crashes when running large systems, try increasing the stack size. For example, the MS VC++ command line compiler accepts the /Stack:num flag to set the upper limit.

Another option is to switch to dWorldQuickStep.


DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline ewills

Junior Devvie




Java skeletal animation systems rock!


« Reply #9 - Posted 2005-03-17 15:34:09 »

You can increase the stack size in java using the -Xss java command line argument.  I use 2M and have about 1000 objects colliding.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #10 - Posted 2005-03-17 20:20:10 »

Perhaps we should increase the stack size in the Makefile for the windows build.

But, some people may not want a bigger stack size  Roll Eyes  so that means 4 different windows builds?

Feel free to try compiling it yourself with a bigger limit.

Will.

Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #11 - Posted 2005-03-19 01:29:09 »

Quote
Perhaps we should increase the stack size in the Makefile for the windows build.

But, some people may not want a bigger stack size  Roll Eyes  so that means 4 different windows builds?

Feel free to try compiling it yourself with a bigger limit.

Will.


Theres no reason for that. Just use -Xss10mb like Elwiss said, does the trick.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #12 - Posted 2005-03-19 03:36:55 »

Quote


Theres no reason for that. Just use -Xss10mb like Elwiss said, does the trick.


Great Smiley

Will.

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.

toopeicgaming1999 (72 views)
2014-11-27 00:52:04

toopeicgaming1999 (62 views)
2014-11-27 00:50:36

toopeicgaming1999 (15 views)
2014-11-27 00:50:08

SHC (29 views)
2014-11-25 21:30:59

SHC (27 views)
2014-11-25 21:23:45

Norakomi (32 views)
2014-11-25 20:56:43

Gibbo3771 (27 views)
2014-11-25 05:29:16

trollwarrior1 (40 views)
2014-11-22 21:43:56

xFryIx (78 views)
2014-11-13 22:04:49

digdugdiggy (56 views)
2014-11-13 06:41:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-10 08:05:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-03 08:06:02

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

List of Learning Resources
by SilverTiger
2014-08-06 05:03:27

Resources for WIP games
by CogWheelz
2014-08-02 01:50:17

Resources for WIP games
by CogWheelz
2014-08-02 01:49:50

List of Learning Resources
by SilverTiger
2014-08-01 01:59:50

List of Learning Resources
by SilverTiger
2014-08-01 01:56:06
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!