views:

45

answers:

0

I'm having some problems with the iPhone simulator that don't seem to be occurring on the device.

I have made a web service reference class with a bunch of static methods so different calls to a web service can be made from all over the application. The methods themselves contain a lock so only one request will be performed at a time.

Different threads can call the static methods, but there are no thread-shared resources otherwise; everything is created and released within the static methods. Sometimes the methods are called on the main thread, and sometimes from other threads while an activity indicator is displayed, etc. The web service calls are done async, using a run loop to spin off the NSURLConnection methods.

The iPod touch and iPhone devices run the application and perform these actions without any problems at all, but the iPhone simulator frequently crashes (though not every time). The stack trace contains 'CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION' which looks like a UI thread issue, but no UI work is done from anything but the main thread (though the main thread can wait for a notification which leads to UI work being done on the main thread).

I can't find any reason, or known bugs with the simulator, which would suggest why the simulator is crashing but not the device.

It may not seem like a problem, but it is making it impossible to use the performance tools.