Program crashes after about 1 min wihout any touch?

Program crashes after about 1 min wihout any touch?
0.0 0


Hello, all.

I almost finished my prototype of game, but I faced a serious problem : (

That is, after I run my program for a period (I just put it away and don’t touch the screen), it crashes…

The logcat message is :
I/wpa_supplicant( 224): CTRL-EVENT-SCAN-RESULTS Ready
I/wpa_supplicant( 224): wpa_disabled_ssid_list_clear
V/WifiMonitor( 99): Event [wpa_disabled_ssid_list_clear]
D/dalvikvm(15453): GC_FOR_MALLOC freed 2140 objects / 510800 bytes in 62ms
E/dalvikvm-heap(15453): 5040-byte external allocation too large for this process.
E/dalvikvm(15453): Out of memory: Heap Size=2587KB, Allocated=2413KB, Bitmap Size=4KB, Limit=13756KB
E/dalvikvm(15453): Trim info: Footprint=3271KB, Allowed Footprint=3271KB, Trimmed=684KB
E/GraphicsJNI(15453): VM won’t let us allocate 5040 bytes

It seems that I use too much memory, but I don’t touch the screen so there should not be any new allocation of memory….

Does anyone know what way that I can find the cause of this problem?

Thanks !


By the way, I don’t use any scheduler for my program, so I am sure there should not be any new allocation of memory /_\


‘Out of memory’, maybe your application exists memory leak.


Thanks for the reply.

I know it might cause by memory leak.

So, if it crashes when I play the game, I will believe the cause might be my memory management problem.

However, it crashes when I don’t press any button and screen on it. How could it be~ : (



Sounds like the leaky code is being called every frame. Check your update function. Alternatively try a leak detector: