简体   繁体   中英

DJI SDK iOS crash

DJI SDK iOS community I have been connecting the M300 and this crash has happening me randomly, any idea how to mitigate this issue?

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000bbf6e3070

Crashed: Thread
0  libobjc.A.dylib                0x1cf4 objc_msgSend + 20
1  DJISDK                         0xa3e920 GetIsFCConnectedHandle(unsigned long long) + 51100
2  DJISDK                         0x204288 mop_link_layer_recv + 128
3  DJISDK                         0x204f1c mop_link_layer_node_init + 2908
4  libsystem_pthread.dylib        0x3348 _pthread_start + 116
5  libsystem_pthread.dylib        0x1948 thread_start + 8

Your problem is most likely caused by incorrect initialisation in conjunction with a network related event, say an inbound data packet. Inbound data handling often use the words "recv" in their name.

Your third party code is trying to message an object at a too low an address (but not around zero). This usually means that some base pointer is nil, but some other value has been added to it, and that is the address being used.

Notice that your code is called from GetISFCConnectedHandle, and it takes a likely pointer-like argument. This is often a tell tale of code which has pointers to handler objects stored in data structures.

The first thing is to check configuration and initialisation data structures for your SDK and its associated hardware. The next thing to do is to enable the different sanitisers (address sanitiser for example) or use the memory allocations instrument to see the history of the system up until the crash. Then you'll have context as to what is going on.

The official resource for sanitisers is https://developer.apple.com/documentation/xcode/diagnosing-memory-thread-and-crash-issues-early

I also have a book which goes over similar ground and gives some tips. Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM