由于未捕获的异常而终止应用程序 // SIGABRT // C++

发布于 2024-08-23 01:49:23 字数 819 浏览 4 评论 0原文

当我收到此消息时,我刚刚完成了我的一个应用程序。我一辈子都无法找出问题所在。

    (gdb) continue
2010-02-26 14:05:51.443 BrainTester[2638:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "SplitSecondViewController"'
2010-02-26 14:05:51.452 BrainTester[2638:207] Stack: (
    861696817,
    860329709,
    861252493,
    861252395,
    835170725,
    835170141,
    835074651,
    13515,
    834774231,
    834773467,
    835014237,
    835012689,
    835011495,
    861063661,
    861449261,
    861447005,
    834770767,
    834765939,
    11025,
    10920
)
terminate called after throwing an instance of 'NSException'
Program r

接收到的信号:“SIGABRT”。 (gdb)

如果有人可以提供帮助,我们将不胜感激。

I have just finished one of my apps when I got this message. I cannot for the life of me work out what is wrong.

    (gdb) continue
2010-02-26 14:05:51.443 BrainTester[2638:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "SplitSecondViewController"'
2010-02-26 14:05:51.452 BrainTester[2638:207] Stack: (
    861696817,
    860329709,
    861252493,
    861252395,
    835170725,
    835170141,
    835074651,
    13515,
    834774231,
    834773467,
    835014237,
    835012689,
    835011495,
    861063661,
    861449261,
    861447005,
    834770767,
    834765939,
    11025,
    10920
)
terminate called after throwing an instance of 'NSException'
Program r

received signal: “SIGABRT”.
(gdb)

If someone can help, any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

迟月 2024-08-30 01:49:23

显然,您抛出了 NSInvalidArgumentException 且未被捕获,因此调用了 std::terminate() 并结束了程序。由于不熟悉 iPhone SDK,我无法提供更多帮助。请查阅 API 文档以了解它可能是从哪里抛出的。

如果我对 Objective-C++ 语法的理解是正确的,则错误消息暗示对象 UIViewController 无法使用参数 SplitSecondViewController 执行消息 _loadViewFromNibNamed 。

抱歉我帮不了更多...

You've obviously had an NSInvalidArgumentException thrown and not caught, thus calling std::terminate(), and ending the program. Not being familiar with the iPhone SDK, I can't really help more. Consult the API docs to see from whence it might have been thrown.

The error message implicates that the object UIViewController was unable to carry out message _loadViewFromNibNamed with argument SplitSecondViewController, if my reading of the Objective-C++ syntax is right.

Sorry I can't help more...

久夏青 2024-08-30 01:49:23

SplitSecondViewController.nib 是否已添加到项目中并且位于普通目录中?

另外,这是 Objective-C 异常,而不是 C++ 异常。

Has SplitSecondViewController.nib been added to the project and is it in a normal directory?

Also, that's an Objective-C exception, not a C++ exception.

同展鸳鸯锦 2024-08-30 01:49:23

当您重命名 nib 文件但不将名称更改传播到项目中时,可能会发生这种情况。自从上次成功运行应用程序以来,您是否重命名了 SplitSecondViewController ?

或者,如果您在某个阶段删除了 SplitSecondViewController,则项目中的其他地方可能仍会引用它。打开界面生成器并转到主窗口的连接检查器。如果您在某个阶段删除了 SplitSecondViewController,请确保连接检查器中与它的连接已删除。

This can occur when you rename nib files but don't propagate the name change through the project. Did you rename SplitSecondViewController since you last successfully ran the app?

Or, if you deleted SplitSecondViewController at some stage, there might still be references to it elsewhere in the project. Open interface builder and go to the connections inspector for the mainwindow. If you deleted SplitSecondViewController at some stage then make sure the connection to it in connections inspector is removed.

︶ ̄淡然 2024-08-30 01:49:23

在 Xcode 中查看“Targets”->YourAppName->Copy Bundle Resources

那里是否存在 xib 文件?

Look in Xcode at "Targets"->YourAppName->Copy Bundle Resources

Does exists the xib-File there ??

溺深海 2024-08-30 01:49:23

我遇到了同样的问题,马里奥的回答为我解决了这个问题。我正在将 iPhone 应用程序转换为同时在手机和 iPad 上运行。由于某种原因,它没有将新的 xib 文件放入目标下的复制捆绑资源中。一旦我通过从 Resources-iPad 目录中拖动 XIB 文件来添加它,它就修复了所有问题。

谢谢,马里奥!

I had the same issue and Mario's answer solved it for me. I was converting an iPhone app to work on both the phone and the iPad. For some reason it didn't put the new xib file into the Copy Bundle Resources underneath the target. Once I added it by dragging the XIB file from the Resources-iPad directory down, it fixed everything.

Thanks, Mario!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文