Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange crash on selecting a UITableView cell
    primarykey
    data
    text
    <p>I am getting an <code>EXC_BAD_ADDRESS</code> crash when selecting a table's cell which should push a new view on the navigation controller. </p> <p>Here is the stack trace (the <code>CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION_</code> is always there): </p> <p><a href="http://dl.dropbox.com/u/71415/crash_threads.jpg" rel="nofollow noreferrer">alt text http://dl.dropbox.com/u/71415/crash_threads.jpg</a> </p> <p>I strongly suspect the new code I have added to load the initial data the app needs in a separate thread, partly because the <code>init</code> and <code>loadView</code> of the new view controller are being called and return fine. I am doing a <code>[NSThread detachNewThreadSelector:@selector(loadData) toTarget:self withObject:nil];</code> in <code>applicationDidFinishLaunching</code> and then load a view showing a progress indicator. <code>loadData</code> does a <code>[self performSelectorOnMainThread:@selector(setupMainUI) withObject:nil waitUntilDone:NO];</code> when data is ready. The UI (table and all) is loaded fine, the fresh data shows up great; it's only when a new view has to be pushed that the crash happens. Switching views via tab controller works fine as well.</p> <p>Ideas? Thanks.</p> <p><strong>Update</strong>:</p> <p>This is what I am doing to load the new view controller:</p> <pre><code> NSArray *arrayForSection = [filteredGobos objectAtIndex:indexPath.section]; Employee *selectedEmployee = [arrayForSection objectAtIndex:indexPath.row]; if (self.employeeVC == nil) { EmployeeVC *emplVC = [[EmployeeVC alloc] initWithEmployee:selectedEmployee]; self.employeeVC = emplVC; } [self.navigationController pushViewController:employeeVC animated:YES]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload