Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double Click app crash debugging?



OK, my app runs fine unless you double click an associated file. It loads, but never displays the file contents and quiting the app causes an early application termination notice. How do I go about debugging this thing?


I've had this problem during development. Mac OS remembers which executable opens which file type. When you double-click the file type in Finder it will start the appropriate executable. This can cause a problem during development if you installed an old version of the app in Applications, then deleted it before putting your latest and greatest build in Applications.

When you double-click the file in Finder, Mac OS will run the app in the trash and ignore the new one in Applications. The old app starts up, the main menu looks pretty much the same, so you think its the new improved version and can't understand why it isn't working. If the two versions look and behave the same apart from some minor un-archiving differences then it can take a while to figure out.

If you start the new app and use File->Open the file loads correctly. You can verify this is the problem by making some obvious temporary change to the main menu in the new version, and seeing if it appears in the app that finder starts. If it doesn't, then Finder is running an old version.

To get around this problem, you have to remove all traces of the old app from the machine. This can be surprisingly difficult if you are not used to the ins and outs of the file system. My old app version kept reappearing several days after I thought I'd killed it off.

You can use Finder's 'Open With...' to reassign the app that you want to open an individual file with.

You can also use Finder's 'Get Info...' on the file to reassign which app you want to open _all_ files of the specific type with. I've had mixed luck with this approach.

There's probably a way of going into the OS property lists to change the executable for a file type.

Best bet is to put an alias in Applications that refers to your build until you are absolutely certain that it's ready to install.

Hope this helps,

-Neil


Neil Earnshaw
Consultant Software Engineer
Object Software Engineers Ltd
email@hidden
Tel : 01747 854 852
Mbl : 07870 209 102
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Double Click app crash debugging? (From: Joseph Jones <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.