iOS Everyplay集成:调用“showEveryplay”会导致崩溃

时间:2015-10-31 12:55:20

标签: ios objective-c everyplay

我们在游戏中使用Everyplay进行录制,似乎工作正常,但是,例如,在调用以下行时,我们的应用程序崩溃了:

[[EveryplaysharedInstance] showEveryplay]

在iOS 9.1,iPhone 5S上进行测试。无论我们是在UI中调用它还是在Everyplay的预览窗口中按Everyplay按钮(在调用[[EveryplaysharedInstance] playLastRecording]时显示),都会发生崩溃。简单地关闭Everyplay的预览窗口时会发生另一次崩溃。

  • 添加所有框架。

  • 初始化在我们的视图控制器的方法viewDidLoad中完成:

    [EveryplayinitWithDelegate:self andParentViewController:self]

  • 正在按预期调用EveryplayDelegate方法。就在调用崩溃everyplayShown委托方法之前。

你遇到过类似的问题吗?知道在哪里搜索?

感谢任何帮助!

编辑:添加了堆栈跟踪和崩溃日志!

堆栈跟踪(控制台中的bt输出):

* thread #1: tid = 0x1faed, 0x00000001993bf140 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00000001993bf140 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x0000000199488ef8 libsystem_pthread.dylib`pthread_kill + 112
frame #2: 0x0000000199332b78 libsystem_c.dylib`abort + 140
frame #3: 0x00000001012f9490 Project`uncaught_exception_handler + 36
frame #4: 0x0000000183f912d0 CoreFoundation`__handleUncaughtException + 652
frame #5: 0x0000000198a5423c libobjc.A.dylib`_objc_terminate() + 112
frame #6: 0x00000001980f6f44 libc++abi.dylib`std::__terminate(void (*)()) + 16
frame #7: 0x00000001980f685c libc++abi.dylib`__cxa_throw + 136
frame #8: 0x0000000198a54094 libobjc.A.dylib`objc_exception_throw + 332
frame #9: 0x0000000188d6b8bc QuartzCore`CA::Display::DisplayLinkItem::dispatch() + 164
frame #10: 0x0000000188d6b6f4 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 424
frame #11: 0x000000018522a2f8 IOKit`IODispatchCalloutFromCFMessage + 372
frame #12: 0x0000000183f32840 CoreFoundation`__CFMachPortPerform + 180
frame #13: 0x0000000183f48c7c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
frame #14: 0x0000000183f483b4 CoreFoundation`__CFRunLoopDoSource1 + 436
frame #15: 0x0000000183f4610c CoreFoundation`__CFRunLoopRun + 1800
frame #16: 0x0000000183e74ca0 CoreFoundation`CFRunLoopRunSpecific + 384
frame #17: 0x000000018f0b0088 GraphicsServices`GSEventRunModal + 180
frame #18: 0x000000018958cffc UIKit`UIApplicationMain + 204
frame #19: 0x000000010102d568 Project`main(argc=1, argv=0x000000016fdfba80) + 152 at main.m:39
frame #20: 0x00000001992a28b8 libdyld.dylib`start + 4

来自XCode的崩溃日志:

    Last Exception Backtrace:
0   CoreFoundation                  0x183c58f48 __exceptionPreprocess + 124
1   libobjc.A.dylib                 0x19871bf80 objc_exception_throw + 56
2   CoreFoundation                  0x183c58e90 +[NSException raise:format:] + 120
3   UIKit                           0x18926456c -[UIViewController __supportedInterfaceOrientations] + 912
4   UIKit                           0x189263efc -[UIViewController _preferredInterfaceOrientationGivenStatusBarAndDeviceAndOrientation:] + 96
5   UIKit                           0x18956e9e8 -[UIViewController _legacyInterfaceOrientation] + 652
6   Project                         0x10146cc30 -[EveryplayNavigationViewController loadView] + 88
7   UIKit                           0x1891ebd44 -[UIViewController loadViewIfRequired] + 144
8   UIKit                           0x1891ebc9c -[UIViewController view] + 28
9   Project                         0x10146c850 -[EveryplayNavigationViewController initWithOverlayNavigationBar:] + 164
10  Project                         0x101489f50 -[EveryplaySocialViewController initWithOverlayNavigationBar:] + 56
11  Project                         0x101424330 __34-[Everyplay showEveryplayWithURL:]_block_invoke + 432
12  Project                         0x10144ec54 +[EveryplayCommon runInMainThread:] + 64
13  Project                         0x101424154 -[Everyplay showEveryplayWithURL:] + 136
14  Project                         0x101424090 -[Everyplay showEveryplayWithPathInternal:] + 384
15  Project                         0x101423074 -[Everyplay showEveryplayWithPath:] + 192
16  Project                         0x101422f98 -[Everyplay showEveryplay] + 108
17  Project                         0x100268700 -[GameViewController notificationHandler:] (GameViewController.mm:577)

在看到上面的崩溃日志之后,它与处理与Everyplay相关的设备方向有关。我们的游戏只在风景中播放,所以我认为画像方向也是必需的。在.plist中添加两个纵向方向确实解决了问题。 Everyplay的视图控制器似乎需要这样的定义。

不确定其他iOS版本和其他设备是否会出现问题。感觉就像一个黑客。你怎么看?

0 个答案:

没有答案