Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time I check the development build, my game crashes just after turning my screen black.

To be more specific, I've tried to create a development build of my game using Unity 5.3 on Windows 8. I checked "Development Build" and "Autoconnect profiler" or "Script debugging".

When I hit "Build & Run" everything works as expected. The player on the device starts (initial black screen) and stays in this situation for some seconds. After that I receive two messages in the Unity Editor console which are saying:

Sending message header failed

...and my game crashes instantly on the phone.

I can't understand why it's not working. I've installed adb, the result from adb-devices give me this:

List of devices attached
420384c5cc7b3100        device

I really don't understand what's going on here (it gives me other problems too, but I won't talk about them here)...

What could be causing this issue?

P.s. I thought it was implicit, but when I uncheck the "Development build", everything works and my game runs as expected.

share|improve this question
    
I'm having the exact same issue, same console message, have you ever found a solution? When in Development mode, my app crashes 9 out of 10 times so it makes really hard to work with Profiler. (sorry, can't add comment so adding as answer). – giber Jun 23 '16 at 22:25
    
have you tried running it without the profiler connected? as i'm pretty certain the profiler is killing your application since it gives almost 95%+ overhead on PC builds (simple builds) it will kill any tablet/smart phone easily. – Daniel Netzer Jun 23 '16 at 22:35
    
I've occasionally had changing build settings cause a crash due to a different order of execution of my startup scripts. In one type of build the scripts would just happen to execute in the right order; in another build type a script would Start() before another script had initialized it and throw an exception I didn't check for. Looking carefully for initialization order dependencies helped me isolate the problem. Not sure if that might be relevant in this case. – DMGregory Jun 24 '16 at 0:20
    
Hi, thanks for all the comments and sorry for not answering immediatly, however I haven't found any solution yet (only avoided using dev builds). I think that the profiler wasn't connected, but I'll try again. About the order of execution, in my game it just matter that OnEnable fires before Start, so I think there's no problem in my case. However I'll try creating a new and empty game and try the dev build from that one – Andrea Dragotta Jun 28 '16 at 7:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.