Question about crash and logging system!

I have a question about your crash system. Indead, i want to modify the way the game is crashing. In all my games i just put a catch(Exception e) in the main LWJGL loop. The problem is that in JME3 this seams to not work. I want the game to generate a crash report that will be located in a directory. And i don’t want the game to display a message box when it’s crahsing. I only want to call my crash reporter.

For a second and last question, i would like to know if there is a way to disable all JME3 logging ?

Thanks by advance,
Yuri6037

This answers both your questions:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:logging

  1. Override handleError in the Application to catch crashes and display / do what you want to do then.
  2. Logger.getLogger("").setLevel(Level.SEVERE) → java.util.logging.Logger Javadoc
  3. Look at the sidebar to the right of your screen and also our wiki, or press F1 in the SDK, all these questions are answered in the documentation.
  1. Sorry but it seams like the handleError method has been removed. Because when i put public void handleError() then i override it, IDE gives me that this method does not exist in super type (SimpleApplication).
  2. The Logger.getLogger("").setLevel(Level.SEVERE) is not doing anything !

EDIT : FIXED the Logger.getLogger
Now it rest the error handling !
EDIT2 : ALL FIXED now ! This topis can be considerated as closed and solved !

This is the method signature:
[java]public void handleError(java.lang.String errMsg,
java.lang.Throwable t)[/java]

Check our documentation (press F1 in the SDK) on how you can display the methods of certain classes and their javadoc.

Thank you i already figured it out ! If i had searched in the source… I know, i’ve a good developpement skill but i’m not searching very much when i have a problem… When i got one, the first thing that i do is posting help on a forum…

Well thats just time consuming for all of us…

@Yuri6037 said: Thank you i already figured it out ! If i had searched in the source... I know, i've a good developpement skill but i'm not searching very much when i have a problem... When i got one, the first thing that i do is posting help on a forum....

Start now with a more search base behaviour, else all you will get is rtfm + wiki link.

@Yuri6037 said: Thank you i already figured it out ! If i had searched in the source... I know, i've a good developpement skill but i'm not searching very much when i have a problem... When i got one, the first thing that i do is posting help on a forum....

Really, the javadoc and even the source code is a single click away when you are in the IDE. (This is the semi-informative part.)

So… what you are saying is that opening a web page, composing a question, hitting submit, and then sitting and waiting for a response is better than “click”? Do you do other pain inducing hobbies? Could say something about your personality. :slight_smile: (This is me piling on with the rest of them.)

@pspeed said: Really, the javadoc and even the source code is a single click away when you are in the IDE. (This is the semi-informative part.)

So… what you are saying is that opening a web page, composing a question, hitting submit, and then sitting and waiting for a response is better than “click”? Do you do other pain inducing hobbies? Could say something about your personality. :slight_smile: (This is me piling on with the rest of them.)

Nope ! The most strange is that when I have a problem I just post help on a forum, then I make some research in the case of I found a solution. That was exactly what I’ve done with this topic. I’m very sorry to consume your time with my stupid questions…
This is my fault. But you know, nobody is perfect.

btw if you do alt+insert the sdk had lots of various shortcuts to quickly add in boilerplate code. You could have just done alt+insert ->override -> handleError()

id say about 50% or more of my coding is either alt+insert (add code) or ctr+r (refactor code), (and maybe a couple other similiar shortcuts) then i just quickly key in what the code does…

If you take the time to learn all of netbean’s features especially everything in the right click context menu you’ll probably find you can absorb the API of any class or library at a very fast rate, and be able to code a lot of stuff without dwelling on the details like “what paremeters does this method take”… ok im done ^.^

Thank you, but I never never touched net beans IDE… I already touched Eclipse witch is making the code to be impossible to read because of wrong reformatting.
So I just tried to use in the past, the net beans IDE, but I got an error : JVM native code crash (that was with my old laptop). So after all, I tried the last IDE I found : INTELLIJIDEA ; that’s for me the best IDE I found. The version of net beans I have with jme is not bad, but it have not all the code completation features that you have in intellij. In plus sometimes it spam me with errors (not game code but IDE errors).
These errors are coming only if you put your game in fullscreen (1920x1080 pixels), then put it back to window mode (1600x900 pixels), then put it in window mode in a less higher resolution, and bam ! You will be spammed with so many errors. But the game will be still running ; that’s only the IDE who is errored…

I forgot about eclipse, you got some gui bugs in eclipse (only with 1920x1080 screen resolution).
Net beans have too a little bug : a red line in the middle of the editor, that’s why I don’t very like it. Because this red line is caching my view…

@Yuri6037 said: Thank you, but I never never touched net beans IDE... I already touched Eclipse witch is making the code to be impossible to read because of wrong reformatting.

I forgot about eclipse, you got some gui bugs in eclipse (only with 1920x1080 screen resolution).
Net beans have too a little bug : a red line in the middle of the editor, that’s why I don’t very like it. Because this red line is caching my view…

You are probably using eclipse wrong, it can be configured how it formats the text, and by default it follows the java conventions, so I bet it’s you not using proper formating rather than the ide ^^

Anyway since you seem ot get strange errors in every ide, especially rendering errors, you might want to check if it’s your pc thats at fault here.

A… Strange that eclipse uses default java conventions. Otherwise making the code returning automatically to line is a java convention.

Example :
The main void :
Eclipse :
public static void main(String[]
args){
}
Net beans or intellij idea :
public static void main(String[] args){
}

That’s why I hate eclipse, because I really don’t understand anything of any code when the code is in multiple lines… And eclipse was always making the code lines to be in multiple lines.

And for net beans render bug, it’s not a bug it’s a guideline for newbies, I found a way to remove this stupid line.

But yes like you say, someone has told me so many times that my config is not very adapted for gaming : I have too many hard disks running together, and a too quick CPU…
If you want, here is my config :
Intel core i7 3.7 ghz
Asus nvidia gtx 650ti direct cu 2 2gb
2 hard disks connected to an IDE (old port before SATA was created) extension card
2 principal hard disks connected directly to asus motherboard SATA ports.
1 IDE DVD burner (another time connected to extension card, with his friend zip 750)
1 SATA DVD burner connected to motherboard. Normally this last SATA would not be connected, but due to windows 7 not reconizing extentions cards, I needed it to install my win 7 liscence.

And yes this computer has been entirely mounted by me.