Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited

Everything posted by deiruch

  1. Hello everyone I'm the developer of a free online multiplayer Tetris game. Some of the more advanced players complained a bit about jitter in our game. I'm not talking about multi-second stalls, but barely measurable stops in the millisecond range. First I thought that it was GC related, but couldn't find any evidence for it. I set the GC ratio to 10%. But some players said that the problem only appears on multi-core systems and can be solved by changing the affinity of the process to lock it to a single core. Then I changed the runtime from "Desktop" to "Classic". The beta testers told me that it improved the situation for them... The documentation states: Is there more information available on these runtimes? Any ideas on how to measure and tune the behaviour of the desktop runtime? Can multiple threads run in parallel with the Classic Runtime or will threads be multiplexed onto a single core? Any other ideas on how to reduce the jitter? Cheers, Simon Btw: For those interested, you can find the game here: http://gewaltig.net/
  2. Classic vs. Desktop runtime

    Unfortunately I personally cannot reproduce the problem on any of my test computers. FPS in the reported cases is consistently high, so it's not a general lack of performance. I was posting because I was interested in more in-depth information about the various runtimes. Is that information available somewhere?
  3. Classic vs. Desktop runtime

    It's the other way round. It's the Desktop Runtime that doesn't work that well for some people.
  4. Hi everyone I'm collecting crash logs for my game. A typical stacktrace looks like this: ... at net.gewaltig.cultris.manager.rooms.Room.getRecordedRound(Room.java:190) at net.gewaltig.cultris.gui.menu.GameOnlineChallenge.updateDT(GameOnlineChallenge.java:190) at net.gewaltig.cultris.gui.OpenGLGUI.updateDT(OpenGLGUI.java:190) at net.gewaltig.cultris.tools.UpdateManager.update(UpdateManager.java:190) ... As you can see it contains the proper package names, the correct class names and even the method names are correct. But the line numbers are off. This is expected in the default configuration. However, I enabled the GENSTACKTRACE and -Djet.stack.trace compiler/runtime options. The documentation says this about these options: And here's the relevant part of the project file: %%Excelsior JET v7.6 project file -compilewithfixedheap- -genstackalloc+ -genstacktrace+ -global+ ... -jetrt=Desktop -jetvmprop=-Dorg.lwjgl.util.NoChecks:true -Djet.jit.fast -Djet.jit.disable.resolution -Djet.gc.heaplimit:268435456 -Djet.gc.ratio:10 -Djet.stack.trace ... Is this expected? Having full stack traces would really help solving some issues... Cheers, Simon
  5. You were spot on with your guess: I compiled the class files without line numbers. After changing the javac options it works as advertised. Thanks! BTW: Maybe you could add a warning to the compiler when the main class file was generated without line numbers and JET was asked to output line numbers in stack traces to avoid this problem in the future?
  6. Hi there I'm a developer of Cultris, a free tetris clone (http://gewaltig.net). The game is compiled & distributed with Excelsior JET & JetPack. It works quite well. We collect crash logs, recently I recieved one from an anonymous user with this excepction: java.lang.NullPointerException at java.util.Formatter.format(Formatter.class:0) at java.util.Formatter.format(Formatter.class:0) at java.lang.String.format(String.java:2838) at net.gewaltig.cultris.game.achievements.DurationAchievement.achieved(DurationAchievement.java:69) at net.gewaltig.cultris.game.challenges.Challenge.verifyAchievements(Challenge.java:69) at net.gewaltig.cultris.gui.menu.GameChallenge.updateDT(GameChallenge.java:190) at net.gewaltig.cultris.gui.OpenGLGUI.updateDT(OpenGLGUI.java:190) at net.gewaltig.cultris.tools.UpdateManager.update(UpdateManager.java:63) at net.gewaltig.cultris.Cultris.main(Cultris.class:98) (The line numbers aren't correct). The interesting code is in DurationAchievement.achieved(): public boolean achieved(Playfield _pf) { float rt=duration-(float)_pf.playDuration; if(rt<0) rt=0; if(bigLabel!=null) bigLabel.setCaption(String.format("%d:%05.2f",(int)rt/60,rt%60)); return _pf.state==PlayfieldState.PLAYING && _pf.playDuration>duration; } How on earth can this code throw a NullPointerException in String.format(...)? The code was compiled with Excelsior Jet 7.2, J6SE 22. From what I see in the logs the user ran the game under Windows 7 x86 with lots of free memory on a quad-core machine. Cheers, Simon
  7. NullPointerException in String.format

    I now also ran our game with AppVerifier and with debug DLLs with all checks enabled. The only thing I could find were some memory leaks in the Intel OpenGL drivers...
  8. How can I disable the warning that JetPack II-installers show when an application is already installed? Also, how can I stop a JetPack II-installer from adding a second entry in the Add/Remove programs list when a previous version was already installed? If it's not possible to do this with the current version, do you have an ETA? Some users are worried about the warning and don't know what to do (either they ignore your installer-warning or they uninstall, where they fear that they might lose all their settings). I know that I should/could use updates, but I can't because we deployed dozens of different versions of our application and creating updates from every version to the current version every time is unfeasible. I'm also aware that the uninstaller of the second installation might leave some registry keys behind. In a perfect world the installer would detect a previous installation and then update that existing installation, without asking for the installation directory a second time.
  9. NullPointerException in String.format

    Ok, I have some new data from the field. The newest release, compiled with 7.6MP2 still shows the same symptoms: Random "impossible" exceptions from all over the place. But doesn't happen often or regularly and on a variety of machines (different Windows versions, different CPUs, ...). The latest crash was a NullPointerException in a method that only accesses initialized constants and an initialized local array.
  10. Using another installer is an option I'm working on. Thanks for the reply. I hope that you'll change it eventually - all it would take is an if(...) somewhere in the code and commenting out a message box.
  11. I noticed that there are other posts in the forum about the same issue and (sadly) they got no replies too. How are other users working around it?
  12. NullPointerException in String.format

    Sadly not. We collect anonymized crash reports and 99% of the users don't enter contact information. Also there is no fixed set of machine where it crashes - it crashes sometimes on machines where we know that it ran fine for the last few months. Then, a crash out of nowhere, and after that no more crashes from that machine. "My app?" I couldn't find an attached app. If you meant "your app": I tested with both, the -Xcheck:jni and the (Oracle-recommended) -XX:+CheckJNICalls options to no avail. It didn't report errors. The beta release notes of the next contain bits about stability-related changes. We'll see if future versions behave differently.
  13. NullPointerException in String.format

    Thanks for the article. I believe I read some similar stories on the Excelsior Blog or somewhere in the support section. I understand that many people think your product is buggy when in fact they write code with race-conditions... Thank you for still being so nice after all this time That's exactly the problem: Reproducing the bug reliably. So far I couldn't find a way to do that. The game works with Oracles JVM on Windows XP to 7, all 32 bit. It works on OS X 10.6. The only weird bug reports come from the Excelsior JET builds. I tested with JRockit too, but wasn't able to get it to crash (but I'm also unable to crash it with Excelsior - so that has nothing to say). It might *very well* be that there's a bug in the libraries we use or in our code - the problem is that I have no idea where to look for a bug. Aren't there additional logs we could enable? Or compiler flags so that the game would crash immediately when something goes south instead at some random location? The libraries we use are: LWJGL (http://www.lwjgl.org) for the visuals NativeBass (http://jerome.jouvie.free.fr/nativebass/, JNI-bridge) and BASS (http://www.un4seen.com/bass.html, actual library) for music and sound effects Do you suggest we deploy the game without music and sound effects? The bugs are rare - letting thousands people download a version without music/sound would be worse IMHO.
  14. NullPointerException in String.format

    But our game depends on those libraries. It doesn't work without them. And I don't have a way to reproduce the problem on my machine. So how do you suggest to solve the problem? Fact is, that the Oracle JVM doesn't crash.
  15. NullPointerException in String.format

    I have similar crashlogs from all over the world (different operating systems & hardware). That's why I suspect it's not a hardware issue. Since we use some native libraries it might well be that one of them corrups memory somehow. But I have no idea how I could verify this hypothesis.
  16. NullPointerException in String.format

    More random crashes... java.lang.StringIndexOutOfBoundsException: String index out of range: 3 at com.excelsior.internal.lang.KeyStrings.newString(KeyStrings.java:95) at java.lang.StringBuffer.toString(StringBuffer.java:592) at net.gewaltig.cultris.gui.controls.CLabel.reflow(CLabel.java:190) at ... I cannot reproduce any of the issues on my machine reliably. And idea what to do next?
  17. Hi, it's me again. I have another crash report... This time it's a NullPointerException in the method getHeightDiff(). Code is as follows: public Piece calcBestPos(Piece _currentPiece,Piece _nextPiece,int[][] _field) { [...] int[][] futureField2=new int[Constants.FIELD_WIDTH][Constants.FIELD_HEIGHT]; [...] insertPiece(futureField,_nextPiece,futureField2); double curScore=rateBoard(futureField,futureField2); [...] } double rateBoard(int[][] _futureField1,int[][] _field2) { [...] double maxHeight=getMaxHeight(_field2); double heightDiff=getHeightDiff(_field2); [...] } private double getMaxHeight(int[][] _field) { int minY=_field[0].length; for(int x=0;x<_field.length;x++) for(int y=0;y<minY;y++) if(_field[x][y]!=CField.C_EMPTY) { minY=y; break; } return (_field[0].length-minY)/(double)_field[0].length; } private double getHeightDiff(int[][] _field) { double yDiff=0; int yOld=_field[0].length; for(int y=_field[0].length-1;y>=0;y--) if(_field[0][y]!=CField.C_EMPTY) yOld=y; for(int x=1;x<_field.length;x++) { int yMin=_field[x].length; for(int y=_field[x].length-1;y>=0;y--) if(_field[x][y]!=CField.C_EMPTY) yMin=y; double diff=yOld-yMin; if(diff<0) diff=-diff; diff-=0.2; if(diff<0) diff=0; yDiff+=diff*diff*diff; yOld=yMin; } return yDiff; } Again, I fail to see how this crash can happen in getHeightDiff. If there was something wrong with the array getMaxHeight() should've crashed first. Also note that the array is thread-private - so it can't be a multi-threading issue. This code is run in a thread of a thread-pool as a Future. I'm a bit stranded. Anyone any ideas? Should I send the full source somewhere? The application was compiled with JET 7.2 MP1 and the crash is not reproducable. It's weird that I get crash reports of NullPointerExceptions from all over the place from various machines. The user ran this under Windows 7 on a dual-core machine. Cheers, Simon
  18. Yet another NullPointerException

    I still cannot reproduce the problem reliably. The application crashed on my machine too once, but after the single crash it worked perfectly fine again. Do you have any suggestions what I could try next? Can you help?
  19. Yet another NullPointerException

    Yes we use several native libraries: LWJGL, NativeBass and BASS. I ran the app several hundred times by now for hours and have yet to reproduce it. It happens approximately once every 5'000 runs of our game. Anyone can download the game from our website. I couldn't identify a pattern of the crashes: Sometimes it crashes early on, sometimes only after an hour - sometimes here, sometimes there.
  20. Yet another NullPointerException

    I'm seeing a pattern here. I get more reports from random NullPointerExceptions all over the place every day. And 99% of the time I can't understand how that could've happened. So far I couldn't reproduce the problem on my machine - it seems to happen very seldom.
  21. Calling a compiled DLL from .NET C#

    Might want to try 7.2. It's there. If you still can't find it, I attached the sample to this post. CSharpMain.zip
  22. NullPointerException in String.format

    Which part of the code are you referring to? You mean I should stress-test String.format("%d %05.2f",a, ? Or another part?
  23. Hello everyone another (anonymous) player has sent us a stacktrace of a crash: java.lang.NullPointerException at java.util.AbstractList$Itr.hasNext(AbstractList$Itr.class:0) at net.gewaltig.cultris.gui.OpenGLGUI.update(OpenGLGUI.java:190) at net.gewaltig.cultris.tools.UpdateManager.update(UpdateManager.java:63) at net.gewaltig.cultris.Cultris.main(Cultris.class:98) and here's the relevant method: public boolean update(float _dt) throws Exception { if(Display.isCloseRequested()) return true; Iterator<CMenu> it=menus.iterator(); while(it.hasNext()) { CMenu cur=it.next(); if(cur.fade==0 && cur.fadeV==0) { it.remove(); cur.deinit(); } } } The user ran this on a quad-core machine under Windows 7 x86, again with plenty of free memory. The relevant list (menu) is an ArrayList and is never ever accessed by any other thread. "cur.deinit()" does not modify the menu ArrayList. How can this break? Cheers, Simon By the way: I'd enjoy reading new blog posts
  24. My fault: update() was overloaded and the exception was caused by a bug in the other method. Sorry to bother, Simon