Android application works nice in emulator, but SIGBUS on device
I'm doing an application that's uses a library to parse xml, compiled with ndk. For some reason the application works just right in android emulator, but when used in a device doesn't.
More precisely after increasing a pool of memory, when assigning a value to the next free space of that pool, just like this:
*(pool->ptr) = 0
I have hear开发者_如何学Cd here, that in some cases the emulator just "passes by" some situations like this just simply by printing or using the memory without crashing the application.
I'm having some trouble trying to find the reason for this and more trouble to find the solution, can some one help me. Many thanks in advance. All the help is welcome.
精彩评论