views:

117

answers:

0

Hi everyone

I have a very weird situation, check out the snippet below which launches a ModelViewController for an iPad application:

// Load GuestDetailController
GuestDetailController *detaileController = [[GuestDetailController alloc] init];
if (searching) {
   // some code, but nothing relevant to the issue (checked that already)
} else {
   // some Code, but nothing relevant to the issue (checked that already)
}

[self presentModalViewController:detaileController animated:YES];

This works like a charm when running on an actual iPad, yet whenever I access this on the simulator it crashes and reports the last line of the snippet as its sore point (the error seems to appear in obj_msgSend which is called as a consequence of my presentModalViewController call). Maybe this is a bug of the simulator? I have looked at that code for hours now, but it seems fine to me.

Thanks for your ideas!

Edit: Here is a snippet from the crash report

Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000064 Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information: objc_msgSend() selector name: modalTransitionStyle iPhone Simulator 4.0 (211.1), iPhone OS 3.2 (iPad/7W367a)

Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x029acc90 objc_msgSend + 20 1 UIKit 0x0039beb7 -[UIViewController presentModalViewController:animated:] + 53 2 MyApp 0x00016184 -[MyController tableView:didSelectRowAtIndexPath:] + 161 (MyController.m:401)