Q:

Objective-C strange appearance in debugger after stringByReplacingOccurrencesOfString

I´m on Mac OS X and Xcode 4.5.2 
When executing these lines:
NSString *asSrcFileName = @"chromebar.png"
NSString *asSrcExtName  = @".png"
NSString *asTempName    = [asSrcFileName stringByReplacingOccurrencesOfString:asSrcExtName withString:@""];

I get a strange view of my variables in the debugger. See rectangle:

I expected asTmp to be @"chromebar" after line three. 
I´ve been using stringByReplacingOccurrencesOfString pretty often so far and have no idea what´s wrong. Somehow it looks like there is a unicode issue. 
Anyone out there to shed some light on me?

A:

Are you inspecting asSrcTempName after the variable has been initialized (the green line showing the current execution point is below the initialization)?
Otherwise it's probably only uninitialized memory and lldb is showing garbage from a previous run.
I could not reproduce your problem in Xcode 4.5.1.

