I have a const string literal that is getting corrupted.
What is strange is that it is apparently behaving differently depending upon the version of XCode that is installed (I've got to do a few more experiments before I can 100% confirm this), but even if its not Xcode then I'm wondering what the cause could be.
If the exact same code is run on the exact same handset but with one run its connected to a laptop running Xcode 3.3.3 then this problem is manifesting, if the same code and same handset is run with a different laptop with XCode 4.3.2 or 4.4 installed then the problem does not manifest.
The issues is this:
HeaderFile.h
extern NSString* const kValue;
HeaderFile.m
NSString* const kValue = @"Some Value";
OtherFile.m
#import "HeaderFile.h"
...
NSLog(@"Value is: %@", kValue);
When connected to the laptop with Xcode 4.3.3 then the value logged or observed when debugging for the global constant is corrupt.
Any ideas how this could be?
As its a const literal it should not be possible for it to be scribbled over if there is a bug in my code.
UPDATE: I examined the value of kValue immediately after didFinishLaunchingWithOptions: gets called and its already corrupted at that point, so there's no opportunity for my code to scribble on it, even if it is scribable.