Carbon App -> Cocoa Bundle -> Cocoa Bundle...
Carbon App -> Cocoa Bundle -> Cocoa Bundle...
- Subject: Carbon App -> Cocoa Bundle -> Cocoa Bundle...
- From: Allan Dushan <email@hidden>
- Date: Mon, 9 Feb 2004 17:36:35 -0800
I get the following bad access signals whether I call
loadNibNamed:owner or loadNibFile:externalNameTable:withZone. The
backtrace is provided below. Do I need to locate Cocoa bundles in a
specific location in the Carbon app package in order for a nib to be
loaded correctly from the Cocoa bundle?
I am trying to do the following:
1. A Carbon app loads a Cocoa bundle(1).
2. The Carbon app gets a pointer to an initialization function in the
Cocoa bundle(1).
3. The Carbon app calls the initialization function.
4. The initialization function in the Cocoa bundle(1) calls
NSApplicationLoad().
5. The initialization function then loads another Cocoa bundle(2) and
retrieves a class from the newly loaded Cocoa bundle(2).
6. The first Cocoa bundle(1) then instantiates an instance of this
class and calls its init method.
7. The first Cocoa bundle(1) then sends a message to the instance of
the new class to show a window.
8. The second Cocoa bundle(2) receives the show window message, and at
that time calls loadNibNamed:owner, and this is where it fails with the
resulting backtrace. I even tried
loadNibFile:externalNameTable:withZone and got the same backtrace.
My Carbon app package is set up as follows:
MyCarbonAppPackage
- Contents
- MacOS
- Resources
- MyBundles
- CocoaBundle(1)
- CocoaBundle(2)
Current language: auto; currently objective-c
Program received signal: "EXC_BAD_ACCESS".
(gdb) backtrace
#0 0x9019150c in CFEqual ()
#1 0x901c8974 in _CFBundleAddPreferredLprojNamesInDirectory ()
#2 0x901cc21c in _CFBundleGetLanguageSearchList ()
#3 0x901b9f38 in CFBundleCopyResourceURL ()
#4 0x94758684 in -[NSBundle pathForResource:ofType:] ()
#5 0x92ecae7c in +[NSBundle(NSNibLoading) loadNibNamed:owner:] ()
Current language: auto; currently objective-c
Program received signal: "EXC_BAD_ACCESS".
(gdb) backtrace
#0 0x9019150c in CFEqual ()
#1 0x901c8974 in _CFBundleAddPreferredLprojNamesInDirectory ()
#2 0x901cc21c in _CFBundleGetLanguageSearchList ()
#3 0x901b9f38 in CFBundleCopyResourceURL ()
#4 0x94758684 in -[NSBundle pathForResource:ofType:] ()
#5 0x92f1cf84 in -[NSBundle(NSNibLoading)
loadNibFile:externalNameTable:withZone:] ()
Hopefully this is enough info for someone to help straighten me out...
Allan
_______________________________________________
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.