Monday, April 18, 2011

Operation failed with underlying error 4294956467

Thanx Xcode, that was very informative. I'll fix it right away! Oh wait, what was that...
Failed to launch simulator: Operation failed with underlying error 4294956467.
Trying to run an application under development fails, because simulator crashes. The error note is totally useless, unfortunately. Callstack seems to refer to an Interface Builder file containing an IBOutlet, which was removed some time ago. Doing "grep -r keyword *" in project folder can't find a thing, just some references under .svn subfolders. Shouldn't be a problem, version control is supposed to remember old forgotten things.

Problem seems to be related only to simulator, not to current source code. Doing "Clean" from Xcode menus doesn't seem to be enough, still keep getting same crash. Got to get more aggressive, so let's try deleting some folders. In this computer(*) simulator files are located at:
/Users/ext-mietjo/Library/Application Support/iPhone Simulator/4.0.2/Applications/
That folder contains several simulator subfolders with weird long numeric titles. Each subfolder seems to contain an application, so check all and delete your crashing application. Since controlling which simulator opens by default is not very clear, you might check all installed simulators and delete your app subfolder under each.

If you know what you're doing (I sure don't), might as well delete all app subfolders (I did).

Just a note that I have both Xcode 3.2.5 and Xcode 4.0.2 installed. Even thought they are installed in different folders (/Developer and /Xcode4), I'm not quite sure how simulator files under my home folder are related to either one.  Actually I believe that since I use both Xcodes to develop and run the same application each day, that might be the reason for these problems. Will remove older Xcode once the new one stops crashing, adds some missing functionality and increases usability a lot. Hopefully during this year.

Fingers crossed, let's hope I don't need to update this tip! Otherwise need to figure out something completely different...

* Yes, I work as an external subcontractor, developing iPhone software. You want to hire me, contact my boss.

2 comments:

  1. I had the same problem. I fixed it without going to all those extremes. The problem was attributed to errors in the appDelegate would not show when you build. If your application can not run beyond initiating the AD, It dies and hence keep the debugger and simulator locked after which you can barely run anything with xcode. If the AD dies unceremoniously xcode/debugger/simulator are not smart enough to fully recover.

    I fixed my AD and run a 'Clean All Targets' and bingo my application was back and running. Hope that helps other people. But in any case your problem might be different.

    Cheers... Happy programming..

    ReplyDelete
  2. Thanx, next time I'll try setting a breakpoint into appDelegate!

    Also noticed that you used "Clean All Targets" instead of just "Clean". Nowadays I always do Clean All and sometimes delete Build folder, too. Just in case, good generic magical fixes for many problems.

    ReplyDelete