Re: Crashes inside CFStringDeallocate
Re: Crashes inside CFStringDeallocate
- Subject: Re: Crashes inside CFStringDeallocate
- From: Alastair Houghton <email@hidden>
- Date: Tue, 29 May 2018 15:39:13 +0100
On 25 May 2018, at 22:18, Vojtěch Meluzín <email@hidden> wrote:
>
> Ok so I got a solution - it's the utf16 indeed. When I use [NSString
> stringWithUTF8String] instead, it doesn't crash. Considering it does that
> only on 10.10 (and probably older), it seems like OSX malfunction... oh
> well... Fortunately no big deal.
That’s extremely unlikely. Plenty of code constructs NSStrings from UTF-16
data, and the rest of us aren’t seeing crashes in CFStringDeallocate.
There’s clearly some kind of bug in your code, but it doesn’t appear to be in
the lines you showed us. If I had to guess, I’d say you’ve over-released your
NSString somehow (leading to an attempted double free of the underlying
storage); turning on Zombies in your Xcode build scheme is not a bad idea, and
turning on the malloc debugging features (MallocStackLogging and
MallocStackLoggingNoCompact might be helpful) might be a good fallback option
if enabling zombies doesn’t show you precisely where things are going wrong.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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