Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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  
  solved:  bizzare issues with Java or Odejava  (Read 1603 times)
0 Members and 1 Guest are viewing this topic.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Posted 2004-05-04 23:29:11 »

Hi,

I've hit a dead end with my implementation of an XML ODE format for Odejava.

And a dead end is about the best way to describe it.  Every move I take, I run into JVM native crashes.  On the weekend, I had to add in some code I had written (which didn't work) line by line, testing and backing it up to find the issues.

In the past, libodejava.so has crashed on me - and this is understandable because it is an alpha library.  What's got me stumped here is that it appears from my crash logs that it's NOT Odejava which is crashing Java but java itself.

The reason I think that is because supposedly the errors are occurring in libc.so and libjvm.so.  Can Odejava's native library cause errors which confuse Java into thinking they are in libc.so and libjvm.so?

My biggest problem is that Java/Odejava is behaving illogically and non-deterministically.   I have never encountered such behaviour and am running out of ideas, and patience.  Two things I have determined were contributing factors to the crashes were excess log statements and a recursive method (just doing some vecmath stuff).

But... Why?  What's wrong with excess log statements and a recursive method.  Neither should cause Java to crash - but they do in this case.

Have I found a bug?  If so I am far off narrowing it down to a reproducible test case.

I've tested this with all 1.4.2_0X JVM's with little change.  I've tested it on Windows which crashes less - but still happens.  Is there anyone out there who has experience with Java crashes who can give me some advice?

The progress of my XML parser is here:
http://odejava.org/jws/jws-org.odejava.xith3d.test.RunDemo.jnlp

it's a crude demo - but it's loaded from an XML file (here: http://odejava.org/jws/boxsphere.xml).

About 40% of the time the demo works in linux, about 70% in Windows.  So the big question is why not the remaining 60% and 30%?  And where are the meaningful java error/debugging messages I am so used to and are one of Java's largest strengths?

Please help,

Will.

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2004-05-05 06:30:59 »

solved;

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=cluebies;action=display;num=1083714114;start=0#4

such a simple fix - such a confusing problem.

Nice way to waste a day  Embarrassed

Will.

Offline Jens

Senior Member




Java for games!


« Reply #2 - Posted 2004-05-05 07:04:38 »

That's a strange bug indeed. It would be good to report it to Sun, although it's probably quite hard to fix it.

Running your demo I get "java.lang.NoClassDefFoundError: org/apache/xerces/parsers/DOMParser", although xercesImpl.jar was downloaded correctly.

Here's the full error message:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
java.lang.NoClassDefFoundError: org/apache/xerces/parsers/DOMParser
      at org.odejava.xode.XODEParserDOM.<init>(XODEParserDOM.java:72)
      at org.odejava.test.xode.XODEExample.<init>(XODEExample.java:101)
      at org.odejava.xith3d.test.RunDemo.main(RunDemo.java:157)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.javaws.Launcher.executeApplication(Launcher.java:837)
      at com.sun.javaws.Launcher.executeMainClass(Launcher.java:797)
      at com.sun.javaws.Launcher.continueLaunch(Launcher.java:675)
      at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:390)
      at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199)
      at com.sun.javaws.Launcher.run(Launcher.java:167)
      at java.lang.Thread.run(Thread.java:534)

Xith3D Getting Started Guide (PDF,HTML,Source)
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 #3 - Posted 2004-05-05 09:30:25 »

try refreshing your cache - I fixed that problem a few days ago.  I had someone who doesn't even use Java run it ok - so I'm sure it must be fine.

you should see:
               <jar href="lib/xml/xml-apis.jar"/>
               <jar href="lib/xml/xercesImpl.jar"/>
               <jar href="lib/xml/xmlParserAPIs.jar"/>


Will.

Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #4 - Posted 2004-05-05 11:33:57 »

Hi,

Definitely think this problem should be reported to Sun. Given a proper error message you would have spent 5 sec in this problem instead of a full day. I am sure that goes for all the rest that will encounter the same sort of thing.

When I tried to run your demo on my lap-top I got this error:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB
      at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:378)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:204)
      at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
      at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:203)
      at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:186)
      at net.java.games.jogl.GLCanvas.display(GLCanvas.java:74)
      at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1100)
      at com.xith3d.scenegraph.View.renderOnce(View.java:755)
      at com.xith3d.scenegraph.View.renderOnce(View.java:688)
      at org.odejava.xith3d.test.RunDemo.<init>(RunDemo.java:141)
      at org.odejava.xith3d.test.RunDemo.main(RunDemo.java:157)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
      at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
      at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

This probably has something to do with JOGL rather than ODE XML.

Keep up the good work!

/J

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #5 - Posted 2004-05-06 00:16:42 »

Looks like the error is a odejava problem which manifests itself as a JVM one.

IMHO the whole Java native stuff is messy - but that's why we use pure java code in the first place Smiley

I guess I could submit an RFE requesting better error messages - but this bug is most likely our fault to start with.

Will.

Offline JSD

Junior Newbie




Java games rock!


« Reply #6 - Posted 2004-10-25 18:15:37 »

Quote

When I tried to run your demo on my lap-top I got this error:
1  
2  
3  
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB
      at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:378)
      at ...


I encountered this same GLException today on a PC with Intel integrated graphics.  Installing the latest Intel graphics driver (Ver# 14.8.01) downloaded from the Intel website fixed the problem.
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 (64 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (216 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

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
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!