discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString retain crash


From: Luboš Doležel
Subject: NSString retain crash
Date: Mon, 15 Oct 2012 12:04:16 +0200
User-agent: Roundcube Webmail/0.5

Hi,

I have a problem where setting NSCell's value to a string crashes. I've tracked to problem down to a simple test that reproduces the crash:

NSString* str = @"test";
[str retain];

Backtrace:

#0 objc_msg_lookup_internal (receiver=<optimized out>, selector=<optimized out>, receiver=<optimized out>, selector=<optimized out>, sender=<optimized out>) at sendmsg2.c:66 #1 objc_msg_lookup (receiver=<optimized out>, selector=<optimized out>) at sendmsg2.c:398
#2  0x0000000000400796 in main () at str-retain.m:6

Why does the retain call cause a crash? I've learned that such constant strings don't use refcounting internally, but I don't think it should crash anyway.

Thanks!
--
Luboš Doležel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]