Problem upgrading from android-8 to android-11

Problem upgrading from android-8 to android-11
0.0 0


I am trying to upgrade my OpenFeint wrapper implementation to see if any of the NDK changes from version 9 and up would fix the random crashes I get (, just to find out that the application will crash initializing OpenFeint in a point where android-8 worked fine. The stacktrace points to the problem as

04-25 15:04:09.110: I/DEBUG(8873): #00 pc 00015c1c /system/lib/
04-25 15:04:09.110: I/DEBUG(8873): #01 pc 0001cd88 /system/lib/ (__assert2)
04-25 15:04:09.110: I/DEBUG(8873): #02 pc 0014d5be /data/data/ (_ZN7cocos2d13CCApplication17sharedApplicationEv)
04-25 15:04:09.110: I/DEBUG(8873): #03 pc 001202c6 /data/data/ (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause)

and there is no human way for me to debug it. Maybe is it related to Bug #860 (


Add2line.exe debugging tool has help me decipher past log files and all of them point to an error in Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause in the MessajeJNI.cpp file


So I followed the rabbit all the way to

void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause()

where I found out that CCApplication::sharedApplication() is causing the crash. I dug deeper to CCApplication_Android.cpp

CCApplication& CCApplication::sharedApplication()
CC_ASSERT(sm_pSharedApplication); // sm_pSharedApplication is 0x0 and causes the crash
return *sm_pSharedApplication;