Author Topic: Exception and cant find the source  (Read 7676 times)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Exception and cant find the source
« on: November 06, 2006, 08:13:30 pm »
Hi, I tried to separate the rendering from the event handling but I have this Null pointer exception and cant find the source.

at null.null(Unknown Source)
   at Flier_Match.FMCliente.sistema.ManejadorEventos.ejecutarComandos(ManejadorEventos.java(Inlined Compiled Code))
   at Flier_Match.FMCliente.sistema.ManejadorEventos.run(ManejadorEventos.java(Compiled Code))

I tried putting some console mesasges but nothing seems to be null and the trace didnt show me any clue.
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Exception and cant find the source
« Reply #1 on: November 07, 2006, 04:08:03 pm »
Well, I already found the exception and fixed it, but not thanks to the trace, I remember that once I got a problem similar and Egon provide of a version of jpct in which all this thigs were fixed! so why dont to add that features to the official version.

BTW: Talking about the joct engine cidification, I want to suggest to avoid sendind console messages on certain situation but throw an exception, for example when retireving an object from the world, if the object is not found it returns null but also sends a console message, or when blitting an image that may go furteher than the screen. Sending console mesasges is not good for the estetic and for debugging! for example I use to sed console messages to find a error but if for each iteration I receive that jpst messages i cant even see my own text. When something os worng it may throw and exception to let the developers handle it and take action if it happens but if just sending a message programmers have no control over that situation.
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Exception and cant find the source
« Reply #2 on: November 07, 2006, 05:09:42 pm »
Which version is that? The latest official one from september should include all these fixes. Which version have you been using before? The funny thing with this stack trace is, that it doesn't give anything usefull but null:null which seems very strange to me.
About the console messages: You can suppress them or let jPCT throw exceptions instead of just logging the error (by using the Logger class). But this is only true for errors. Warnings don't throw exceptions ATM and it's not possible to configure it like that. The idea was, that the application may still continue after encountering a warning but it could very well be that some things that are warnings should in fact be errors.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Exception and cant find the source
« Reply #3 on: November 07, 2006, 05:26:24 pm »
Yeah the trace say nothing, about the warnings and exceptions well, I guess that programmers should have the control over what to do if something like an object3D wasnt found. When I run the game and it cant get the ship from the world it continues displaying and didnt allow me to see other own messages. I use the mesasges just for one or 3 runs once the error place is identified I fix it and erase the message console. About the version, I dont know which is it, because as you remember yo made some changes to allow render a world on multiple FrameBuffers, but that was on v11. but for v12 you fixed somethings but the multiple FrameBuffer renderers wasnt on it. Now I am using one I found on my flash memory, not really sure about it but I guess is 12.
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Exception and cant find the source
« Reply #4 on: November 07, 2006, 05:43:36 pm »
You have control about errors. And not getting an object from the world is an error. So you can adjust the default behaviour with Logger.setOnError(<int>); and you'll get the exceptions that you want.
About the version: I'm not branching or anything, so what is in 1.11+ is in 1.12 unless i accidently broke it. Could you please try the latest, downloadable version and see if the problem persists? If yes, would it be possible to get a test case AND the version you are using that doesn't show the problem?

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Exception and cant find the source
« Reply #5 on: November 07, 2006, 08:46:54 pm »
ok I remember that when I did the program to render 4 GLCanvas I used the 1.11 but when changed to the 1.12 it didnt worked thats the reason for not getting always the latest. About a test case of that can be found on your page on the download section. About the actual problem well, I already solved it and I dont want to spent time generating errors and cheking the behavior. Anyway everything is okay now!
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Exception and cant find the source
« Reply #6 on: November 08, 2006, 12:36:15 am »
I assume you refer to Model3D as a test case. I tried it with the latest version and it worked just fine. Judging from that exception you got, i don't think that your problem is jPCT related. Looks more like a VM/Hotspot problem to me, because it wasn't able to give the proper location of the exception, which is very strange.