我是MAC开发新手,最近我创建了一个mac应用程序。我的应用程序在MAC OS 10.7.2上工作正常但在OS 10.7.3上崩溃了。最初,应用程序工作正常但在我升级我的操作系统版本后,它开始崩溃,崩溃日志异常:
Exception Type: EXC_ARITHMETIC (SIGFPE)
Exception Codes: EXC_I386_DIV (divide by zero)
Application Specific Information:
objc[4541]: garbage collection is OFF
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.paragoni.sp 0x000000010002674b -[MyWindowController populateImportedTracksArray] + 1067 (MyWindowController.m:6363)
1 com.paragoni.sp 0x000000010000ce96 -[MyWindowController awakeFromNib] + 7476 (MyWindowController.m:500)
2 com.apple.CoreFoundation 0x00007fff87665021 -[NSObject performSelector:] + 49
3 com.apple.CoreFoundation 0x00007fff87664fa2 -[NSSet makeObjectsPerformSelector:] + 274
4 com.apple.AppKit 0x00007fff8e4bfb2f -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1245
5 com.apple.AppKit 0x00007fff8e4b609f loadNib + 322
6 com.apple.AppKit 0x00007fff8e4b559c +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
7 com.apple.AppKit 0x00007fff8e4b54b7 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
8 com.apple.AppKit 0x00007fff8e4b53fa +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
9 com.apple.AppKit 0x00007fff8e7289b3 NSApplicationMain + 398
10 com.paragoni.sp 0x0000000100001dac 0x100000000 + 7596
我无法理解错误原因。这个错误是由于我的代码中的错误还是由于我的升级造成的。请指导我......
答案 0 :(得分:3)
文件MyWindowController.m
的第6363行有一个除零。
异常代码明确指出“除以零”,并且callstack的顶部告诉您它发生的确切位置(当源文件已知时,它以“filename:linenumber”格式显示)。 / p>