Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
- Subject: Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
- From: "Matt Fox-Wilson" <email@hidden>
- Date: Tue, 19 Dec 2006 11:28:48 +1300
Hi all,
I've got a user reporting a crash in my product (Carbon product, making
Cocoa calls hence my post to this list) since installing the latest security
patch for 10.3.9. The product is built with the 10.4u SDK for Intel, 10.3.9
SDK for PPC, and is set to a 10.3 Development Target and G3 model tuning and
CPU for PPC (we still have a fair few users on G3 machines).
Sending him a deployment build without the deployment post-processing in
order to examine the process, we can see that he's getting an access
violation in objc_msgSend somewhere in the following code:
---------------
gCString sResult = L"";
UniChar* sSource = (UniChar*)(uint16*)sRef;
if (sRef.Length() < 1) return sResult;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *
nsSrc = [NSString stringWithCharacters:sSource length:sRef.Length()];
NSString* nsExt = [nsSrc lastPathComponent];
sResult.CopyString((CFStringRef)nsExt);
return sResult;
---------------
The gCString is an internal C++ string handling class we have that does a
bunch of memory checking so I suspect it's not in there (it also doesn't
call any Cocoa functions). Given that the crash is in objc_msgSend, I'm
assuming it's somewhere either in the NSAutoReleasePool code or
stringWithCharacters.
The code is working fine for some 10.3.9 users (I got my old G4 Cube up and
running 10.3.9 again with all the updates and it runs fine), and fine for
10.4 PPC and Intel users.
We've done some research to try and see if anyone else had similar problems
and found some notes that looked very familiar
(http://lists.apple.com/archives/carbon-dev/2006/Aug/msg00659.html).
However, the conclusion in that thread seemed to indicate that turning off
'Accelerated Objective-C Dispatch' in Xcode solved their problem. This was
already turned off in our projects so it looks like we have a different
issue, or at least require a different solution.
Does anyone have any idea what could be happening here? While it's only one
user, I'm concerned that we're doing something that might cause this to
happen for more over time and I want to make sure I understand the problem.
Any ideas would be much appreciated.
- Matt Fox-Wilson
- email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden