iPhone programming - problem with CoreFoundation forking
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-03-29T18:10:49Z
Indexed on
2010/03/29
18:23 UTC
Read the original article
Hit count: 419
Hello all,
I've been working on an iPhone for several months. It's a 2d shooting game akin to the old Smash TV type games.
I'm doing everything alone and it has come out well so far, but now I am getting unpredictable crashes which seem to be related to CoreFoundation forking and not exec()ing, as the message __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONA
LITY___YOU_MUST_EXEC__
always shows up somewhere in the debugger. Usually it shows up around a CFRunLoopRunSpecific and is related to either a timer firing or _InitializeTouchTapCount. I cannot figure out exactly what is causing the fork to occur. My main game loop is running on a timer, first updating all the logic and then drawing everything with openGL. There is nothing highly complex or unusual.
I understand you cannot make CF calls on the childside of a fork, or access shared memory and things like that. I am not explicitly trying to fork anything. My question is: can anyone tell me what type of activity might cause CoreFoundation to randomly fork like this?
I'd really like to finish this game and I don't know how to solve this problem. Thanks for any help.
© Stack Overflow or respective owner