Application carsh without exception or error in the logs

I’m developing a game for iOS and Android with cocos2dx.

Only on Android the application sometimes crash without any indication in the logs or tombstones crash dump files (the application exits unexpectedly).

Any ideas why I don’t see any logs?

Some environment information:

  • In some cases that I already resolved, the crash was a result of doing some UI operation from a non UI thread.
  • I test the application on a GT-I9300 device with Android 4.1.2 (rooted).
  • The compilation flags include DDEBUG=1DCOCOS2D_DEBUG=1 ~~DNDK_DEUBG=1
    ~~ I do see CCLogs output.

Thanks.

Check the virtual memory usage of your application.
Android allows some amount memory per application. (32mb is the least i think, depends on mobile too)
If the memory usage crosses that particular value, android just kills the application without any error message or warnings.

Thanks!

I reduced the amount of memory that the images in my application are using.
For now I don’t see this issue anymore.

I done that by calling CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA4444);
as suggested in by James Chen this thread: http://cocos2d-x.org/boards/6/topics/5876.

You can use the native side of an app to get more memory for your app tho, c++ allocated memory does not get counted towards your app memory usage.