Results 1 to 15 of 15
  1. #1
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default Java Result: 255

    Is there a place where I can lookup those codes and their meaning?

    My game is crashing once in a while for no apparent reason. It is rare, but having no idea what it means defeats the purpose of the message. There is no error message except "Java Result: 255". I have once or twice seen a huge negative number.

    I googled it but didn't find anything interesting. Java.com wasn't informative, at all, but I should've known that in advance. Was worth a try anyway.

    So is there some kind of repository with the result codes and their meaning? Somewhere?

    Thanks! :)

  2. #2
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    There is not, I'm afraid. I've looked before (and again today, for this thread) to no avail. You'd think it would be documented somewhere.

    There should be more output above the line beginning in "Java Result"... usually a message of some kind starting with [java].

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  4. #4
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default

    That's the thing. Nothing else. Not even an error report log. A single, lonely line spewed on Netbean's debug "console". :(

  5. #5
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    Quote Originally Posted by Fubarable View Post
    Perhaps the error is coming from the OS? For e.g., Windows System Error Codes
    It might, but what would these mean (in context of Java, I mean):
    The extended attributes are inconsistent. (255)
    The parameter(s) passed to the server in the client/server shared memory window were invalid. Too much data may have been put in the shared memory window.(0x255)

  6. #6
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default

    @Fubarable
    I highly doubt Windows would give me a "Java Result: 255", but who knows. lol

    If it is, then why isn't that mentioned on Oracle's site? I mean, shouldn't they tell us something like: In case there's an unrecoverable error, Windows might, under certain circumstances, pass an error code that would be reported by java like so: Java Result: #"

    Beats me... I'll check that MSDN link.

    Thanks.

  7. #7
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default

    Zack beat me to it as I was writing my reply. I guess no need to check it out then.

    Maybe I'll get a report one day where it'll help me debug. So sad.

  8. #8
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    I've discovered that they are not Windows System Codes.

    A user here has found a Java Result: 1 error because of a missing file. Windows System Error 1 is an incorrect function.

    Unfortunately, that brings me back to being stumped.

    PS: Hmmm... OP, do you try to access any files in your program? You know, stuff saved on the hard drive via File I/O.

  9. #9
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default

    Nope.

    The crash happens while I'm "flying" through the galaxy, going from one octree leaf to the other. It can take 5 mins to happen or 15 or 2. But, as I've said, it's pretty rare. :/

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    It can take 5 mins to happen or 15 or 2.
    That totally sounds like a concurrency issue. If your game GUI is in Swing, are you respecting Swing's single threaded rule?

    db

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    The exit value is set in the code. All that you can infer from the '255' is that your program is terminating in response to a System.exit(255); call.

    In any case, it's probably not important. What is important is to remove the anomaly that results in abnormal termination.

    db

  12. #12
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default

    Quote Originally Posted by Darryl.Burke View Post
    The exit value is set in the code. All that you can infer from the '255' is that your program is terminating in response to a System.exit(255); call.

    In any case, it's probably not important. What is important is to remove the anomaly that results in abnormal termination.

    db
    Couldn't agree more.

    I'm not using Swing.

    I did have some Concurrency issues earlier but since then I've implemented a fix for it. This problem happened at one and only one place though, so I haven't implemented it elsewhere...

    During the building of the leafs some would come up empty and removing those empty leafs wouldn't happen as it was done. That's where I was having concurrency issues.

    The way it is set now is that by the time you can move the ship, the galaxy has been generated, the empty leafs removed and nothing is using the cleanup part of the code. It's used only once. The rest of the time it's only iterating through it.

    Although the entire class implements Runnable, I wonder if that could crash the app, even if the cleanup routine isn't called. Would that be possible? run() is only called once (the cleanup part is in it). Would a concurrent iteration crash the game without any error whatsoever (except for Java Result: 255 that is)?

  13. #13
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    run() is only called once
    If you're actually calling run() in your code, you don't need to implement Runnable.

    The correct way to launch a Runnable in a new thread is via the Thread constructor that takes a Runnable and Thread#start()

    db

  14. #14
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    Also, since you're not using Swing, what GUI toolkit are you actually using?

    db

  15. #15
    MadJack is offline Member
    Join Date
    Sep 2010
    Location
    Qc
    Posts
    31
    Rep Power
    0

    Default

    Quote Originally Posted by Darryl.Burke View Post
    If you're actually calling run() in your code, you don't need to implement Runnable.

    The correct way to launch a Runnable in a new thread is via the Thread constructor that takes a Runnable and Thread#start()

    db
    Sorry about the confusion. It's just that I renamed my parametered constructor run.

    Then again, maybe I'm doing things the wrong way. It's quite possible too. I'm still inexperienced in Java as it is. Learning every day I have to say, and I'm quite happy with the results so far, but there are many many things I know nothing about.

    The class does implement Runnable. The reason why I'm not using run() is that I'm unsure how to hook it up properly with the rest of the code. I'm currently reading about threading but I haven't found a tutorial that rings right to me. Not that those are not informative, just that they're not explaining what I want/need to know to implement what I want.

    As for your second question, I don't use a GUI per say. I'm using jMonkeyEngine3 with jMonkeyPlatform (a Netbeans fork made especially for jMonkeyEngine).

    BTW, just had the crash after flying around for 10 mins. I let Windows reporting tool/crash handling prompt me for "Close Program" then got the 255 message.

Similar Threads

  1. How to format the result
    By galagali in forum New To Java
    Replies: 3
    Last Post: 07-11-2010, 12:15 AM
  2. Problem with the result of the implementation
    By ŖΫ ỏ Ңόρę in forum New To Java
    Replies: 5
    Last Post: 01-11-2010, 05:33 AM
  3. uncorrect result
    By jamborta in forum New To Java
    Replies: 3
    Last Post: 11-11-2009, 01:17 PM
  4. problem in get result than SQL to jtable
    By MS_Dark in forum New To Java
    Replies: 0
    Last Post: 12-13-2008, 12:52 PM
  5. getting a random result
    By gradon in forum New To Java
    Replies: 2
    Last Post: 07-19-2007, 03:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •