- Home /
Solving a crash with help from logcat
Hey friends,
I'm not asking for hand - holding here, just guidance so that I can attempt to figure the issue out for myself. I'm building a game for the Ouya (Android) but any time I go into the main scene, the entire game crashes. I've literally gone to disabling EVERYTHING in the scene, and it still crashes. Not understanding, since nothing should be active. Obviously I'm not giving you enough to go on, but am hoping someone might be able to help me understand the Android Unity Debugger. I've watched tutorials on it, read the docs, but whenever I run it I see the debugging boxes, but they're always blank. The way I've ran it is:
Have "Development Build" and "Script Debugging" checked. Click "Build and Run" - (am pushing to Ouya at this point) Click "Assets - Sync MonoDevelop Project" In MonoDevelop click "Run - 'Select which project" but then I'm stuck. I know that the project is attached since when it crashes that instance of Monodevelop ends, but that's not helping me find the bug. Look, I know this is a basic, noobish question and I REALLY appreciate even a point in the right direction. Thanks so much, and God bless.
EDIT: Well, I've got a logcat, but have no idea what it means. Yes, I'm begging. I've got no idea how to fix this crash, or even what might have caused it based on the logs, because I'm so inexperienced at debugging that I don't even know what I'm looking for. If anyone is uncomfortable downloading the logcat file (and I don't blame you in any way, shape, or form) I'll be happy to paste it below. It's just SO MUCH text that I thought I'd tick everyone off by dumping it here. Thanks for your understanding. LOGCAT FILE
EDIT 2:
Ok, after skimming through the logcat, I've found this, but I don't know what it's telling me:
I/InputDispatcher( 315): Window 'Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}' spent 970.4ms processing the last input event: MotionEvent(action=2, deviceId=2, source=0x01000010)
I/InputDispatcher( 315): Window 'Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}' spent 947.3ms processing the last input event: MotionEvent(action=2, deviceId=2, source=0x01000010)
I/InputDispatcher( 315): Window 'Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}' spent 611.1ms processing the last input event: MotionEvent(action=2, deviceId=2, source=0x01000010)
I/InputDispatcher( 315): Window 'Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}' spent 588.8ms processing the last input event: MotionEvent(action=2, deviceId=2, source=0x01000010)
I/InputDispatcher( 315): Window 'Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}' spent 488.0ms processing the last input event: MotionEvent(action=2, deviceId=2, source=0x01000010)
I/InputDispatcher( 315): Window 'Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}' spent 477.0ms processing the last input event: MotionEvent(action=2, deviceId=2, source=0x01000010)
W/InputDispatcher( 315): channel '420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity (server)' ~ Consumer closed input channel or an error occurred. events=0xd
E/InputDispatcher( 315): channel '420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher( 315): Attempted to unregister already unregistered input channel '420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity (server)'
I/WindowState( 315): WIN DEATH: Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}
I/ActivityManager( 315): Process com.DisintegrationGames.Rionon (pid 3762) has died.
W/WindowManager( 315): Force-removing child win Window{420cc630 SurfaceView paused=false} from container Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}
W/ActivityManager( 315): Force removing ActivityRecord{421d9740 com.DisintegrationGames.Rionon/.OuyaNativeActivity}: app died, no saved state
I/WindowManager( 315): WINDOW DIED Window{420d0ab8 com.DisintegrationGames.Rionon/com.DisintegrationGames.Rionon.OuyaNativeActivity paused=false}
I/InputDispatcher( 315): Dropping event because there is no focused window or focused application.
You may have more luck debugging it in eclipse or android studio (I honestly don't know, have been wanting to start developing on Ouya). Do you know if Ouya has a LogCat interface? That would most certainly have to shed some light on the problem.
To see what is heppening on the android side, you really want the Logcat output.
Here is some info on Logcat: http://developer.android.com/tools/debugging/debugging-log.html
However, as @supernat stated, using eclipse would be very beneficial since it has logcat integrated (with the android plugin) so you can get real time android debugging.
This is probably your best route, get your eclipse android environment setup, and watch the logs from there.
You will still do everything in unity, just have eclipse running when you try and play on your Ouya device (and have Ouya hooked to your computer).
you both rock, and I thank you. adb has been giving me fits on the Ouya side, so I had been trying to skirt around it. Despite the fact that it used to find the Ouya with ease, it no longer does so. I've edited my android_winusb.inf file in every environment location I can think of, but nothing works. From what I'm gathering from Uncle Google, this is something that's vexed quite a few people, but have yet to actually find a solution. EDIT: Added a logcat file to post.
When it crashes, there should be some sort of stack trace to show where the error occurred. Unfortunately, I have no idea about Ouya, and cannot decipher the log.
been staring at these logs for hours, keep making new ones, and can't make hide nor hair of them. Googled "WIN DEATH" and it appears to be an ANR issue (non - responsive app) where Android assumes since there's nothing on the UI thread that the app must have died. Unfortunately, I have everything loaded up on the front of the app, so it takes a moment to get the game going out of the gate, but then there's no loading later on. I can get away with that on Windows, maybe Android isn't too keen on it though...