objective-c - 应用程序在 i386 上崩溃,在 x86_64 上工作

标签 objective-c cocoa xcode x86-64 i386

我今天尝试在我的 Xcode 项目中切换架构,因为我将要使用尚未移植到 64 位的低级 QuickTime 内容。当我之前在 x86_64 上编译时,我的应用程序运行得很好。然后我将 arch 切换到 i386 和 boom,我的应用程序在启动时一直崩溃。

奇怪的是,堆栈跟踪与我自己的代码无关。

#0  0x9929ebf1 in __CFBasicHashDeallocate
#1  0x99286ea1 in _CFRelease
#2  0x992b397d in _CFAutoreleasePoolPop
#3  0x917d1dda in NSPopAutoreleasePool
#4  0x92b67bc9 in loadNib
#5  0x92b66f99 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
#6  0x92b66eaa in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
#7  0x92b66df5 in +[NSBundle(NSNibLoading) loadNibNamed:owner:]
#8  0x92b63bf9 in NSApplicationMain
#9  0x000023c8 in main at main.m:13

有什么想法吗?

最佳答案

我的猜测是您在 nib 中创建了在 32 位模式下不安全的对象。例如,您可能会对某些不正确的对象的大小做出假设,例如,使用 double 而不是 CGFloat 或 int64_t 而不是 NSInteger。

关于objective-c - 应用程序在 i386 上崩溃,在 x86_64 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3075670/

相关文章:

iphone - 如何在不参与 iPhone 开发者计划的情况下在越狱的 iPhone 上构建和安装应用程序?

iphone - 如何删除 UIMenuController 中的 COPY UIMenuItem

macos - cocoa osx 以编程方式添加 nstextfields

objective-c - NSNotification : does the object property have to be self?

objective-c - 使用 Interface Builder 添加的 NSImageView 为 null

php - 在后台从 Cocoa 向 PHP 脚本发送数据

ios - testflight 应用程序在启动时关闭

objective-c - NSView 的 mouseMoved 事件

iOS NSLayoutConstraint 使用 constraintWithItem 固定宽度

业务分发的IOS Provisioning profile