2012-10-19 31 views
6

我有一个奇怪的问题,我最新版本的应用程序商店。有些用户报告说,升级应用程序后,应用程序在启动时崩溃,它只发生在iOS6上。但是,如果用户删除应用程序并进行全新安装,则不会发生崩溃。应用程序崩溃启动时只有更新不新鲜安装

我检查手机上的崩溃日志,看到这个错误。

OS Version:  iOS 6.0 (10A403) 

Exception Type: EXC_BAD_ACCESS (SIGBUS) 
Exception Codes: EXC_ARM_DA_ALIGN at 0x2fe6f785 
Crashed Thread: 0 

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0 Crashed: 
0 My App       0x00074ace +[aClass sharedNormalImages] (aClass.m:34) 
1 dyld       0x2fe79628 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 16 
2 dyld       0x2fe76a3a ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 382 
3 dyld       0x2fe76874 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 36 
4 dyld       0x2fe6dd04 dyld::initializeMainExecutable() + 172 
5 dyld       0x2fe7085c dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 1804 
6 dyld       0x2fe6d32c dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 604 
7 dyld       0x2fe6d064 _dyld_start + 60 

的sharedNormalImages功能尚未从最近的版本改变过,它只是返回一个这样的数组的功能。

static NSArray *normalImages = nil; 
+ (NSArray *)sharedNormalImages 
{ 
    if (normalImages == nil) { 
      normalImages = @[@"xx.png", @"xy.png", @"yx.png", @"yy.png"]; 
    } 

    return normalImages; 
} 

我真的不知道会发生什么。我试图用旧版本进行安装,然后用Xcode替换新版本。问题也不会发生。所以我无法用我的环境复制它。这太奇怪了。

编辑

不知道我怎么可能与但见设备控制台上的错误消息。

Oct 19 12:36:16 iPhone My App[210] <Error>: objc[210]: Class is implemented in both /var/mobile/Applications/A5EC61E7-7DBA-4FA5-A5FE-6D49EAFAD6EB/My App.app/My App and /var/mobile/Applications/A5EC61E7-7DBA-4FA5-A5FE-6D49EAFAD6EB/My App.app/My App. One of the two will be used. Which one is undefined. 
Oct 19 12:36:16 iPhone kernel[0] <Debug>: launchd[210] Builtin profile: container (sandbox) 
Oct 19 12:36:16 iPhone kernel[0] <Debug>: launchd[210] Container: /private/var/mobile/Applications/A5EC61E7-7DBA-4FA5-A5FE-6D49EAFAD6EB (sandbox) 
Oct 19 12:36:16 iPhone ReportCrash[211] <Notice>: Formulating crash report for process My App[210] 
Oct 19 12:36:16 iPhone com.apple.launchd[1] (UIKitApplication:com.acompany.myapp[0x813f][210]) <Warning>: (UIKitApplication:com.acompany.myapp[0x813f]) Job appears to have crashed: Bus error: 10 
Oct 19 12:36:16 iPhone com.apple.launchd[1] (UIKitApplication:com.acompany.myapp[0x813f]) <Notice>: (UIKitApplication:com.acompany.myapp[0x813f]) Throttling respawn: Will start in 2147483647 seconds 
Oct 19 12:36:16 iPhone backboardd[52] <Warning>: Application 'UIKitApplication:com.acompany.myapp[0x813f]' exited abnormally with signal 10: Bus error: 10 
Oct 19 12:36:16 iPhone ReportCrash[211] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary 
Oct 19 12:36:16 iPhone ReportCrash[211] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/My App_2012-10-19-123616_iPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 

仅供参考,我更新的应用程序图标上的最新更新“分段”,但我不认为这可以使飞机坠毁。

+0

你试过normalImages = [NSArray的arrayWithObjects:@ “xx.png”,@ “xy.png”,@ “yx.png”,@” yy.png”,零]。 ? – kamleshwar

+0

现在的问题是无法用我的机器重现它。无论如何,如果这真的是问题,为什么它只发生在iOS6而不是iOS5? – panchapol

+0

嗨你的应用中有没有Coredata的变化? –

回答

1

要复制问题,请尝试以下步骤:

  1. 构建既使用Ad-hoc供应配置文件的版本,
  2. 使用iTunes安装旧版本。
  3. 在设备上打开应用程序并浏览所有视图。
  4. 更新使用iTunes和运行应用程序的新版本
+0

我很抱歉,但我忘了在上面放一条线。 '静态NSArray * normalImages = nil;' – panchapol

+0

我已经看到了一些定义常量数组的新方法,但我认为@ShineethHamza可能会对某些东西有些奇怪。虽然两条代码行在概念上可能是相同的,但它们对编译器意味着不同的事情,并可能导致此问题。这不是关于访问,我认为这是关于如何创建,存储和引用。它甚至可能是一个错误。如果你还没有,我会尝试。 –

+0

@ThuggishNuggets在添加'static NSArray * normalImages = nil;'之前,我已经写了这个答案。对不起,我的歉意。我编辑了答案。感谢兄弟。 –