简体   繁体   中英

Cocoa application built under OS X 10.6 crashes on OS X 10.7

My Cocoa application works fine on Mac OS X 10.6, however if I try to run it under 10.7, it crashes with the following stack trace:

Thread 5 Crashed:
0   libicucore.A.dylib              0x9a860a07 0x9a7df000 + 530951
1   libicucore.A.dylib              0x9a861959 0x9a7df000 + 534873
2   libicucore.A.dylib              0x9a7e26fc uloc_canonicalize + 38
3   libicucore.A.dylib              0x9a7e5179 uloc_minimizeSubtags + 71
4   libicucore.A.dylib              0x9a7e4dda icu::Calendar::setWeekData(icu::Locale const&, char const*, UErrorCode&) + 242
5   libicucore.A.dylib              0x9a7e4cd7 icu::Calendar::Calendar(icu::TimeZone*, icu::Locale const&, UErrorCode&) + 161
6   libicucore.A.dylib              0x9a7e2c73 icu::GregorianCalendar::GregorianCalendar(icu::Locale const&, UErrorCode&) + 49
7   libicucore.A.dylib              0x9a7e2248 icu::Calendar::createInstance(icu::TimeZone*, icu::Locale const&, UErrorCode&) + 762
8   libicucore.A.dylib              0x9a7dfa8a ucal_open + 352
9   com.apple.CoreFoundation        0x9b2eb41e __CFCalendarCreateUCalendar + 430
10  com.apple.CoreFoundation        0x9b2eb1a9 CFCalendarCreateWithIdentifier + 537

Can you please tell me, if it possible to fix the problem without rebuilding application under 10.7? Maybe I should somehow statically link Cocoa libraries and frameworks I'm using?

Please help!

Without rebuilding your whole program, you may have to check the version of certain libraries. If the system library changed from 10.6 to 10.7 then some of your call may need to be updated.

I don't know which dependencies you have, but maybe try to see if you have the latest version for your OSX 10.7

EDIT : I don't know if the library that contain the object calendar is something you built or not, but I would start by looking at its dependencies.

实际上,问题与NSLog类有关,出于某些愚蠢的原因,它在10.7中似乎是非线程安全的...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM