johnezang / JSONKit

Objective-C JSON
6.21k stars 1.65k forks source link

JSONKit Appears to be causing crashes, EXC_ARM_DA_ALIGN #102

Open spckj opened 12 years ago

spckj commented 12 years ago

My App uses JSONKit and I recently checked the crash report and received some interesting crashes. There seems to be an error in jk_collectionClassLoadTimeInitialization causing EXC_ARM_DA_ALIGN. This is all a little low level for me to understand, but below is the crash report.

Hardware Model: iPhone3,3 Code Type: ARM (Native) OS Version: iOS 6.0 (10A403) Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: EXC_ARM_DA_ALIGN at 0x00000001 Crashed Thread: 0

Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 My App 0x000d77e8 jk_collectionClassLoadTimeInitialization (JSONKit.m:629) 1 dyld 0x2fe23628 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 16 2 dyld 0x2fe20a3a ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 382 3 dyld 0x2fe20874 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 36 4 dyld 0x2fe17d04 dyld::initializeMainExecutable() + 172 5 dyld 0x2fe1a85c dyld::_main(machoheader const, unsigned long, int, char const, char const, char const_, unsigned long) + 1804 6 dyld 0x2fe1732c dyldbootstrap::start(machoheader const, int, char const__, long, machoheader const, unsigned long*) + 604 7 dyld 0x2fe17064 _dyld_start + 60

Thread 0 crashed with ARM Thread State (32-bit):

dyld armv7

pianofab commented 12 years ago

Can you confirm you are using the latest version of JSONKit? On my machine line 629 is the blank line after "static size_t _JKDictionaryInstanceSize = 0UL;"

Bo98 commented 12 years ago

Line 629 is a blank line here too.

https://github.com/johnezang/JSONKit/blob/master/JSONKit.m#L629

spckj commented 12 years ago

I was pretty positive that I had the most recent version, however mine also didn't line up line for line with the code that is in that .m. There was a 9 or so line difference. I updated my jsonkit.m file, but I can't be sure if this issue will go away until another build is on the store for a while.

pianofab commented 11 years ago

Please confirm that you are not using JSONKit within an application compiled with ARC. (JSONKit is not compatible with ARC, see documentation.)