简体   繁体   English

GPPSignIn sharedInstance-> EXC_BAD_ACCESS(代码= EXC_I386_GPFLT)

[英]GPPSignIn sharedInstance -> EXC_BAD_ACCESS (code = EXC_I386_GPFLT)

It seems that everything was fine for a long time and yesterday without any visible reasons I started to get error 似乎很长一段时间都很好,昨天没有任何明显的原因,我开始出错。

EXC_BAD_ACCESS (code = EXC_I386_GPFLT) 

on the next line on emulator (everything is ok on real device): 在模拟器的下一行上(在真实设备上一切正常):

GPPSignIn *signIn = [GPPSignIn sharedInstance];

After enabling NSZombie message changed to 启用NSZombie之后,消息更改为

exc_breakpoint (code=exc_i386_bpt subcode=0x0) . exc_breakpoint (code=exc_i386_bpt subcode=0x0)

It is very strange because even if this line is only one in the viewDidLoad and it is the first view controller in the app I get error time after time (~every 3-4 app launch). 这很奇怪,因为即使该行在viewDidLoad中仅是一行,而且它是应用程序中的第一个视图控制器,我也会一次又一次地出错(每3-4个应用程序启动一次)。 I didn't make any changes to app configuration. 我没有对应用程序配置进行任何更改。

I will be grateful for any help. 我将不胜感激。 Thank you! 谢谢!

UPD: error occurs in libobjc.A.dylib UPD: libobjc.A.dylib发生错误

as I can see. 我所看到的。

UPD: UPD: 在此处输入图片说明

UPD: UPD:

2014-03-31 13:54:13.611 SomeApp[450:3c07] *** -[CFString retain]: message sent to deallocated instance 0x10c2ef050
(lldb) bt
* thread #6: tid = 0x2a3b, 0x0000000103978cc4 CoreFoundation`___forwarding___ + 772, queue = 'NSOperationQueue 0x10ea2b870', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
  * frame #0: 0x0000000103978cc4 CoreFoundation`___forwarding___ + 772
    frame #1: 0x0000000103978938 CoreFoundation`__forwarding_prep_0___ + 120
    frame #2: 0x00000001039fb3c7 CoreFoundation`+[__NSArrayI __new:::] + 87
    frame #3: 0x000000010395d386 CoreFoundation`+[NSArray arrayWithObjects:] + 566
    frame #4: 0x00000001002dea06 SomeApp `+[GPPSignIn versionFromServerData:currentVersion:] + 832
    frame #5: 0x00000001002dec24 SomeApp `__28-[GPPSignIn checkSDKVersion]_block_invoke + 197
    frame #6: 0x0000000100277e64 SomeApp `-[GTMHTTPFetcher connectionDidFinishLoading:] + 714
    frame #7: 0x000000010152036b Foundation`__65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 48
    frame #8: 0x000000010145763b Foundation`-[NSBlockOperation main] + 75
    frame #9: 0x00000001014a5d34 Foundation`-[__NSOperationInternal _start:] + 623
    frame #10: 0x00000001014a7c0b Foundation`__NSOQSchedule_f + 64
    frame #11: 0x000000010414372d libdispatch.dylib`_dispatch_client_callout + 8
    frame #12: 0x0000000104131eab libdispatch.dylib`_dispatch_async_redirect_invoke + 174
    frame #13: 0x000000010414372d libdispatch.dylib`_dispatch_client_callout + 8
    frame #14: 0x0000000104133b27 libdispatch.dylib`_dispatch_root_queue_drain + 380
    frame #15: 0x0000000104133d12 libdispatch.dylib`_dispatch_worker_thread2 + 40
    frame #16: 0x0000000104490ef8 libsystem_pthread.dylib`_pthread_wqthread + 314
(lldb) 

This is a strange issue to track down. 要追踪这是一个奇怪的问题。 I've been having the same problem with the [CFString retain]: crash only in the simulator (runs fine on device), but when I tried to run Zombies in Instruments it would never show a zombie. 我在使用[CFString retain]:遇到了同样的问题[CFString retain]:仅在模拟器中崩溃(在设备上正常运行),但是当我尝试在Instruments中运行Zombies时,它永远不会显示僵尸。

CFString在iOS模拟器上保留问题

After tons of searching, your question lead me to use the backtrace command to find out that the Google+ SDK was causing the issue. 经过大量搜索之后,您的问题使我使用backtrace命令来确定是导致问题的Google+ SDK。

While this is only a workaround until Google fixes the issue, you can get your app to run on the simulator by wrapping your GPPSignIn in precompiler directives that check if you are running in the simulator: 尽管这只是在Google解决此问题之前的一种解决方法,但您可以通过将GPPSignIn包装在预编译器指令中来检查模拟器是否在模拟器中运行,从而使应用程序在模拟器上运行:

#if !(TARGET_IPHONE_SIMULATOR)
- (GPPSignIn *) googlePlusSession {
    NSLog(@"Not running on simulator");
    if(_googlePlusSession == nil) {
        _googlePlusSession = [GPPSignIn sharedInstance];
        _googlePlusSession.clientID = kGoogleClientId;
        _googlePlusSession.scopes = [NSArray arrayWithObjects:kGTLAuthScopePlusLogin,nil];
        _googlePlusSession.delegate = self;
        [_googlePlusSession trySilentAuthentication];
    }
    return _googlePlusSession;
}
#endif

Obviously this screws up the Google+ functionality in your app when running on the simulator, but in my case that was much better than not being able to launch at all. 显然,这在模拟器上运行时会破坏应用程序中的Google+功能,但就我而言,这比根本无法启动要好得多。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 加载AVPlayer时出现错误线程1:EXC_BAD_ACCESS(code = EXC_I386_GPFLT) - Getting error Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) when loading AVPlayer 得到错误:“线程1:SOAP请求期间EXC_BAD_ACCESS(Code = EXC_I386_GPFLT) - Getting error: "Thread 1: EXC_BAD_ACCESS(Code=EXC_I386_GPFLT) during SOAP request UIAlertView EXC_BAD_ACCESS(代码=EXC_I386_GPFLT) - UIAlertView EXC_BAD_ACCESS(code=EXC_I386_GPFLT) 如何在swift编程中解决这个EXC_BAD_ACCESS(代码= EXC_i386_GPFLT) - How to solve this EXC_BAD_ACCESS(code=EXC_i386_GPFLT )in swift programming 错误:“线程 1:EXC_BAD_ACCESS(代码=EXC_I386_GPFLT) - error: "Thread 1: EXC_BAD_ACCESS(Code=EXC_I386_GPFLT) 当deleteRows时为EXC_BAD_ACCESS(代码为EXC_I386_GPFLT)(在[IndexPath]) - EXC_BAD_ACCESS (code=EXC_I386_GPFLT) when deleteRows(at: [IndexPath]) iOS Swift:EXC_BAD_ACCESS(code = EXC_i386_GPFLT)关于单例 - iOS Swift : EXC_BAD_ACCESS(code=EXC_i386_GPFLT ) regarding a singleton 线程1:EXC_BAD_ACCESS(代码= EXC_I386_GPFLT) - Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) IOS:NavigationController切换UIViewcontrollers,EXC_BAD_ACCESS EXC_I386_GPFLT错误 - IOS: NavigationController switch UIViewcontrollers , EXC_BAD_ACCESS EXC_I386_GPFLT error 在向我的结构添加属性后获取线程 10:EXC_BAD_ACCESS (code=EXC_I386_GPFLT) - Getting Thread 10: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) after adding property to my struct
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM