2011-04-19 5 views
1

LambdaAlert의 예제 코드를 내 앱에 붙여 넣었으며 iOS4.3을 실행하면 EXC_BAD_ACCESS 오류가 발생합니다. 동일한 코드가 이전 버전의 OS에서 잘 작동합니다.내 앱에서 블록을 사용하면 iOS4.3에서만 EXC_BAD_ACCESS가 발생합니다.

LambdaAlert *alert = [[LambdaAlert alloc] 
          initWithTitle:@"Test Alert" 
          message:@"See if the thing works."]; 
    [alert addButtonWithTitle:@"Foo" block:^{ NSLog(@"Foo"); }]; // <-- Crashes here with EXC_BAD_ACCESS no matter what code is in the block (even an empty block!) 
    [alert addButtonWithTitle:@"Bar" block:^{ NSLog(@"Bar"); }]; 
    [alert addButtonWithTitle:@"Cancel" block:NULL]; 
    [alert show]; 
    [alert release]; 

iOS4.3에서 다르게해야 할 것이 있습니까?

+0

나는 LambdaAlert의 저자에게 연락 할 것입니다. – amattn

+0

해당 클래스에만 국한되지는 않습니다. 나는 다른 블록을 시도하고 모든 경우에 실패합니다. –

+0

어떻게이 현상금을 시작할 수 있습니까? 모든 질문에 대해서는 보상금을 낼 수는 있지만 내 것 같습니다. –

답변

1

-weak_library /usr/lib/libSystem.B.dylib은 iOS 시뮬레이터를 손상시킵니다. 대신 -weak-lSystem을 사용하십시오.

관련 문제