Android calls C + + appears to collapse, the crash message is as follows:
110-11 15:15:13.541 d/audiomtkstreamout (139): Write (), buffer = 0x42bd9390 bytes = 8192 mlatency = 92210-11 15:15:13.562 I/powermanagerservice (513): Setbrightness mbuttonlight, screenbrightness=245310-11 15:15:13.575 I/debug (9136): R0 40000001R1 61e2a7a8 R2 becc2224 R3 becc2220410-11 15:15:13.575 I/debug (9136): R4 40000001R5 61e2a7a8 R6 5f5501a0 R7 61e2a768510-11 15:15:13.575 I/debug (9136): R8 BECC25BC R9 41b76d00 SL 41b70020 FP becc25d4610-11 15:15:13.575 I/debug (9136): IP 00000000 SP becc220c lr 60e6abd7 pc 610a672e CPSR 00000030710-11 15:15:13.575 I/debug (9136):810-11 15:15:13.575 I/debug (9136): BackTrace:910-11 15:15:13.575 I/debug (9136): #00 pc 006d372e/data/data/com.linekong.dgr.langang/files/so_path/libgame.so ( Cocos2d::ccdictionary::setobject (cocos2d::ccobject*, std::stringConst&) +1)Ten10-11 15:15:13.575 I/debug (9136): #01pc 000203C4 [Stack] One10-11 15:15:13.575 I/debug (9136): A10-11 15:15:13.575 I/debug (9136): Stack: -10-11 15:15:13.575 I/debug (9136): becc21cc 40049b30/system/lib/libc.so (malloc+20) -10-11 15:15:13.575 I/debug (9136): becc21d0 00000025 the10-11 15:15:13.575 I/debug (9136): Becc21d4 612BFD8C/DATA/DATA/COM.LINEKONG.DGR.LANGANG/FILES/SO_PATH/LIBGA Me.so (operatorNew(unsignedint) +24) -10-11 15:15:13.575 I/debug (9136): Becc21d8 00000008 -10-11 15:15:13.576 I/debug (9136): BECC21DC 61e2a794 -10-11 15:15:13.576 I/debug (9136): becc21e0 61e2a794 +10-11 15:15:13.576 I/debug (9136): Becc21e4 612aa388/data/data/com.linekong.dgr.langang/files/so_path/libgame.so -10-11 15:15:13.576 I/debug (9136): Becc21e8 61e2a7d4 +10-11 15:15:13.576 I/debug (9136): Becc21ec 60eb781b/data/data/com.linekong.dgr.langang/files/so_path/libgame.so A10-11 15:15:13.576 I/debug (9136): becc21f0 61e2a794 at10-11 15:15:13.576 I/debug (9136): Becc21f4 00000008 -10-11 15:15:13.576 I/debug (9136): Becc21f8 becc2220 [Stack] -10-11 15:15:13.576 I/debug (9136): BECC21FC becc2224 [Stack] -10-11 15:15:13.576 I/debug (9136): becc2200 df002777 -10-11 15:15:13.576 I/debug (9136): becc2204 E3A070AD -10-11 15:15:13.576 I/debug (9136): becc2208 61e2a768 in10-11 15:15:13.576 I/debug (9136): #00 becc220c 40000001 -10-11 15:15:13.576 I/debug (9136): becc2210 61e2a7a8 to10-11 15:15:13.576 I/debug (9136): becc2214 5f5501a0 +10-11 15:15:13.576 I/debug (9136): becc2218 61e2a768 -10-11 15:15:13.576 I/debug (9136): becc221c 60E6ABD7/DATA/DATA/COM.LINEKONG.DGR.LANGANG/FILES/SO_PATH/LIBGA Me.so (Ccjsondata::setstringvalue (std::string, std::string) +58) the10-11 15:15:13.576 I/debug (9136): becc2220 5f5501a0 *10-11 15:15:13.576 I/debug (9136): becc2224 61e2a7d4 $10-11 15:15:13.576 I/debug (9136): becc2228 becc231c [Stack]Panax Notoginseng10-11 15:15:13.576 I/debug (9136): becc222c 614BA9F0/DATA/DATA/COM.LINEKONG.DGR.LANGANG/FILES/SO_PATH/LIBGA Me.so
How do we look at the crash point at this time, you can use Address2line.
My Mac version of ndk_r8e, which is located in
$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86_64/bin
;
You can add this path to the environment variable and execute the following command in the project's root directory.
Arm-linux-androideabi-addr2line-c-f-e obj/local/armeabi/libxxx.so <address>
The address here is the starting point for the crash, #00 the one at the back of the PC. Like we can see the crash information on line 9th gets the address 006d372e.
Arm-linux-androideabi-addr2line-c-f-e obj/local/armeabi/libxxx.so 006d372e
Can see the last wait for this information
./arm-linux-androideabi-addr2line-c-f-e obj/local/armeabi/libgame.so 006d372e
Cocos2d::ccdictionary::setobject (cocos2d::ccobject*, std::string const&)
/users/chuanwei/project/battlegirl/project/battlegirl/proj.android/game/. /.. /.. /cocos2dx/cocoa/ccdictionary.cpp:213
finally found a problem.
Address2line positioning Android C + + crash location