To check the existence of any threading issue I tried using Thread Sanitiser. But upon enabling it in Edit Scheme my app is crashing as soon as I launch the app. Below is the stack backtrace.
* thread #1, stop reason = signal SIGABRT
* frame #0: 0x0000000117791ad6 libsystem_kernel.dylib`__abort_with_payload + 10
frame #1: 0x00000001177933df libsystem_kernel.dylib`abort_with_payload_wrapper_internal + 80
frame #2: 0x000000011779338f libsystem_kernel.dylib`abort_with_reason + 19
frame #3: 0x00000001177d8c29 libsystem_pthread.dylib`pthread_self.cold.1 + 24
frame #4: 0x00000001177d2334 libsystem_pthread.dylib`pthread_self + 35
frame #5: 0x000000010ea1516b libclang_rt.tsan_iossim_dynamic.dylib`__tsan::cur_thread() + 11
frame #6: 0x000000010e9ea985 libclang_rt.tsan_iossim_dynamic.dylib`wrap_sysctlbyname + 37
frame #7: 0x00000001176bd390 libsystem_sim_kernel.dylib`assert_simulator_supported_host + 44
frame #8: 0x0000000116301a0c libSystem.B.dylib`libSystem_initializer + 56
frame #9: 0x000000010e928f14 dyld_sim`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 518
frame #10: 0x000000010e929112 dyld_sim`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
frame #11: 0x000000010e924547 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 343
frame #12: 0x000000010e9244d3 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 227
frame #13: 0x000000010e9244d3 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 227
frame #14: 0x000000010e9244d3 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 227
frame #15: 0x000000010e923704 dyld_sim`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 134
frame #16: 0x000000010e923798 dyld_sim`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 74
frame #17: 0x000000010e917342 dyld_sim`dyld::initializeMainExecutable() + 129
frame #18: 0x000000010e91b497 dyld_sim`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4395
frame #19: 0x000000010e916624 dyld_sim`start_sim + 136
frame #20: 0x000000011092879a dyld`dyld::useSimulatorDyld(int, macho_header const*, char const*, int, char const**, char const**, char const**, unsigned long*, unsigned long*) + 2308
frame #21: 0x0000000110926432 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 837
frame #22: 0x0000000110921227 dyld`dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 453
frame #23: 0x0000000110921025 dyld`_dyld_start + 37
I also tried changing Strip Style from All Symbols to Debugging Symbols but no avail. Any suggestion in this regard will be helpful. Thanks.
Which Xcode version are you using?
Because in Release Notes of Xcode 11.3.1 you can find a fix for the Thread Sanitizer.
Resolved an issue that prevented Xcode from launching processes with Thread Sanitizer enabled on macOS Catalina 10.15.2. (57822138)
Related
My app in TestFlight has a few times crashed on launch, and when it decides to crash it will do so on every launch afterwards. Only way to fix it, is to reinstall the app, and then in a future time it will crash again, so I have no idea how to reproduce the crash.
I have the crash log, but I am unsure what to read from it. The app is pure SwiftUI.
Incident Identifier: 643EF787-991A-41DD-98C9-CFFCEA4C8982
CrashReporter Key: 8eb3731ae5012452a0a5758baaacba1a94696953
Hardware Model: iPhone12,3
Process: TimeMindster [5006]
Path: /private/var/containers/Bundle/Application/99C55F69-E5DA-47CF-BC59-CBC20965489F/TimeMindster.app/TimeMindster
Identifier: com.magnuskahr.TimeMindster
Version: 12 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.magnuskahr.TimeMindster [1341]
Date/Time: 2021-04-28 21:14:04.6293 +0200
Launch Time: 2021-04-28 21:14:04.0304 +0200
OS Version: iPhone OS 14.5 (18E199)
Release Type: User
Baseband Version: 2.04.07
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001b3a3f334 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001d1461aa0 pthread_kill + 272
2 libsystem_c.dylib 0x000000018edc6b90 abort + 104
3 AttributeGraph 0x00000001aee71a6c util::Heap::Heap+ 121452 (void*, unsigned long, unsigned long) + 0
4 AttributeGraph 0x00000001aee5f4cc AG::Graph::any_inputs_changed+ 46284 (AG::data::ptr<AG::Node>, unsigned int const*, unsigned long) + 0
5 AttributeGraph 0x00000001aee7109c AGGraphGetValue + 232
6 SwiftUI 0x000000018c450344 MergePreferenceKeys.rhs.getter + 32
7 SwiftUI 0x000000018c450394 MergePreferenceKeys.value.getter + 52
8 SwiftUI 0x000000018c0ecf64 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>+ 1949540 (_:) + 36
9 SwiftUI 0x000000018c148490 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>+ 2323600 (_:) + 48
10 AttributeGraph 0x00000001aee5977c AG::Graph::UpdateStack::update+ 22396 () + 492
11 AttributeGraph 0x00000001aee59bb4 AG::Graph::update_attribute+ 23476 (AG::data::ptr<AG::Node>, bool) + 332
12 AttributeGraph 0x00000001aee5f2fc AG::Graph::input_value_ref_slow+ 45820 (AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 364
13 AttributeGraph 0x00000001aee7109c AGGraphGetValue + 232
14 SwiftUI 0x000000018c0bbd00 specialized HostPreferencesWriter.updateValue+ 1748224 () + 136
15 SwiftUI 0x000000018c10c5ac partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>+ 2078124 (_:) + 24
16 AttributeGraph 0x00000001aee5977c AG::Graph::UpdateStack::update+ 22396 () + 492
17 AttributeGraph 0x00000001aee59bb4 AG::Graph::update_attribute+ 23476 (AG::data::ptr<AG::Node>, bool) + 332
18 AttributeGraph 0x00000001aee5f2fc AG::Graph::input_value_ref_slow+ 45820 (AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 364
19 AttributeGraph 0x00000001aee7109c AGGraphGetValue + 232
20 SwiftUI 0x000000018c0bbcd8 specialized HostPreferencesWriter.updateValue+ 1748184 () + 96
21 SwiftUI 0x000000018c10c5ac partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>+ 2078124 (_:) + 24
22 AttributeGraph 0x00000001aee5977c AG::Graph::UpdateStack::update+ 22396 () + 492
23 AttributeGraph 0x00000001aee59bb4 AG::Graph::update_attribute+ 23476 (AG::data::ptr<AG::Node>, bool) + 332
24 AttributeGraph 0x00000001aee5f2fc AG::Graph::input_value_ref_slow+ 45820 (AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 364
25 AttributeGraph 0x00000001aee7109c AGGraphGetValue + 232
26 SwiftUI 0x000000018c0bbcd8 specialized HostPreferencesWriter.updateValue+ 1748184 () + 96
27 SwiftUI 0x000000018c10c5ac partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>+ 2078124 (_:) + 24
28 AttributeGraph 0x00000001aee5977c AG::Graph::UpdateStack::update+ 22396 () + 492
29 AttributeGraph 0x00000001aee59bb4 AG::Graph::update_attribute+ 23476 (AG::data::ptr<AG::Node>, bool) + 332
30 AttributeGraph 0x00000001aee5f2fc AG::Graph::input_value_ref_slow+ 45820 (AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 364
31 AttributeGraph 0x00000001aee7109c AGGraphGetValue + 232
32 SwiftUI 0x000000018c2b8ecc DynamicPreferenceCombiner.value.getter + 1028
33 SwiftUI 0x000000018c1a3144 implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>+ 2695492 (_:) + 252
34 AttributeGraph 0x00000001aee5977c AG::Graph::UpdateStack::update+ 22396 () + 492
35 AttributeGraph 0x00000001aee59bb4 AG::Graph::update_attribute+ 23476 (AG::data::ptr<AG::Node>, bool) + 332
36 AttributeGraph 0x00000001aee5ed6c AG::Graph::value_ref+ 44396 (AG::AttributeID, AGSwiftMetadata const*, bool*) + 156
37 AttributeGraph 0x00000001aee710e4 AGGraphGetValue + 304
38 SwiftUI 0x000000018c97649c GraphHost.updatePreferences+ 10900636 () + 56
39 SwiftUI 0x000000018c3fd188 ViewGraph.updateOutputs+ 5161352 (at:) + 112
40 SwiftUI 0x000000018c8c1688 closure #1 in ViewRendererHost.render+ 10159752 (interval:updateDisplayList:) + 1508
41 SwiftUI 0x000000018c8b7bdc ViewRendererHost.render+ 10120156 (interval:updateDisplayList:) + 308
42 SwiftUI 0x000000018c2cc72c closure #1 in _UIHostingView.requestImmediateUpdate+ 3913516 () + 72
43 SwiftUI 0x000000018ca4d89c thunk for #escaping #callee_guaranteed () -> + 11782300 () + 28
44 libdispatch.dylib 0x0000000185631a54 _dispatch_call_block_and_release + 32
45 libdispatch.dylib 0x00000001856337ec _dispatch_client_callout + 20
46 libdispatch.dylib 0x0000000185641c40 _dispatch_main_queue_callback_4CF + 884
47 CoreFoundation 0x00000001859c01f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
48 CoreFoundation 0x00000001859ba0d0 __CFRunLoopRun + 2524
49 CoreFoundation 0x00000001859b91c0 CFRunLoopRunSpecific + 600
50 GraphicsServices 0x000000019cfa1734 GSEventRunModal + 164
51 UIKitCore 0x00000001884277e4 -[UIApplication _run] + 1072
52 UIKitCore 0x000000018842d054 UIApplicationMain + 168
53 SwiftUI 0x000000018c8fd350 closure #1 in KitRendererCommon+ 10404688 (_:) + 112
54 SwiftUI 0x000000018c8fd2dc runApp<A>+ 10404572 (_:) + 224
55 SwiftUI 0x000000018c3f5b4c static App.main+ 5131084 () + 144
56 TimeMindster 0x000000010230dce0 0x102294000 + 498912
57 TimeMindster 0x000000010230dd80 0x102294000 + 499072
58 libdyld.dylib 0x0000000185675cf8 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x00000001d1469744 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00000001d1469744 start_wqthread + 0
Thread 3 name: Dispatch queue: com.apple.root.utility-qos
Thread 3:
0 libswiftCore.dylib 0x000000018994b154 swift_conformsToProtocolImpl(swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptor<swift::InProcess> const*)::$_5::operator()((anonymous namespace)::ConformanceSection const&) const::'lambda'(swift::TargetProtocolConformanceDescriptor<swift::InProcess> const&)::operator()+ 3895636 (swift::TargetProtocolConformanceDescriptor<swift::InProcess> const&) const + 40
1 libswiftCore.dylib 0x000000018994a344 swift_conformsToProtocolImpl+ 3892036 (swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptor<swift::InProcess> const*) + 596
2 libswiftCore.dylib 0x000000018994a344 swift_conformsToProtocolImpl+ 3892036 (swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptor<swift::InProcess> const*) + 596
3 AttributeGraph 0x00000001aee65d2c AG::LayoutDescriptor::Builder::visit_element+ 73004 (AG::swift::metadata const*, AG::swift::metadata::ref_kind, unsigned long) + 212
4 AttributeGraph 0x00000001aee576d4 AG::swift::metadata_visitor::visit_field+ 14036 (AG::swift::metadata const*, AG::swift::field_record const&, unsigned long) + 96
5 AttributeGraph 0x00000001aee56e64 AG::swift::metadata::visit+ 11876 (AG::swift::metadata_visitor&) const + 820
6 AttributeGraph 0x00000001aee660e8 AG::LayoutDescriptor::Builder::visit_case+ 73960 (AG::swift::metadata const*, AG::swift::field_record const&, unsigned int) + 376
7 AttributeGraph 0x00000001aee56de0 AG::swift::metadata::visit+ 11744 (AG::swift::metadata_visitor&) const + 688
8 AttributeGraph 0x00000001aee65e08 AG::LayoutDescriptor::Builder::visit_element+ 73224 (AG::swift::metadata const*, AG::swift::metadata::ref_kind, unsigned long) + 432
9 AttributeGraph 0x00000001aee576d4 AG::swift::metadata_visitor::visit_field+ 14036 (AG::swift::metadata const*, AG::swift::field_record const&, unsigned long) + 96
10 AttributeGraph 0x00000001aee56e64 AG::swift::metadata::visit+ 11876 (AG::swift::metadata_visitor&) const + 820
11 AttributeGraph 0x00000001aee66bdc AG::LayoutDescriptor::make_layout+ 76764 (AG::swift::metadata const*, AGComparisonMode, AG::LayoutDescriptor::HeapMode) + 624
12 AttributeGraph 0x00000001aee67eb4 AG::(anonymous namespace)::LayoutCache::drain_queue+ 81588 (void*) + 152
13 libdispatch.dylib 0x00000001856337ec _dispatch_client_callout + 20
14 libdispatch.dylib 0x00000001856450dc _dispatch_root_queue_drain + 688
15 libdispatch.dylib 0x00000001856457a8 _dispatch_worker_thread2 + 112
16 libsystem_pthread.dylib 0x00000001d1462768 _pthread_wqthread + 216
17 libsystem_pthread.dylib 0x00000001d146974c start_wqthread + 8
Thread 4:
0 libsystem_pthread.dylib 0x00000001d1469744 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x00000001d1469744 start_wqthread + 0
Thread 6 name: com.apple.uikit.eventfetch-thread
Thread 6:
0 libsystem_kernel.dylib 0x00000001b3a1a4fc mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b3a19884 mach_msg + 76
2 CoreFoundation 0x00000001859bfd10 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x00000001859b9bb0 __CFRunLoopRun + 1212
4 CoreFoundation 0x00000001859b91c0 CFRunLoopRunSpecific + 600
5 Foundation 0x0000000186c99fac -[NSRunLoop+ 32684 (NSRunLoop) runMode:beforeDate:] + 232
6 Foundation 0x0000000186c99e78 -[NSRunLoop+ 32376 (NSRunLoop) runUntilDate:] + 92
7 UIKitCore 0x00000001884dc38c -[UIEventFetcher threadMain] + 516
8 Foundation 0x0000000186e0b2fc __NSThread__start__ + 864
9 libsystem_pthread.dylib 0x00000001d1460c00 _pthread_start + 320
10 libsystem_pthread.dylib 0x00000001d1469758 thread_start + 8
Thread 7:
0 libsystem_pthread.dylib 0x00000001d1469744 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x00000001d1469744 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x00000000000062dc x5: 0x000000000000000b x6: 0x000000000000000a x7: 0x000000000000003e
x8: 0x6f2c18735f2b4680 x9: 0x6f2c18725da73e40 x10: 0x00000000000007fd x11: 0x000000000000005e
x12: 0x0000000000000001 x13: 0x00000000d180105d x14: 0x00000000d1a01800 x15: 0x0000000000001800
x16: 0x0000000000000148 x17: 0x00000001028c78c0 x18: 0x000000011111fe1c x19: 0x0000000000000006
x20: 0x0000000000000103 x21: 0x00000001028c79a0 x22: 0x000000000001ca18 x23: 0x0000000000000000
x24: 0x0000000000000000 x25: 0x000000000000f618 x26: 0x00000001e7f20950 x27: 0x0000000102b1d66c
x28: 0x0000000102b0f418 fp: 0x000000016db69400 lr: 0x00000001d1461aa0
sp: 0x000000016db693e0 pc: 0x00000001b3a3f334 cpsr: 0x40000000
esr: 0x56000080 Address size fault
I had experienced same problem. It was caused by combination of AnyView and NSViewRepresentable wrapper for WKWebView. Getting rid of AnyView by rewriting helper function with #ViewBuilder fixed the problem.
Problem:
func viewFunc() -> AnyView {
switch self {
case .case1: return AnyView(ListOfWebViewWrappers())
default: return AnyView(WaitView())
}
}
Solution:
#ViewBuilder
func viewFunc() -> some View {
switch self {
case .case1: ListOfWebViewWrappers()
default: WaitView()
}
}
the #ViewBuilder allows SwiftUI to properly track each view's identity and properly manage resources. More information about view's identity: https://developer.apple.com/videos/play/wwdc2021/10022/
(XCode 7.2.1)
I have a Swift object that wants to pass itself to a C function :
some_c_function(UnsafeMutablePointer(Unmanaged.passUnretained(self).toOpaque()));
Where some_c_function is a C function accessed via a bridging header:
void some_c_function(void* swiftObject);
That call to some_c_function crashes the Swift compiler:
0 swift 0x00000001028c2fbb llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x00000001028c36fb SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff88809f1a _sigtramp + 26
3 swift 0x00000001026a64cf llvm::DICompositeType::getImpl(llvm::LLVMContext&, unsigned int, llvm::MDString*, llvm::Metadata*, unsigned int, llvm::Metadata*, llvm::Metadata*, unsigned long long, unsigned long long, unsigned long long, unsigned int, llvm::Metadata*, unsigned int, llvm::Metadata*, llvm::Metadata*, llvm::MDString*, llvm::Metadata::StorageType, bool) + 975
4 swift 0x0000000100ace9ad swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 10973
5 swift 0x0000000100a35053 swift::irgen::IRGenModuleDispatcher::emitLazyDefinitions() + 307
6 swift 0x0000000100ab549a performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1034
7 swift 0x0000000100ab5830 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 64
8 swift 0x00000001009b4265 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 13701
9 swift 0x00000001009b0ad3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2691
10 swift 0x00000001009ad154 main + 2324
11 libdyld.dylib 0x00007fff8f1555c9 start + 1
Am I doing something wrong?
I'm facing a really strange behavior in an iPad App. I create several bundles, the app downloads them an saves them to the documents directory.
I have a custom bundle manager where i can load the bundles like this.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *bundlePath;
if (![bundleName hasSuffix:#".bundle"]) {
bundlePath = [documentsDirectory stringByAppendingFormat:#"/%#.bundle", bundleName];
} else {
bundlePath = [documentsDirectory stringByAppendingFormat:#"/%#", bundleName];
}
NSBundle *bundle = nil;
NSError *error = nil;
bundle = [[NSBundle alloc] initWithPath:bundlePath];
if (!bundle) {
return nil;
}
[bundle loadAndReturnError:&error];
In debug mode all code works like a charm. The bundle gets loaded and the content can be used in the app. The bundles contain images and nibs, no code. In the bundle build settings I've set COMBINE_HIDPI_IMAGES to NO, so that the images will not be combined as tiff images. The bundles also do not contain any code.
So what's the problem. Well when starting the app without debugging (not connected to Xcode) the app crashes and generates this error message. [bundle loadAndReturnError:&error] is where the code crashes.
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 dyld 0x2fe8e2d8 strcmp + 0
1 dyld 0x2fe83aac ImageLoaderMachO::parseLoadCmds() + 56
2 dyld 0x2fe88d30 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, ImageLoader::LinkContext const&) + 296
3 dyld 0x2fe839c6 ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 222
4 dyld 0x2fe7b0d4 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 664
5 dyld 0x2fe7e774 dyld::loadPhase5stat(char const*, dyld::LoadContext const&, stat*, int*, bool*, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 428
6 dyld 0x2fe7e498 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 248
7 dyld 0x2fe7e37c dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 128
8 dyld 0x2fe7e29c dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 984
9 dyld 0x2fe7dc36 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 110
10 dyld 0x2fe7ada4 dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 168
11 dyld 0x2fe7ab58 dyld::load(char const*, dyld::LoadContext const&) + 208
12 dyld 0x2fe7f8da dlopen + 802
13 libdyld.dylib 0x39dee946 dlopen + 46
14 CoreFoundation 0x31ab4910 _CFBundleDlfcnLoadBundle + 128
15 CoreFoundation 0x31ab478c _CFBundleLoadExecutableAndReturnError + 356
16 Foundation 0x323d2154 -[NSBundle loadAndReturnError:] + 844
17 Visitor Self Service 0x000e251a -[CoreBundleManager bundleForName:] (CoreBundleManager.m:70)
18 Visitor Self Service 0x000cd418 -[CoreProcessDefinition processBundle] (CoreProcessDefinition.m:226)
19 Visitor Self Service 0x000cf17e -[CoreProcessRuntime loadControllerForStep:] (CoreProcessRuntime.m:187)
20 Visitor Self Service 0x000ce9f4 -[CoreProcessRuntime performNextStepInProcessDefinition] (CoreProcessRuntime.m:112)
21 Visitor Self Service 0x000ba642 __62-[DynamicViewController prepareControllerForProcessDefinition]_block_invoke (DynamicViewController.m:107)
22 libdispatch.dylib 0x39ddb790 _dispatch_call_block_and_release + 8
23 libdispatch.dylib 0x39dde8be _dispatch_after_timer_callback + 10
24 libdispatch.dylib 0x39ddb5d8 _dispatch_client_callout + 20
25 libdispatch.dylib 0x39ddc48a _dispatch_source_invoke + 254
26 libdispatch.dylib 0x39ddee04 _dispatch_main_queue_callback_4CF + 164
27 CoreFoundation 0x31afb1ac __CFRunLoopRun + 1284
28 CoreFoundation 0x31a6e238 CFRunLoopRunSpecific + 352
29 CoreFoundation 0x31a6e0c4 CFRunLoopRunInMode + 100
30 GraphicsServices 0x35629336 GSEventRunModal + 70
31 UIKit 0x3398a2b4 UIApplicationMain + 1116
32 Visitor Self Service 0x000b66d8 main (main.m:16)
33 libdyld.dylib 0x39deeb1c start + 0
Finally I got it working.
There are several steps for setting up a proper bundle.
In the Project Build Settings for the Bundle set
Architectures => armv7, armv7s
Supported Plattforms => iOS
Valid Architectures => armv7, armv7s
Set up a valid Code Sign Identity
Set up a matching provisioning profile
You also need a Info.plist
Required Device Capabilities => armv7, armv7s
Principal Class => Your bundles principal class name
Executable File => Same as Principal Class
Note
External code execution is prohibited by the Apple Review Guidelines, so it's only possible in In-House Apps.
2.7 Apps that download code in any way or form will be rejected
2.8 Apps that install or launch other executable code will be rejected
I retrieved the crash reports from iTunes Connect.
I referenced this site.
http://webcache.googleusercontent.com/search?q=cache:MmxwdXObZLMJ:www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/+iphone+crash+debig&cd=2&hl=en&ct=clnk
I tried....
$ symbolicatecrash report.crash MobileLines.app.dSYM > report-with-symbols.crash
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/PrivateFrameworks/WebCore.framework/WebCore<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Frameworks/Foundation.framework/Foundation<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/usr/lib/libSystem.B.dylib<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Frameworks/UIKit.framework/UIKit<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Frameworks/OpenGLES.framework/MBXGLEngine.bundle/MBXGLEngine<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox<br><br>
Error in symbol file for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.2 (7D11)/Symbols/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
BUT... I didn't result. (find error message)
* This directory is located "bulid/Distribution-iphones"
* "MYGAME.app" file and "MYGAME.app.dSYM" file is located in same directory.
How can i do solve this problem. ?
Please help me :)
* Crash log (carsh at thread 2 )
-----------------------------------------------------------
Incident Identifier: 95230C2E-CD83-46BF-8DAE-F38BCD46B910<br>
Process: MYGAMELite [303]<br>
Path: /var/mobile/Applications/4FB79BEC-2BF0-438B-82A8-C302CD52A85C/MYGAMELite.app/MYGAMELite<br>
Identifier: MYGAMELite<br>
Version: ??? (???)<br>
Code Type: ARM (Native)<br>
Parent Process: launchd [1]<br><br>
Date/Time: 2010-06-03 11:43:52.875 +0800<br>
OS Version: iPhone OS 3.1.2 (7D11)<br>
Report Version: 104<br><br>
Exception Type: EXC_BAD_ACCESS (SIGSEGV)<br>
Exception Codes: KERN_INVALID_ADDRESS at 0x03e3a002<br>
Crashed Thread: 2<br><br>
Thread 2 Crashed:<br>
0 AudioToolbox 0x330d708c AU3DMixerEmbedded::SumInput16(unsigned long, AudioBufferList const&, AudioBufferList const&, unsigned long, float, unsigned long)
<br>1 AudioToolbox 0x330d89a0 AU3DMixerEmbedded::Render(unsigned long&, AudioTimeStamp const&, unsigned long)
<br>2 AudioToolbox 0x32fe6bb8 AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&)
<br>3 AudioToolbox 0x32fe6504 Render
<br>4 AudioToolbox 0x330160b8 AUInputElement::PullInput(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long)
<br>5 AudioToolbox 0x33023fa8 AUInputFormatConverter2::InputProc(OpaqueAudioConverter*, unsigned long*, AudioBufferList*, AudioStreamPacketDescription**, void*)
<br>6 AudioToolbox 0x32fe4b60 AudioConverterChain::CallInputProc(unsigned long)
<br>7 AudioToolbox 0x32fe4a5c AudioConverterChain::FillBufferFromInputProc(unsigned long*, CABufferList*)
<br>8 AudioToolbox 0x32fe4790 BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&)
<br>9 AudioToolbox 0x33023e30 CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
<br>10 AudioToolbox 0x32fe4284 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
<br>11 AudioToolbox 0x32fe44a4 AudioConverterChain::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
<br>12 AudioToolbox 0x32fe4284 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
<br>13 AudioToolbox 0x32fe3f10 AudioConverterFillComplexBuffer
<br>14 AudioToolbox 0x33023844 AUConverterBase::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long)
<br>15 AudioToolbox 0x330ce928 AURemoteIO::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long)
<br>16 AudioToolbox 0x32fe6bb8 AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&)
<br>17 AudioToolbox 0x330cf308 AURemoteIO::PerformIO(int, unsigned int, unsigned int, AQTimeStamp const&, AQTimeStamp const&)
<br>18 AudioToolbox 0x330cf4cc AURIOCallbackReceiver_PerformIOSync
<br>19 AudioToolbox 0x330c76fc _XPerformIOSync
<br>20 AudioToolbox 0x330181d8 mshMIGPerform
<br>21 AudioToolbox 0x3309cec8 MSHMIGDispatchMessage
<br>22 AudioToolbox 0x330d48d4 AURemoteIO::IOThread::Entry(void*)
<br>23 AudioToolbox 0x32fc9f20 CAPThread::Entry(CAPThread*)
<br>24 libSystem.B.dylib 0x30b5b7b0 _pthread_body
---------------------------------------------------------------------------------
There's no need to do symbolication, as the crash log has been symbolicated. "Symbolication" just turns all numerical addresses into meaningful function names.
In your case, it seems the audio file is messed up.
I am getting leak and I cannot detect from where this is happening. The stack trace does not give full info after dyld open. For few leaks I am not getting any stack trace info. All I get is only object memory address. Is anyone else facing the same issue. I am using XCode 3.2 on show leopard.
18 0x103038
17 0x1033c7
16 0x1034a1
15 0x90145f48
14 dyld dlopen
13 dyld dyld::link(ImageLoader*, bool, ImageLoader::RPathChain const&)
12 dyld ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, ImageLoader::RPathChain const&)
11 dyld ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&)
10 dyld dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*)
9 dyld dyld::load(char const*, dyld::LoadContext const&)
8 dyld dyld::loadPhase0(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*)
7 dyld dyld::loadPhase1(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*)
6 dyld dyld::loadPhase3(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*)
5 dyld dyld::loadPhase4(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*)
4 dyld dyld::loadPhase5(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*)
3 dyld dyld::mkstringf(char const*, ...)
2 dyld strdup
1 dyld mallocenter
I'm seeing very similar behavior in xcode 3.2. The dyld leak, that didn't appear in xcode 3.1.x, and I'm not seeing anything other than a memory address for any other leaks. Just to prove I wasn't crazy, I instantiated several UILabels using alloc and didn't release them. Sure enough, xcode shows UILabel leaks, but the stacktrace is only memory addresses. In 3.1.x I used to see a stack that was much more meaningful, complete with class names. Is this a bug in the new xcode?