iOS 8 UIApplicationMain从SDK 8更新后崩溃 [英] iOS 8 UIApplicationMain crash since SDK 8 update
问题描述
自从我将Xcode更新到6.0.1和iOS SDK到8.0,我的应用程序不再在设备上运行(运行iOS 8 ofc)。
但是它在模拟器中工作得很好。
Since I updated Xcode to 6.0.1 and iOS SDK to 8.0 my app no longer work on the device (running iOS 8 ofc). But it works perfectly in the simulator.
在调用委托之前,应用程序崩溃了UIApplicationMain。
在CFTypeCollectionRetain似乎值或键为null。
The app crashes in UIApplicationMain before any call to the delegate has ever happened. It seems either a value or key is null at CFTypeCollectionRetain.
我试过了
- 重新创建证书/配置文件。
- 使用/不使用ARC重新构建。
- 测试armv7和arm64版本。
- Xcode模板(游戏)应用程序编译并运行没有问题。
- Recreating certificates/provision profiles.
- Re-built with/without ARC.
- Tested both armv7 and arm64 builds.
- Xcode template (Game) application compiles and runs without probs.
注意事项
- 几乎所有的代码都是C ++,它是一个游戏引擎,并且使用最少的操作系统服务。
-
- 没有创建根视图控制器(原因),而是创建了一个使用CAEAGLLayer启用的自定义视图, GLES ...但由于程序没有到达那些创建点,我暂时忽略它。
- 在UIApplicationMain里面有一个调用[_UIFlippingView layerClass]崩溃但是在Google上找不到有关UIFlippingView类的任何信息...
- Almost all code is C++, it's a game engine and are using bare minimum of OS services.
- Some global constructors (executed prior to main) are using pthreads primitives.
- No root view controller is created (legacy reasons), instead a custom view is created which uses CAEAGLLayer to "enable" GLES... but since the program doesn't reach the point where those are created I've ignored it for time being.
- Inside UIApplicationMain there is a call to [_UIFlippingView layerClass] which crashes; but cannot find any information about the UIFlippingView class whatsoever on Google...
我不希望有任何答案,
I don't expect an answer but any good advise as to where look next would be very appreciated!
Callstack如下:
Callstack is as follows:
* thread #1: tid = 0x185d9, 0x23f7646c CoreFoundation`__CFTypeCollectionRetain + 104, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe)
* frame #0: 0x23f7646c CoreFoundation`__CFTypeCollectionRetain + 104
frame #1: 0x23fd9168 CoreFoundation`__CFBasicHashAddValue + 564
frame #2: 0x23ec06c0 CoreFoundation`CFBasicHashAddValue + 19048
frame #3: 0x23ef745e CoreFoundation`CFDictionaryCreate + 178
frame #4: 0x28a8d246 BackBoardServices`BKSHIDEventCreateClientAttributes + 186
frame #5: 0x28a8d2ac BackBoardServices`___getHIDEventSystemClient_block_invoke + 36
frame #6: 0x01fab740 libdispatch.dylib`dispatch_once_f + 100
frame #7: 0x28a8d318 BackBoardServices`BKSHIDEventRegisterEventCallback + 84
frame #8: 0x274ab4a8 UIKit`UIApplicationMain + 576
frame #9: 0x0008833c Traktor.Amalgam.App`main(argc=1, argv=0x01d3f9e8) + 196 at Main.mm:15
CoreFoundation`__CFTypeCollectionRetain:
0x23f76404: push {r4, r5, r7, lr}
0x23f76406: mov r4, r1
0x23f76408: add r7, sp, #0x8
0x23f7640a: cbz r4, 0x23f7646c ; __CFTypeCollectionRetain + 104
0x23f7640c: ldrd r0, r1, [r4]
0x23f76410: cmp r0, #0x0
0x23f76412: ubfx r1, r1, #0x8, #0xa
0x23f76416: beq 0x23f7644a ; __CFTypeCollectionRetain + 70
0x23f76418: movw r2, #0xdf70
0x23f7641c: movt r2, #0xe02
0x23f76420: add r2, pc
0x23f76422: ldr r2, [r2]
0x23f76424: cmp r0, r2
0x23f76426: beq 0x23f7644a ; __CFTypeCollectionRetain + 70
0x23f76428: movw r2, #0x4aa4
0x23f7642c: movt r2, #0xe03
0x23f76430: add r2, pc
0x23f76432: ldr.w r5, [r2, r1, lsl #2]
0x23f76436: cmp r0, r5
0x23f76438: beq 0x23f7644a ; __CFTypeCollectionRetain + 70
0x23f7643a: tst.w r0, #0x1
0x23f7643e: beq 0x23f76456 ; __CFTypeCollectionRetain + 82
0x23f76440: mov r0, r4
0x23f76442: blx 0x2400d1e0 ; symbol stub for: +[NSMutableOrderedSet orderedSetWithCapacity:]
0x23f76446: cmp r0, r5
0x23f76448: bne 0x23f76456 ; __CFTypeCollectionRetain + 82
0x23f7644a: mov r0, r4
0x23f7644c: movs r1, #0x0
0x23f7644e: pop.w {r4, r5, r7, lr}
0x23f76452: b.w 0x23eafc38 ; _CFRetain
0x23f76456: movw r0, #0xb93e
0x23f7645a: movt r0, #0xe02
0x23f7645e: add r0, pc
0x23f76460: ldr r1, [r0]
0x23f76462: mov r0, r4
0x23f76464: pop.w {r4, r5, r7, lr}
0x23f76468: b.w 0x2400c0c8 ; objc_msgSend$shim
0x23f7646c: trap -- TRAPPED HERE
0x23f7646e: nop
在UIApplicationMain代码中,有趣的是调用[_UIFlippingView layerClass]崩溃...
Inside UIApplicationMain code, interesting is the call to [_UIFlippingView layerClass] which crashes...
0x274ab486: blx 0x27b5b248 ; symbol stub for: roundf$shim
0x274ab48a: movs r5, #0x0
0x274ab48c: movw r0, #0x60f1
0x274ab490: movt r0, #0x0
0x274ab494: add r0, pc
0x274ab496: blx 0x27b595d8 ; symbol stub for: -[UIGravityBehavior _commonInit]
0x274ab49a: movw r0, #0xfa8f
0x274ab49e: movt r0, #0xfff9
0x274ab4a2: add r0, pc
0x274ab4a4: blx 0x27b59068 -- THIS CALL ; symbol stub for: +[_UIFlippingView layerClass]
0x274ab4a8: mov r0, r5
0x274ab4aa: mov r1, r11
0x274ab4ac: blx 0x27b5b248 ; symbol stub for: roundf$shim
0x274ab4b0: movw r1, #0x23e4
0x274ab4b4: movt r1, #0xb12
0x274ab4b8: add r1, pc
0x274ab4ba: ldr r1, [r1]
0x274ab4bc: blx 0x27b5b248 ; symbol stub for: roundf$shim
推荐答案
能够解决问题! !
显然,Xcode有一个坏主意,自动生成一个产品模块名称设置不匹配产品名称,从而崩溃的应用程序运行在设备上时。这是mindbogglely坏,但imho什么期待Xcode ...
Was able to fix the issue!!
Apparently Xcode had the bad idea of autogenerating a "Product Module Name" setting which didn't match "Product Name" and thus crashed the app when running on the device. This is mindbogglingly bad but imho what to expect of Xcode...
这篇关于iOS 8 UIApplicationMain从SDK 8更新后崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!