在抛出“NSException”错误 Xcode 实例后调用终止

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3847798/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:48:38  来源:igfitidea点击:

terminate called after throwing an instance of 'NSException' Error Xcode

iphonexcode

提问by Vinzgore

I'm trying to compile my app (which is a scanner (a fake ;])). But in the simulator (and in my iTouch), the app crashes.

我正在尝试编译我的应用程序(这是一个扫描仪(一个假的;]))。但是在模拟器(以及我的 iTouch 中)中,应用程序崩溃了。

This is what I've got :

这就是我所拥有的:

[Session started at 2010-10-03 00:25:56 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Thu Aug  5 05:54:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".
tty /dev/ttys000
Loading program into debugger…
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-93926-50
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
warning: Unable to read symbols for "/Library/MobileSubstrate/MobileSubstrate.dylib" (file not found).
warning: Unable to read symbols for "/Library/MobileSubstrate/MobileLoader.dylib" (file not found).
2010-10-03 00:26:42.312 Scaning[1037:307] MS:Notice: Installing: com.xsoxsoft.Scaning [Scaning] (550.32)
2010-10-03 00:26:42.558 Scaning[1037:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Activator.dylib
warning: Unable to read symbols for "/Library/MobileSubstrate/DynamicLibraries/Activator.dylib" (file not found).
2010-10-03 00:26:43.435 Scaning[1037:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/SimulatedKeyEvents.dylib
warning: Unable to read symbols for "/Library/MobileSubstrate/DynamicLibraries/SimulatedKeyEvents.dylib" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libsubstrate.dylib" (file not found).
2010-10-03 00:26:43.705 Scaning[1037:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib
warning: Unable to read symbols for "/Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib" (file not found).
2010-10-03 00:26:43.929 Scaning[1037:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib
warning: Unable to read symbols for "/Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib" (file not found).
2010-10-03 00:26:45.248 Scaning[1037:307] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "UntitledViewController" nib but the view outlet was not set.'
*** Call stack at first throw:
(
 0   CoreFoundation                      0x36440303 __exceptionPreprocess + 114
 1   libobjc.A.dylib                     0x3523d4c4 objc_exception_throw + 40
 2   CoreFoundation                      0x364401c7 +[NSException raise:format:arguments:] + 70
 3   CoreFoundation                      0x364401fb +[NSException raise:format:] + 30
 4   UIKit                               0x32556fd4 -[UIViewController _loadViewFromNibNamed:bundle:] + 300
 5   UIKit                               0x32489e10 -[UIViewController loadView] + 128
 6   UIKit                               0x323e57c8 -[UIViewController view] + 52
 7   Scaning                             0x00002c43 -[UntitledAppDelegate application:didFinishLaunchingWithOptions:] + 78
 8   UIKit                               0x3236f100 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1116
 9   UIKit                               0x3251d6d4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 300
 10  UIKit                               0x323d87c0 -[UIApplication handleEvent:withNewEvent:] + 1792
 11  UIKit                               0x323d7ebc -[UIApplication sendEvent:] + 68
 12  UIKit                               0x323d77f0 _UIApplicationHandleEvent + 6712
 13  GraphicsServices                    0x33c4dee4 PurpleEventCallback + 1032
 14  CoreFoundation                      0x364142b3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28
 15  CoreFoundation                      0x364161dd __CFRunLoopDoSource1 + 164
 16  CoreFoundation                      0x36417195 __CFRunLoopRun + 580
 17  CoreFoundation                      0x363be0c3 CFRunLoopRunSpecific + 226
 18  CoreFoundation                      0x363bdfd1 CFRunLoopRunInMode + 60
 19  UIKit                               0x32363b20 -[UIApplication _run] + 532
 20  UIKit                               0x32361fc0 UIApplicationMain + 972
 21  Scaning                             0x00002bc1 main + 80
 22  Scaning                             0x00002b6c start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.
kill
quit

Can someone help me?

有人能帮我吗?

回答by ennuikiller

Big Clue: "loaded the "UntitledViewController" nib but the view outlet was not set."

大线索:“ loaded the "UntitledViewController" nib but the view outlet was not set.