Works in HTML, not in Android Emulator
Monkey Forums/Monkey Programming/Works in HTML, not in Android Emulator
| ||
I'm getting a "Monkey runtime error: Null object error" in the Google Android Virtual Device with code that runs fine in the HTML5. How the heck do I debug this? (This is why I think I need Eclipse or Netbeans... AMIRITE?!) :-) |
| ||
Post some code which reproduces the error, it sounds like a Monkey error "Monkey runtime error"... |
| ||
You should post which Monkey version you're using and if it ran in other outputs, like GLFW and Flash. GLFW, I find, tends to be the most strict about the way you can write some code. Also, with the new debugging, if it has an error the debugger catches it, I think. |
| ||
therevills, I have no idea what code causes the error, especially since it works fine in HTML5. So I figure I need to run it from Eclipse/Netbeans. Would you say that's my next step? Or should I drill down in Jungle and try to find the monkey source of the problem? Nicholas, it runs fine in HTML5. I'll try the GLFW target when I get a chance. |
| ||
Turn debug on... I usually find this error for missing images or drawing frames that dont exist. If debug is on, the game will pause (but sometimes doesn't give you an error) Put debug on and run on android should tell you the line number Rich |
| ||
The error should give you a line number where the problem lies if you compile it as debug. If it doesn't, you should be able to get the error messages using ddms (it came with the android sdk). Select the emulator as the device you want to inspect and simply wait for the crash message to appear in the event log. There should be a better trace there. |
| ||
Rich and Nobuyuki, thanks for the hints. I turned on debug and I can see the line numbering now. At least it's getting me closer! |