Any idea on this? Any help would be greatly appreciated.
Unity 3.4 Android Basic, Galaxy S. The game is a simple one, more like a picture viewer. It has some buttons (cubes), UI elements (labels) and a very simple AI. It does have save game functionality, but only when the player advances a level.
After playing around 10-20 minutes it blinks (or not even blinks) and whoops it disappeared. (Crashed eventually.) In case of every ‘death’ the game was cc. idle. (I was thinking.)
adb logcat has the following not too verbose information (//comments by me)
I/Unity (13928): UnityEngine.Debug:Log(Object) //Debug.Log...
I/Unity (13928): msgAPI:setText() //setting the label of a text in msgAPI script
I/Unity (13928): msgAPI:FixedUpdate() //msgAPI's FixedUpdate function
I/Unity (13928):
I/Unity (13928): (Filename: /Applications/buildAgent/work/8xxxxxxxxxxx52/Runtime/Export/Generated/UnityEngineDebug.cpp Line: 34)
I/Unity (13928):
E/dalvikvm-gc(13928): Could not create 1196032-byte ashmem mark stack: Too many open files**
E/dalvikvm-heap(13928): dvmHeapBeginMarkStep failed; aborting
E/dalvikvm(13928): VM aborting
D/Zygote ( 3172): Process 13928 terminated by signal (11)//Dies
I guess the culprit is somewhere around the “too many open files” error. But what could this mean? I only have textures loaded via the editor (ie no streaming assets).
So ok maybe it’s due to some parts of the program… but… I only user primitive variables, a few classes and a few built-in arrays.
Also… objects are not created in any of the Update/FixedUpdate functions, the only problem I could imagine if I created objects too fast (like in an update) and the GC couldn’t deal with it.
PS.: One thing came to my mind. Is it legal to use
renderer.material.SetTextureOffset(“_MainTex”, somethingVector2)
at will? Or does it go into file reading when called?.. Erm, I’m out of ideas atm.
Update: I wrote a script so my PC played the game in the Editor’s Play window. The game ran w/o errors for 1 hour+. Now I’m puzzled.
Another thing I'd suspect is logging. Try to get rid of any continuous logging (you should do that anyway), to see if that fixes it.
– Waz