What Exactly is Dreaded Error 7?

Started by AGP, May 31, 2009, 20:21:44

Previous topic - Next topic

AGP


Matzon

QuoteFatal error occured (7): Racer
java.lang.InstantiationException: Racer
   at java.lang.Class.newInstance0(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:752)
   at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:640)
   at java.lang.Thread.run(Unknown Source)
The problem is that your Racer class cannot be instantiated because it has a non-default constructor. Create a constructor that does not take any arguments (the current one takes a boolean argument).
I dont even understand why you are creating a new instance of Racer in the init code and why the applet has ever worked.

I have updated the AppletLoader to print a stacktrace if one such occurs.

Matzon

btw, to debug:

  • create folder for offline loading of applet - copy all the resources down into it
  • add the parameters seen in the above eclipse link to the applet environment BUT change the last 'n' to 'y' so that it waits on launch
  • create eclipse project
  • debug remote app
  • add lwjgl source to step debug

AGP

Matzon, thanks a whole lot for both tips. As for there not being a standard constructor, I didn't even know I needed one and the javadocs don't say you do. In the past, all my applets must have had simple constructors. That's one that I might never have figured out myself, pal. So again, thank you for your help.

AGP

So now I am getting an error 7: null message (hey it's progress!). Anyway, if I could have your updated AppletLoader so see its stack trace it would help a lot because as far as I can tell there should be nothing null in my applet. I appreciate your help and hope not to be bothering you too much.

Matzon


AGP