Hi,
I have received a few cases like the trace below - it always happens in OSX
10.10 and runModalForWindow and crashes in CFStringDeallocate. Any ideas
what that could be? I have tested 4 computers, with like 6 different OSX
versions, always works here, yet there are machines where this happens
a
On May 25, 2018, at 5:44 AM, Vojtěch Meluzín wrote:
>
> I have received a few cases like the trace below - it always happens in OSX
> 10.10 and runModalForWindow and crashes in CFStringDeallocate. Any ideas
> what that could be?
Have you run your app with the Zombies instrument?
> […] NSStrings
Thanks for the reply Ken. I don't really know what Zombies instrument is,
I'll check. The GetLength returns the number of UTF-16 characters (hence
half of the buffer length), not including zero terminator.
Cheers!
Vojtech
2018-05-25 16:26 GMT+02:00 Ken Thomases :
> On May 25, 2018, at 5:44 AM, V
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.
Cheers!
Vojtech
www.meldaproduction.com
2018-05-2
Not necessarily. I have never seen a guarantee that the C++ string functions
output their data in the exact format that [NSString
stringWithCharacters:length:] needs as an input. As you discovered, getting
UTF8 from the C++ string does give you proper data for the corresponding
NSString creator