re:Cross developement question
re:Cross developement question
- Subject: re:Cross developement question
- From: Paul Miller <email@hidden>
- Date: Wed, 16 Feb 2005 09:54:20 +0000
Tomas,
The host application crashes when it tries to unload that bundle
built with 10.2.8 cross development. If I switch back to "Current Mac
OS" it works perfectly.
What may be the problem?
Tomas
--
# Ing. Tomas Zahradnicky, Jr.
# The Czech Technical University
# Dept of Computer Science, FEE-CTU Prague
I had a similar problem and it turned out to be due to the CFSTR()
macro. As far as I can tell, if you build without an SDK CFSTR() will
generate normal CFStringRefs via CFStringCreateWithCString. When you
unload the bundle these strings are still valid. If you build using
the 10.2.8 or 10.3.0 SDKs (not tried any others), CFSTR() expands to
__builtin__CFStringMakeConstantString - these CFStrings seem to refer
directly to the c-string in your bundle so when the bundle is unloaded
they no longer point to valid memory.
The usual symptom I saw was that either the bundle release would crash
or a later call to a CFPreferences API would fail.
As has been noted elsewhere on this list you should never unload
bundles containing Objective-C classes.
My solution was not to release bundles after I had loaded them.
regards,
Paul Miller
AVA CAD/CAM.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden