On Tue, 15 Jul 2008 11:36:46 -0700, Markus Spoettl
<[EMAIL PROTECTED]> said:
>Hi List,
>
>   I've a problem I am failing to track down (let alone understand)
>for a couple of weeks now. My application imports XML files that
>contain - amongst other things - dates. Once in a while, the string to
>date conversion causes a crash (EXC_BAD_ACCESS):
>
>#0 0x90b1da14 in ures_getIntVector
>#1 0x90b20eb0 in icu::Calendar::setWeekCountData
>#2 0x90b1f463 in icu::GregorianCalendar::GregorianCalendar
>#3 0x90b1ee16 in icu::Calendar::createInstance
>#4 0x90b1c73e in ucal_open
>#5 0x940a097b in __CFCalendarCreateUCalendar
>#6 0x940a0a22 in __CFCalendarSetupCal
>#7 0x940a15d7 in _CFCalendarComposeAbsoluteTimeV
>#8 0x95428cbc in -[NSCFCalendar dateFromComponents:]
>#9 0x9542879b in -[NSDate(NSDate) initWithString:]
>
>This specific crash happened with the string: "2008-05-09 19:47:47
>+0000", which seems perfectly valid input for NSDate -initWithString:.

This is not really relevant, but I just wanted to mention that I have found
string-to-date conversion extraordinarily touchy. In 2003 I filed a bug
pointing out that given a string @"Thu, 3 Jul 2003 09:45:01 -0600 " (notice
the space after the 0600), NSDate dateWithNaturalLanguageString would crash
with an "internal error". Maybe there are stray spaces or nulls or some
other invisibles affecting your situation here. m.

-- 
matt neuburg, phd = [EMAIL PROTECTED], <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to