当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - Strange Errors resulting in EXC_BAD_ACCESS (SIGSEGV)

问题描述:

Hey Guys,

I know there are about 100.000 thread about EXC_BAD_ACCESS (SIGSEGV) Errors. But no one helped me out. I'm not able to solve my problem myself.

A few hours ago, I duplicated the target of my Xcode Project (a iPhone game) to make a free version. But since this Point I get very strange errors. Sometimes the app works as if nothing happened. But most of the time, I get errors like this:

Running pass 'X86 DAG->DAG Instruction Selection' on function '@gleLLVMVecPrimMultiRender13'

And the stack looks like this:

 Thread 0 Crashed: Dispatch queue: com.apple.main-thread

0 libobjc.A.dylib 0x015c6c6f prepareForMethodLookup + 31

1 libobjc.A.dylib 0x015c06ad lookUpMethod + 86

2 libobjc.A.dylib 0x015c081a _class_lookupMethodAndLoadCache + 40

3 libobjc.A.dylib 0x015ceaa3 objc_msgSend + 87

4 Birdy Free 0x0001b46d -[SMApplicationManager dealloc] + 58 (SMApplicationManager.m:226)

5 Foundation 0x00489257 -[NSURLConnection(NSURLConnectionReallyInternal) releaseDelegate] + 57

6 Foundation 0x004891f9 _NSURLConnectionReleaseClient + 68

7 CFNetwork 0x01a45742 ClientContextHolder<CFURLConnectionClient_V4>::forget() + 48

8 CFNetwork 0x01a3beee URLConnectionClient::processEvents() + 278

9 CFNetwork 0x01a3bcb7 MultiplexerSource::perform() + 251

10 CoreFoundation 0x0144e01f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15

11 CoreFoundation 0x013ac28b __CFRunLoopDoSources0 + 571

12 CoreFoundation 0x013ab786 __CFRunLoopRun + 470

13 CoreFoundation 0x013ab240 CFRunLoopRunSpecific + 208

14 CoreFoundation 0x013ab161 CFRunLoopRunInMode + 97

15 GraphicsServices 0x02a13268 GSEventRunModal + 217

16 GraphicsServices 0x02a1332d GSEventRun + 115

17 UIKit 0x0086d42e UIApplicationMain + 1160

18 Birdy Free 0x000024a0 main + 82 (main.m:13)

19 Birdy Free 0x00002445 start + 53

But the method called is not always the same. In this case it was [SMApplicationManager dealloc] and a few minutes ago it was [CCNode draw]. I can't get the source of this error. I think it has something to do with the second target.

Do any of you guys know anything more?

Sandro Meier

网友答案:

It's weird i got this error, and i went through countless solutions. Turned out, i had duplicated a line of code by accident. Just make sure when you duplicated, there is not code interfering with each other.

网友答案:

Finally after a few more hours of frustrating experiments I found the solution. The whole thing hadn't to anything with the second target. The Problem was the NSURLConnectionDelegate. In this class I implemented a Property named appID. And in one of the methods of the class, I set the variable without the setter. So I placed an autoreleased object at the position of a property. This one get released and the pointer to the variable gets invalid. As soon as the Delegate was released, a Method was sent to this yet released object.

But I can't explain why there appears this strange error Method. I haven't seen anything like that before. Can someone tell my why the error is called Running pass 'X86 DAG->DAG Instruction Selection' on function '@gleLLVMVecPrimMultiRender13'?

Sandro Meier `

分享给朋友:
您可能感兴趣的文章:
随机阅读: