Works in HTML, not in Android Emulator

Monkey Forums/Monkey Programming/Works in HTML, not in Android Emulator

c.k.(Posted 2012) [#1]
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?!) :-)


therevills(Posted 2012) [#2]
Post some code which reproduces the error, it sounds like a Monkey error "Monkey runtime error"...


Goodlookinguy(Posted 2012) [#3]
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.


c.k.(Posted 2012) [#4]
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.


pantson(Posted 2012) [#5]
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


Nobuyuki(Posted 2012) [#6]
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.


c.k.(Posted 2012) [#7]
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!