I guess I solved the problem:

I started thinking about why a locale would ever be needed - and all i could think of were strings and formatting. So I started fooling around with those... and the problem went away by using the userDefault differently: using a number (and %d) instead of a string (%@) the crashes went away....

NSString *urlString = [NSString stringWithFormat:@"%...@?act=upd&lu= %@",WS_URL,[[NSUserDefaults standardUserDefaults] objectForKey:@"lastDbUpdate"]];

became

        UInt lastupdate = [userDefaults integerForKey:@"lastDBUpdate"];
NSString *urlString = [NSString stringWithFormat:@"%...@?act=upd&lu= %d",WS_URL,lastUpdated];

with lastUpdated now coming out of userDefaults as an int, and no longer as a string.



i still have no idea why that solved the problem - my hunch would be the string parsing in the NSURLConnection - as both strings should be quite equal, no?







On 09 Apr 2009, at 20:56, Greg Guerin wrote:

david paeme wrote:

This might be more interesting... looks like the thing some crash down in the bowels of LocaleGetValue?

Locale information is often taken from environment variables. Print the environment, compare it to when it doesn't crash, and check any differences.

Next, try running your code when logged in under a new user account. If it consistently works there, you may have a setting or a haxie of some kind in your original account that's breaking the code. If it fails on the new user account, it could still be a haxie or similar, but installed at the system-wide level, typically in /Library/.

Finally, you first wrote "very similar to what's in aaron hillegass' book". Have you tried the original code exactly as given in the book? Did it also fail, or did it work? If it also fails, that suggests something about your user account, environment, machine, configuration etc. If the original works, though, it suggests you've added a bug, so double-check every addition or deletion you made.

 -- GG

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/dvdpm.cocoa%40gmail.com

This email sent to dvdpm.co...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to