iOS 4 应用程序在 iOS 3.1.3 上启动时崩溃:找不到符号:__NSConcreteStackBlock

iOS 4 app crashes at startup on iOS 3.1.3: Symbol not found: __NSConcreteStackBlock(iOS 4 应用程序在 iOS 3.1.3 上启动时崩溃:找不到符号:__NSConcreteStackBlock)
本文介绍了iOS 4 应用程序在 iOS 3.1.3 上启动时崩溃:找不到符号:__NSConcreteStackBlock的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行带有 iOS 4.0 SDK 的 Xcode 3.2.3.我使用 Base SDK = iphoneos4.0、Active SDK = iphoneos4.0、Deployment Target = 3.1.3 和 Architecture = standard (arm6 arm7) 构建了我的应用程序.编译器 = GCC 4.2.据我了解,这是构建适用于 iOS 4 和 3 的应用程序的正确方法.

I'm running Xcode 3.2.3 with the iOS 4.0 SDK. I built my app with Base SDK = iphoneos4.0, Active SDK = iphoneos4.0, Deployment Target = 3.1.3, and Architecture = standard (arm6 arm7). Compiler = GCC 4.2. As I understand it, this is the correct way to build an app for both iOS 4 and 3.

该应用在运行 iOS 4 的设备上运行良好.但当您尝试在运行 iOS 3.1.3(iPod Touch 1G)的设备上运行它时,它会在启动时崩溃:

The app runs fine on devices running iOS 4. But it crashes on startup when you try to run it on a device with iOS 3.1.3 (an iPod Touch 1G):

dyld: Symbol not found: __NSConcreteStackBlock
  Referenced from: /var/mobile/Applications/192B30ED-16AC-431E-B0E9-67C1F41FD5DA/MyApp.app/MyApp
  Expected in: /usr/lib/libSystem.B.dylib

在我的 main() 函数甚至被调用之前,这似乎是一个相当低级"的动态链接库的问题.我什至尝试过重新启动设备等,但没有成功.以下是崩溃日志的一部分:

It appears to be an issue with a fairly "low level" dynamically-linked library, BEFORE my main() function even gets called. I have even tried re-starting the device, etc., with no luck. Here's part of the the crash log:

Process:         MyApp [60]
Path:            /var/mobile/Applications/192B30ED-16AC-431E-B0E9-67C1F41FD5DA/MyApp.app/MyApp
Identifier:      MyApp
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2010-07-22 17:16:17.942 -0400
OS Version:      iPhone OS 3.1.3 (7E18)
Report Version:  104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread:  0

Dyld Error Message:
  Symbol not found: __NSConcreteStackBlock
  Referenced from: /var/mobile/Applications/192B30ED-16AC-431E-B0E9-67C1F41FD5DA/MyApp.app/MyApp
  Expected in: /usr/lib/libSystem.B.dylib
  Dyld Version: 149

Binary Images:
    0x1000 -    0x80fff +MyApp armv6  <d5f0ff6f233b4b034c222c16438c88d9> /var/mobile/Applications/192B30ED-16AC-431E-B0E9-67C1F41FD5DA/MyApp.app/MyApp
0x2fe00000 - 0x2fe26fff  dyld armv6  <544395a4b5546114b878d5131a84fd7f> /usr/lib/dyld
0x30410000 - 0x30536fff  libSystem.B.dylib armv6  <0373fd64e915a17160732b29d343f95f> /usr/lib/libSystem.B.dylib

感谢您的建议!

推荐答案

Ben Gottlieb 昨天指出,如果你在应用程序的任何地方使用块,你会在 4.0 之前的操作系统上看到类似这样的崩溃,同时使用LLVM 编译器.要解决此问题,您可以在 Xcode 构建设置中指定链接器标志 -weak-lSystem.

Ben Gottlieb pointed out yesterday that if you use blocks anywhere in your application, you'll see a crash similar to this on a pre-4.0 OS while building with the LLVM compiler. To work around this, you can specify the linker flag -weak-lSystem in your Xcode build settings.

这篇关于iOS 4 应用程序在 iOS 3.1.3 上启动时崩溃:找不到符号:__NSConcreteStackBlock的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Why local notification is not firing for UNCalendarNotificationTrigger(为什么没有为UNCalendarNotificationTrigger触发本地通知)
iOS VoiceOver functionality changes with Bundle Identifier(IOS画外音功能随捆绑包标识符而变化)
tabbar middle tab out of tabbar corner(选项卡栏中间的选项卡角外)
Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Get an event when UIBarButtonItem menu is displayed(显示UIBarButtonItem菜单时获取事件)