Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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  
  Removing Geom from Space causes native crash  (Read 1450 times)
0 Members and 1 Guest are viewing this topic.
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Posted 2004-10-31 20:43:52 »

After switching to the 10-30-04 lib and binary, the native library crashes when I try to remove a Geom from a Space.  The crash seems to be caused by the Ode.getPARENTSPACEID_ZERO() call.  Is anyone else having similar issues?
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #1 - Posted 2004-10-31 21:04:16 »

I seem to be having the same problem with  Body.removeGeom() and Ode.getBODYID_ZERO()   Cheesy
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #2 - Posted 2004-10-31 21:44:54 »

Which platform?
Which version (debug/release)?
What is the error message?

Geom removal seems to be working for me (Mac/debug).

Will.

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

Junior Member




Java skeletal animation systems rock!


« Reply #3 - Posted 2004-11-01 16:39:28 »

Running Windows XP, J2SE 1.5.0, 10-30-04 cvs and natives.  Error message is:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x377c7aaa, pid=1068, tid=2868
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode)
# Problematic frame:
# C  [odejava.dll+0x57aaa]
#
# An error report file with more information is saved as hs_err_pid1068.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

Here's the first few lines of the logged stack trace:

Stack: [0x376b0000,0x376f0000),  sp=0x376ef2e8,  free space=252k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [odejava.dll+0x57aaa]
C  [odejava.dll+0x5461e]
j  org.odejava.ode.Ode.getPARENTSPACEID_ZERO()Lorg/odejava/ode/SWIGTYPE_p_dSpace
ID;+4
j  org.odejava.Geom.removeFromSpace()V+35
j  org.odejava.Space.remove(Lorg/odejava/Geom;)V+22

This method call seems benign... any idea what I might be doing to cause the crash?

My code worked with the 5-29-04 natives and 9-7-04 cvs, so I'm not sure what I'm doing swong...
Offline Mithrandir

Senior Member




Cut from being on the bleeding edge too long


« Reply #4 - Posted 2004-11-01 17:43:00 »

I think your code is finding the wrong instance of the odejava.dll. That is, you've still got the old one being found in your system and not the newly recompiled one.

The site for 3D Graphics information http://www.j3d.org/
Aviatrix3D JOGL Scenegraph http://aviatrix3d.j3d.org/
Programming is essentially a markup language surrounding mathematical formulae and thus, should not be patentable.
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #5 - Posted 2004-11-01 18:08:34 »

I thought that might be the case, so I deleted the old .dll, ran to make sure that odejava.dll was not found, and then copied over the new one.  This didn't seem to have any effect.
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #6 - Posted 2004-11-04 15:06:28 »

I've experimented with this phenomenon on several machines now.  The problem seems to be related to the execution time that passes between Space creation and adding the GeomS to the Space.  If I create the Space and then immediately add GeomS to it, then I can not subsequently remove those GeomS without crashing the VM.  All seems well if I place some seemingly extraneous startup statements (e.g. initializing GUI components) between Space creation and Geom adding.  Does this make any sense?  Are JNI calls synchronous?  At the very least, maybe this can help someone  Smiley
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #7 - Posted 2004-11-04 22:23:10 »

What puzzles me with this is that it is crashing on Ode.getPARENTSPACEID_ZERO().  I have experianced crashes when removing a geom twice (it would crash the second time as it didn't exist).  I have added some safeguards to the API to prevent this case.

As far as I know, the ZERO Space is always present in ODE.

Have you tried increasing the available java heap memory?  It's a long shot, but solved (read: worked around) a problem I had once.

Will.

Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #8 - Posted 2004-11-05 15:19:10 »

When I began using Odejava (5-29 natives, 9-7 cvs), I was using a starting heap size of 128M and a max heap size of 256M.   I was experiencing some native crashes, so I upped the starting heap size to 256M and the max heap size to 512M, which seemed to take care of the problem.

The crashes returned after I switched to the newest natives and cvs.  The crashes seemed to go away after I switched around some of my program initialization statements.  I have even lowered the starting heap size back to 128M and the max heap size to 256M, and Odejava seems to be running rock solid!  I can't make much sense of it Smiley
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #9 - Posted 2004-11-05 22:37:04 »

nasty native memory bugs I think Sad

Will.

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

Senior Member




Go Go Gadget Arms


« Reply #10 - Posted 2004-11-05 22:40:42 »

sorry if this seems to be out of place, but have you tried it on linux or macosx?

Because it seems (to me atleast) that windows is allocating space in memory to the JVM that is already being actively used by Ode natives...

Its a very longshot...but worth the try i guess.

Sorry for such a dumb comment, but ive never trusted windows.

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #11 - Posted 2004-11-07 15:57:24 »

Smiley  No, I haven't tried running on linux or macosx.  Unfortunately, I prematurely ported my code to java 1.5, so I am now waiting for a macosx release of java 1.5.  I also don't have easy access to a linux box at the moment, though I could bug some friends.  Thanks for the tip!
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.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!