Self corruption in CFBundle
Self corruption in CFBundle
- Subject: Self corruption in CFBundle
- From: "Timothy J.Wood" <email@hidden>
- Date: Tue, 7 Feb 2006 09:16:16 -0800
Just in case anyone else hits this... logged as Radar #4435970.
-tim
----------------
We are hitting a problem where [NSBundle bundleForIdentifier:
[[NSBundle mainBundle] bundleIdentifier] starts returning nil. As
you might expect, this causes all sort of disasters (not least is
that lots of localized resource lookups start returning nil).
I've tracked this problem down to the metadata framework.
Test:
- Install two copies of an app on your machine
- In my case, we have several automatically built copies of
OmniOutliner, but a user might hit this if they accidentally
installed two copies of OO somehow.
- Run one copy
- Bring up the open panel
- Select an OmniOutliner 3 file in the open panel; no need to even
open it, the damage is done.
- The metadata framework presumably kicks in due to the 'search'
field on the open panel
Debugging through this, I find that the exact point that the bundle
gets removed from the global CFMutableDictionary of identifier-
>CFBundleRef is:
#0 0x90774fb4 in _CFBundleFlushCachesForURL ()
#1 0x90774ac4 in __CFBundleDeallocate ()
#2 0x9073e554 in _CFRelease ()
#3 0x919125ec in _LSClaimCopyKindString ()
#4 0x9190f34c in _LSCopyKindStringForRefInfo ()
#5 0x928059c0 in LockLSCopyKindStringForRefInfo ()
#6 0x9280590c in TMetaData::GetKindString ()
#7 0x92805854 in THFSPlusRef::GetKindString ()
#8 0x9280f764 in TPropertyTask::PropertyTaskProc ()
#9 0x90b43260 in PrivateMPEntryPoint ()
#10 0x9002b200 in _pthread_body ()
the URL is:
(gdb) po $r3
file://localhost/Network/Applications/Omni/Alpha/OmniOutlinerPro-3.6/
OmniOutliner Professional.app/
That is, CFBundleDeallocate has busted flushing logic. It should have:
if (lookupByID(myID) == self) {
flush stuff
}
But it apparently just flushes stuff unconditionally.
----------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden