While our code runs perfectly fine on the simulator, on the iphone schedule_selector crashes. Specifically the following line:
SEL_SCHEDULE var = (SEL_SCHEDULE)(&GameStaticLayer::update);
schedule(var, 0);
returns
(gdb) print var
$1 = {
*pfn = 0,
*delta = 1
}
That is, the function pointer to update is NULL which crashes schedule eventually due to one of the asserts. The update function is defined and declared correctly and the code runs perfectly on the iphone simulator. I don’t see how I could be possibly getting a bad function pointer. Any tips will be greatly appreciated.