Weird crash

so i cleaned up my project in eclipse a bit but now i get this error when I try to run my game,

com.jme.system.JmeException: Display System must be initialized before Timer.

at com.jme.util.Timer.getTimer(


at com.RoT.main.RoTGame.main(

Jun 9, 2006 12:04:28 AM start

INFO: Application ending.

Exception in thread "main" java.lang.NullPointerException


at com.RoT.main.RoTGame.main(

any ideas?

Nothing before that? Any errors regarding display initialization?  (hmm, I already saw that exception but can't remember why and where, dammit)

Timer stuff has changed since 0.9, a DisplaySystem.getDisplaySystem() must have been called before trying to get any timer instances…(to setup the displaysystem systemprovider). so, solution is to do a getDisplaySystem before that or move your timer init to a later stage in your startup…

had some talk with mojo about this, and i think that we should have some DisplaySystem.initialize method cause it feels kind of odd to do an empty getDisplaySystem just cause you want to get your timers early in the code…

true, but he uses FixedLogicrateGame. Which does not seem to work any more.

Looking at the tests no test actually uses FixedLogicrateGame - seems to be broken…

yes apparantly it is not updated against the new systemprovider and timerthings…the same bug holds for FixedFramerateGame and VariableTimestepGame too…

the easy fix i just moving timer = Timer.getTimer(); in those classes to after the assertDisplayCreated method call…

So, can you put that in CVS? Duh

Hehe, his first checkin and you nearly missed it :slight_smile:

yay it worked!!! :slight_smile: didnt have the guts to post anything about it until i got it confirmed from llama hehe…lets just hope the fix works too s

ohh heheh yeah i updated from the cvs too when i did the clean up, something i hadn't done in a while

thanks for the fix!!

whooops still not working now i get this error



at com.RoT.main.RoTGame.initSystem(


at com.RoT.main.RoTGame.main(

Jun 9, 2006 11:54:16 PM start

INFO: Application ending.

something wrong with this line…

tickTime = timer.getResolution() / logicTPS;

are you calling setLogicTicksPerSecond in your initSystem method? cause the timer is not initialized until after that…so you would have to call that method from your initGame method instead…

right on the money as usual MrCoder, thanks for everything!

no prob!  8)