私は現在、ユーザーが画像をドラッグアンドドロップしてアップロードできるようにする Mac 用の Imgur のクライアントをコーディングしています。UploadToImgur 関数のコーディングを終えたところですが、次の場所で SIGABRT エラーが発生しています。
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **)argv);
}
明確にするために、コーディングしたアップロード ボタンをクリックすると、SIGABRT エラーが発生します。これは基本的に画像を取得し、それを NSData に変換して、uploadToImgur に送信します。該当する両方の機能のコードを提供できます。
コンソールには次のように表示されます。
2013-11-04 16:04:22.641 Popup[11274:303] Uploading image.
2013-11-04 16:04:33.602 Popup[11274:303] Server reached successfully.
2013-11-04 16:04:33.603 Popup[11274:303] URL: (null)
2013-11-04 16:04:33.603 Popup[11274:303] *** Assertion failure in -[NSTextFieldCell _objectValue:forString:errorDescription:], /SourceCache/AppKit/AppKit-1265/AppKit.subproj/NSCell.m:1637
2013-11-04 16:04:33.606 Popup[11274:303] An uncaught exception was raised
2013-11-04 16:04:33.606 Popup[11274:303] Invalid parameter not satisfying: aString != nil
2013-11-04 16:04:33.606 Popup[11274:303] (
0 CoreFoundation 0x00007fff92fd441c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8f69fe75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff92fd41f8 +[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff90ff9c61 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4 AppKit 0x00007fff8ba4f918 -[NSCell _objectValue:forString:errorDescription:] + 159
5 AppKit 0x00007fff8ba4f86a -[NSCell _objectValue:forString:] + 20
6 AppKit 0x00007fff8ba4f7d8 -[NSCell setStringValue:] + 41
7 AppKit 0x00007fff8bacb584 -[NSControl setStringValue:] + 138
8 Popup 0x0000000100004983 __39-[PanelController btnUploadWasClicked:]_block_invoke_2 + 131
9 libdispatch.dylib 0x00007fff895d71d7 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fff895d42ad _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff895dbf03 _dispatch_main_queue_callback_4CF + 333
12 CoreFoundation 0x00007fff92f3b839 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13 CoreFoundation 0x00007fff92ef6b14 __CFRunLoopRun + 1636
14 CoreFoundation 0x00007fff92ef6275 CFRunLoopRunSpecific + 309
15 HIToolbox 0x00007fff8e217f0d RunCurrentEventLoopInMode + 226
16 HIToolbox 0x00007fff8e217cb7 ReceiveNextEventCommon + 479
17 HIToolbox 0x00007fff8e217abc _BlockUntilNextEventMatchingListInModeWithFilter + 65
18 AppKit 0x00007fff8ba1028e _DPSNextEvent + 1434
19 AppKit 0x00007fff8ba0f8db -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
20 AppKit 0x00007fff8ba039cc -[NSApplication run] + 553
21 AppKit 0x00007fff8b9ee803 NSApplicationMain + 940
22 Popup 0x00000001000018b2 main + 34
23 Popup 0x0000000100001884 start + 52
)
2013-11-04 16:04:33.610 Popup[11274:303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff92fd441c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8f69fe75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff92fd41f8 +[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff90ff9c61 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4 AppKit 0x00007fff8ba4f918 -[NSCell _objectValue:forString:errorDescription:] + 159
5 AppKit 0x00007fff8ba4f86a -[NSCell _objectValue:forString:] + 20
6 AppKit 0x00007fff8ba4f7d8 -[NSCell setStringValue:] + 41
7 AppKit 0x00007fff8bacb584 -[NSControl setStringValue:] + 138
8 Popup 0x0000000100004983 __39-[PanelController btnUploadWasClicked:]_block_invoke_2 + 131
9 libdispatch.dylib 0x00007fff895d71d7 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fff895d42ad _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff895dbf03 _dispatch_main_queue_callback_4CF + 333
12 CoreFoundation 0x00007fff92f3b839 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13 CoreFoundation 0x00007fff92ef6b14 __CFRunLoopRun + 1636
14 CoreFoundation 0x00007fff92ef6275 CFRunLoopRunSpecific + 309
15 HIToolbox 0x00007fff8e217f0d RunCurrentEventLoopInMode + 226
16 HIToolbox 0x00007fff8e217cb7 ReceiveNextEventCommon + 479
17 HIToolbox 0x00007fff8e217abc _BlockUntilNextEventMatchingListInModeWithFilter + 65
18 AppKit 0x00007fff8ba1028e _DPSNextEvent + 1434
19 AppKit 0x00007fff8ba0f8db -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
20 AppKit 0x00007fff8ba039cc -[NSApplication run] + 553
21 AppKit 0x00007fff8b9ee803 NSApplicationMain + 940
22 Popup 0x00000001000018b2 main + 34
23 Popup 0x0000000100001884 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
何か案は?より多くの情報を提供できます。