Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  Internal errors and native crashes..  (Read 1754 times)
0 Members and 1 Guest are viewing this topic.
Offline blarmee

Junior Newbie




Java games rock!


« Posted 2005-03-08 05:53:00 »

In order to simulate an expanding object, I am swapping out the geoms of a body fairly quickly.  The effect looks good, but it's causing a variety of internal errors and crashes.

This is how I'm trying to do it:
1  
2  
3  
4  
5  
6  
7  
8  
PlaceableGeom geo = (PlaceableGeom)this.sim_body.getGeom();
space.remove(geo);
this.sim_body.removeGeom(geo);
geo.delete();

geo = new GeomSphere((float)(this.bounds.getWidth()+22)/2);
this.sim_body.addGeom(geo);
space.addBodyGeoms(this.sim_body);


It causes the following "ODE Internal Error 2" message:

Bad argument(s) (ode/src/collision_space.cpp:182)

and when that doesn't happen, I get a message like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0317e6f1, pid=4356, tid=3724
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_01-b08 mixed mode, sharing)
# Problematic frame:
# C  [odejava.dll+0x6e6f1]
#

---------------  T H R E A D  ---------------

Current thread (0x02d62850):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=3724]

siginfo: ExceptionCode=0xc0000005, writing address 0x00000004

Registers:
EAX=0x031a13f0, EBX=0x031a0650, ECX=0x00000000, EDX=0x031b322c
ESP=0x02f8f35c, EBP=0x02f8f37c, ESI=0xffffffff, EDI=0x47b3b693
EIP=0x0317e6f1, EFLAGS=0x00010246

Top of Stack: (sp=0x02f8f35c)
0x02f8f35c:   02d62850 00000040 26bee1f8 02d91038
0x02f8f36c:   00000050 031a1534 00000000 00000000
0x02f8f37c:   02f8f3a8 0317acc3 031a0650 26bee1f8
0x02f8f38c:   0317ac94 00000040 0317ac81 00000040
0x02f8f39c:   00000000 0313e6b9 00000040 02f8f3b8
0x02f8f3ac:   031119f2 00000040 031b3140 02f8f400
0x02f8f3bc:   03173909 031b3430 00000000 00ad826f
0x02f8f3cc:   02d6290c 02f8f408 031b3160 00000000

Instructions: (pc=0x0317e6f1)
0x0317e6e1:   04 eb 03 8b 5d 08 8b 4a 08 8b 7a 04 83 7d f8 00
0x0317e6f1:   89 79 04 8b 4a 04 8b 7a 08 89 79 08 0f 84 94 00


Stack: [0x02f50000,0x02f90000),  sp=0x02f8f35c,  free space=252k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [odejava.dll+0x6e6f1]
C  [odejava.dll+0x6acc3]
C  [odejava.dll+0x19f2]
C  [odejava.dll+0x63909]
j  org.odejava.ode.Ode.dGeomSetBody(Lorg/odejava/ode/SWIGTYPE_p_dGeomID;Lorg/odejava/ode/SWIGTYPE_p_dBodyID;)V+8
j  org.odejava.PlaceableGeom.setBody(Lorg/odejava/Body;)V+111
j  org.odejava.Body.removeGeom(Lorg/odejava/PlaceableGeom;)V+38
j  Marble.updateSim(Lorg/odejava/World;Lorg/odejava/Space;Lorg/odejava/display/DisplayBin;)V+16
j  Sim.marbleUpdated(LSimObject;)V+13
j  MarbleStore.refresh(LSimObject;)V+34
j  MarbleStore.simObjectChange(LSimObject;Ljava/util/List;Z)V+6
j  Marble.fireChangeEvent(Z)V+34
j  Marble.resize(DD)V+52
j  FaceMarble.paint(Ljava/awt/Graphics2D;Ljava/awt/geom/Rectangle2D;)V+67
j  DrawTest$MyPanel.paintComponent(Ljava/awt/Graphics;)V+91
j  javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+260
j  javax.swing.JComponent.paintWithOffscreenBuffer(Ljavax/swing/JComponent;Ljava/awt/Graphics;IIIILjava/awt/Image;)V+174
j  javax.swing.JComponent.paintDoubleBuffered(Ljavax/swing/JComponent;Ljava/awt/Component;Ljava/awt/Graphics;IIII)Z+131
j  javax.swing.JComponent._paintImmediately(IIII)V+739
j  javax.swing.JComponent.paintImmediately(IIII)V+83
j  javax.swing.RepaintManager.paintDirtyRegions()V+314
j  javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()V+32
j  java.awt.event.InvocationEvent.dispatch()V+47
j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+26
j  java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+200
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j  java.awt.EventDispatchThread.run()V+9
v  ~StubRoutines::call_stub
V  [jvm.dll+0x8176e]
V  [jvm.dll+0xd481d]
V  [jvm.dll+0x8163f]
V  [jvm.dll+0x8139c]
V  [jvm.dll+0x9c05c]
V  [jvm.dll+0xfeece]
V  [jvm.dll+0xfee9c]
C  [MSVCRT.dll+0x2a3b0]
C  [kernel32.dll+0xb50b]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.odejava.ode.OdeJNI.dGeomSetBody(JJ)V+0
j  org.odejava.ode.Ode.dGeomSetBody(Lorg/odejava/ode/SWIGTYPE_p_dGeomID;Lorg/odejava/ode/SWIGTYPE_p_dBodyID;)V+8
j  org.odejava.PlaceableGeom.setBody(Lorg/odejava/Body;)V+111
j  org.odejava.Body.removeGeom(Lorg/odejava/PlaceableGeom;)V+38
j  Marble.updateSim(Lorg/odejava/World;Lorg/odejava/Space;Lorg/odejava/display/DisplayBin;)V+16
j  Sim.marbleUpdated(LSimObject;)V+13
j  MarbleStore.refresh(LSimObject;)V+34
j  MarbleStore.simObjectChange(LSimObject;Ljava/util/List;Z)V+6
j  Marble.fireChangeEvent(Z)V+34
j  Marble.resize(DD)V+52
j  FaceMarble.paint(Ljava/awt/Graphics2D;Ljava/awt/geom/Rectangle2D;)V+67
j  DrawTest$MyPanel.paintComponent(Ljava/awt/Graphics;)V+91
j  javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+260
j  javax.swing.JComponent.paintWithOffscreenBuffer(Ljavax/swing/JComponent;Ljava/awt/Graphics;IIIILjava/awt/Image;)V+174
j  javax.swing.JComponent.paintDoubleBuffered(Ljavax/swing/JComponent;Ljava/awt/Component;Ljava/awt/Graphics;IIII)Z+131
j  javax.swing.JComponent._paintImmediately(IIII)V+739
j  javax.swing.JComponent.paintImmediately(IIII)V+83
j  javax.swing.RepaintManager.paintDirtyRegions()V+314
j  javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()V+32
j  java.awt.event.InvocationEvent.dispatch()V+47
j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+26
j  java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+200
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j  java.awt.EventDispatchThread.run()V+9
v  ~StubRoutines::call_stub


Any ideas?  I've tried reordering statements and such to no avail.
Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #1 - Posted 2005-03-08 18:36:51 »

Try using the latest build from CVS.
Offline blarmee

Junior Newbie




Java games rock!


« Reply #2 - Posted 2005-03-08 23:39:45 »

I just tried that, and it seems to fix most of the problems.  However, now I'm getting native exceptions (with much less frequency, though) in really strange places, like ntdll.dll.  For example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c9111de, pid=324, tid=4364
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_01-b08 mixed mode, sharing)
# Problematic frame:
# C  [ntdll.dll+0x111de]
#

---------------  T H R E A D  ---------------

Current thread (0x02d62870):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=4364]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:
EAX=0x00000000, EBX=0x00030000, ECX=0x00a93df8, EDX=0x00030178
ESP=0x02f8ee70, EBP=0x02f8f090, ESI=0x00a93df0, EDI=0x00000000
EIP=0x7c9111de, EFLAGS=0x00010206

Top of Stack: (sp=0x02f8ee70)
0x02f8ee70:   02d7d6dc 00000008 00000000 00000008
0x02f8ee80:   00a694e4 00031468 00030000 02d7d6d8
0x02f8ee90:   02f8ee80 00000000 02f8f0c4 7c90ee18
0x02f8eea0:   7c910738 ffffffff 7c910732 7c9106ab
0x02f8eeb0:   7c9106eb 02d6292c 00000248 00000000
0x02f8eec0:   02f8ee9c 6d77a41d 02f8fb64 7379adb6
0x02f8eed0:   737613c0 ffffffff 73775be2 73775c9b
0x02f8eee0:   000cf068 73775cb2 737a09e8 02e10d18

Instructions: (pc=0x7c9111de)
0x7c9111ce:   39 89 bd 0c ff ff ff 8b 46 0c 89 85 68 ff ff ff
0x7c9111de:   8b 10 3b 57 04 0f 85 8c 31 02 00 3b d1 0f 85 84


Stack: [0x02f50000,0x02f90000),  sp=0x02f8ee70,  free space=251k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [ntdll.dll+0x111de]
C  [MSVCRT.dll+0x1c3c9]
C  [MSVCRT.dll+0x1c3e7]
C  [MSVCRT.dll+0x1c42e]
C  [awt.dll+0x36627]
C  [awt.dll+0x35caf]
C  [awt.dll+0x3887b]
J  sun.awt.image.ImagingLib.transformBI(Ljava/awt/image/BufferedImage;Ljava/awt/image/BufferedImage;[DI)I
J  sun.awt.image.ImagingLib.filter(Ljava/awt/image/BufferedImageOp;Ljava/awt/image/BufferedImage;Ljava/awt/image/BufferedImage;)Ljava/awt/image/BufferedImage;
J  java.awt.image.AffineTransformOp.filter(Ljava/awt/image/BufferedImage;Ljava/awt/image/BufferedImage;)Ljava/awt/image/BufferedImage;
J  sun.java2d.pipe.DrawImage.renderImageXform(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;Ljava/awt/geom/AffineTransform;IIIIILjava/awt/Color;)V
J  sun.java2d.pipe.DrawImage.transformImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;Ljava/awt/geom/AffineTransform;IIIIILjava/awt/Color;)V
J  sun.java2d.pipe.DrawImage.transformImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/geom/AffineTransform;I)V
J  sun.java2d.pipe.DrawImage.transformImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;Ljava/awt/geom/AffineTransform;Ljava/awt/image/ImageObserver;)Z
J  sun.java2d.SunGraphics2D.drawImage(Ljava/awt/Image;Ljava/awt/geom/AffineTransform;Ljava/awt/image/ImageObserver;)Z
J  FaceMarble.paint(Ljava/awt/Graphics2D;Ljava/awt/geom/Rectangle2D;)V
J  DrawTest$MyPanel.paintComponent(Ljava/awt/Graphics;)V
j  javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+260
j  javax.swing.JComponent.paintWithOffscreenBuffer(Ljavax/swing/JComponent;Ljava/awt/Graphics;IIIILjava/awt/Image;)V+174
j  javax.swing.JComponent.paintDoubleBuffered(Ljavax/swing/JComponent;Ljava/awt/Component;Ljava/awt/Graphics;IIII)Z+131
J  javax.swing.JComponent._paintImmediately(IIII)V
v  ~RuntimeStub::alignment_frame_return Runtime1 stub
j  javax.swing.JComponent.paintImmediately(IIII)V+83
j  javax.swing.RepaintManager.paintDirtyRegions()V+314
j  javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()V+32
j  java.awt.event.InvocationEvent.dispatch()V+47
j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+26
j  java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+200
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j  java.awt.EventDispatchThread.run()V+9
v  ~StubRoutines::call_stub
V  [jvm.dll+0x8176e]
V  [jvm.dll+0xd481d]
V  [jvm.dll+0x8163f]
V  [jvm.dll+0x8139c]
V  [jvm.dll+0x9c05c]
V  [jvm.dll+0xfeece]
V  [jvm.dll+0xfee9c]
C  [MSVCRT.dll+0x2a3b0]
C  [kernel32.dll+0xb50b]


They don't specifically refer to odejava anywhere, but they don't happen without it, so I'm at a loss as to what the real problem is.  Could I have miscompiled odejava?
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 2005-03-09 02:10:57 »

I'm getting the same native crashes, but only when I exit one of my applications.  I also grabbed the latest JOGL betas just before I started noticing the crashes, so I attributed the crashes to the JOGL betas.  Is there some operation that reliably causes the crash?
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


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

That's very strange.  The thread is "AWT-EventQueue-0" as well.

A long time ago I had a problem where java would crash in the garbage collection method.  I couldn't understand why either, but apparently it is possible for the native code to corrupt some memory which may cause java to crash in the future when that memory was accessed (in this case when the GC was run).  I have no idea if this is what's happening though.

Have you tried running it on any other Operating Systems?

Will.

Offline ewills

Junior Member




Java skeletal animation systems rock!


« Reply #5 - Posted 2005-03-14 16:04:26 »

I think I have solved this problem in my code by moving the System.exit(0) statement to the rendering/physics thread.
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.

BurntPizza (24 views)
2014-09-19 03:14:18

Dwinin (39 views)
2014-09-12 09:08:26

Norakomi (68 views)
2014-09-10 13:57:51

TehJavaDev (93 views)
2014-09-10 06:39:09

Tekkerue (47 views)
2014-09-09 02:24:56

mitcheeb (68 views)
2014-09-08 06:06:29

BurntPizza (51 views)
2014-09-07 01:13:42

Longarmx (38 views)
2014-09-07 01:12:14

Longarmx (44 views)
2014-09-07 01:11:22

Longarmx (40 views)
2014-09-07 01:10:19
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!