Debugging

RSS for tag

Discover and resolve issues with your app.

Pinned Posts

Posts under Debugging tag

408 Posts
Sort by:
Post not yet marked as solved
1 Replies
233 Views
So, it seems to be a bug in the Xcode 14 beta (M1). Some assets just can't be compiled and lead to fatal compilation error 'Command CompileAssetCatalog failed with a nonzero exit code'. Here (h ttps://morioh.com/p/2d58b31db5f7) is written that the problem is in SVGs but I had the same problems with some PDFs, PNGs and JPGs. The same project builds with no errors in Xcode 13.4.1 Seems to me that I'm not the only one with this problem but I haven't found any workaround for this.
Posted
by
Post not yet marked as solved
0 Replies
108 Views
I don’t have a fundamental background in Computer Science or Computing Engineering. I want to learn more about how to do code debugging, but within the bounds of how Xcode provides various debugging panes. I’ve seen a number of WWDC session videos about Xcode and debugging. However I really need to learn more about the fundamentals of using Xcode panes like the stack trace pane, the variables pane, and the debugging console. I would greatly appreciate any advice on tutorials, videos, WWDC sessions, etc. that go to the basic levels of what these panes show, how to interpret the content, and how to interact with the information in various Xcode debugging-related panes. Thank you.
Posted
by
Post not yet marked as solved
0 Replies
100 Views
Running on the simulator & iPhone through XCode works, but when I create an IPA it crashes on start with this error: Incident Identifier: 6BAB10BB-6228-41CF-A456-C9CD42C8F649 CrashReporter Key: 192b0ab51f833d16a3665fc620b94abab20ee8d5 Hardware Model: iPhone13,3 Process: xyz [917] Path: /private/var/containers/Bundle/Application/7E1838A7-DB85-4D54-90A4-79BC75B3A9F8/xyz.app/xyz Identifier: com.xyz.xyz.build Version: 1.3.0 (202) AppStoreTools: 13E500a Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.xyz.xyz.build [527] Date/Time: 2022-06-14 13:27:22.0134 +0200 Launch Time: 2022-06-14 13:27:21.7531 +0200 OS Version: iPhone OS 15.4.1 (19E258) Release Type: User Baseband Version: 2.53.01 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 0x1b923db78 __pthread_kill + 8 1 libsystem_pthread.dylib 0x1f2eac3bc pthread_kill + 268 2 libsystem_c.dylib 0x18c85851c abort + 168 3 libswiftCore.dylib 0x1054b8b30 _hidden#25421_ + 0 4 libswiftCore.dylib 0x1054b0dc8 _hidden#24807_ + 0 5 dyld 0x104d98910 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 164 6 dyld 0x104dcc780 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 168 7 dyld 0x104d964d8 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 528 8 dyld 0x104d956b8 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168 9 dyld 0x104d94a04 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192 10 dyld 0x104dcc310 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 148 11 dyld 0x104da20b4 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 432 12 dyld 0x104d9ec28 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 172 13 dyld 0x104d9a584 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 216 14 dyld 0x104d9a560 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 180 15 dyld 0x104da07ac dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 124 16 dyld 0x104dc04a0 dyld4::APIs::runAllInitializersForMain() + 312 17 dyld 0x104dab76c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3060 18 dyld 0x104da9cc4 start + 488 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000000300500 x5: 0x0000000000000020 x6: 0x0049000004210143 x7: 0x0000000000000001 x8: 0xb12da82a6bd6f68b x9: 0xb12da82b6f09330b x10: 0x0000000000000000 x11: 0x0000000000000002 x12: 0x00000000866657fb x13: 0x0000000006665000 x14: 0x0000000006600000 x15: 0x00000000000000ff x16: 0x0000000000000148 x17: 0x0000000104dfc580 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x0000000000000103 x21: 0x0000000104dfc660 x22: 0x00000001055546e8 x23: 0x0000000105218dd0 x24: 0x0000000105218830 x25: 0x000000016b6beae0 x26: 0x0000000105218dd0 x27: 0x0000000000001178 x28: 0x0000000104b717b0 fp: 0x000000016b6be7f0 lr: 0x00000001f2eac3bc sp: 0x000000016b6be7d0 pc: 0x00000001b923db78 cpsr: 0x40001000 far: 0x00000001d852db08 esr: 0x56000080 Address size fault Binary Images: 0x1b9236000 - 0x1b926bfff libsystem_kernel.dylib arm64e <c2fcc05874803c14b4790064a3f843e3> /usr/lib/system/libsystem_kernel.dylib 0x1f2ea5000 - 0x1f2eb0fff libsystem_pthread.dylib arm64e <b48efcbed4f7308ba3fa172e0ea78e33> /usr/lib/system/libsystem_pthread.dylib 0x18c838000 - 0x18c8b7fff libsystem_c.dylib arm64e <b0793d31ed1b3549b86192a10841bf68> /usr/lib/system/libsystem_c.dylib 0x105218000 - 0x105553fff libswiftCore.dylib arm64 <1c83ba26059037aab867d3be1df9299d> /private/var/containers/Bundle/Application/7E1838A7-DB85-4D54-90A4-79BC75B3A9F8/xyz.app/Frameworks/libswiftCore.dylib 0x104d90000 - 0x104de7fff dyld arm64e <d16b72c0d6193e4892622c10a1d3066f> /usr/lib/dyld EOF Can anybody point me to the right direction on how to fix this?
Posted
by
Post not yet marked as solved
0 Replies
88 Views
When I tried to make Flipping Card with rotation3DEffect, I found that a Menu View nearby the Card not working. So, I tried to find out what the problem is by making an example. struct ContentView: View {   @State var degree = 0.0   var body: some View {     ZStack {       Spacer()       Button(action: {         print("Button Tapped")       }) {         Text("Button")       }       Rectangle()         .fill(Color.green.opacity(0.3))         .rotation3DEffect(Angle(degrees: degree), axis: (x: 0, y: 1, z: 0))         .frame(maxWidth: .infinity, maxHeight: 300)         .onTapGesture {           withAnimation {             if degree == 0 {               degree = 90.0             } else {               degree = 0.0             }           }         }       Spacer()     }   } } In my example, when "Green View" is tapped, it rotates 90 degrees so it doesn't show up on the screen. But if I tap again near where the "Green View" was, the "Green View" receive that tap gesture and the "Green View" goes back to where it was. Because "Green View" has taken the tap gesture, the button hidden behind “Green View” is never pressed. This only happens when the view is rotated 90 degrees.  If the view is rotated by 90.001 degrees or -90.001 degrees, not displayed on the screen, but in this case, the view does not receive the tap gesture. I wonder if this is intentional.
Posted
by
Post not yet marked as solved
0 Replies
82 Views
Hi, i am having problem with the Xcode debugger. As soon as I stop on a breakpoint and i press stepOver or I try to "po" ad object everything stucks and I have to stop the process. I found that I have this problem only with Swift files that are exposed to ObjectiveC throught the @objc key. Sometimes in the console i found this message: note: This error message is displayed only once. If the error displayed above is due to conflicting search paths to Clang modules in different images of the debugged executable, this can slow down debugging of Swift code significantly, since a fresh Swift context has to be created every time a conflict is encountered. I have already tried to delete and reinstall Xcode severl times and several versions, but I have always the same error. My colleague does not have this problem with the same codebase, so I think should be something related to my mac but I can't find a solution. Xcode version: Version 13.4.1 (13F100) OSX: Monterey 12.4 Thanks
Posted
by
Post not yet marked as solved
1 Replies
154 Views
recently my app published on app store facing some issue after i have implemented cloudflare and mtls to enhance security feature. Before that, when the API failed, i can receive http error code such as 403, 401 and etc. but after mtls is activated, all those failed http call is block by AppTransportSecurity layer and i can only receive 999 and error message as "URLSessionTask failed with error: The erver "***.***.com" requires a client certificate." i have read through Apple document, it says Apple introduce this security layer by default to ensure network security without known weakness https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW35 does anyone have come across similar issue like this before?
Posted
by
Post not yet marked as solved
1 Replies
115 Views
OK after I'm done with my last issue I came across some weird UI layout this is really a serious issue because afterward it looks like this😂 why? I've never met this kind of issue before in my same code before upgrading to Ventura code: List { ...                 Section {                     ForEach(data) { datum in                         TableRow(data: datum)                             .swipeActions {                             Button(role: .destructive) {                                 data.delete(datum)                             } label: {                                 Label("Delete", systemImage: "trash")                             }                         }                     }                 } ... }
Posted
by
Post marked as solved
1 Replies
111 Views
I'm trying out Swift Charts and I'm pretty messed up After I deleted all of my items, I couldn't add items anymore import SwiftUI extension Array where Element == ChartsData {     mutating func delete(_ item: ChartsData) {         self.removeAll {             $0 == item         }     } } struct ContentView: View {     var ofType: ChartsType     @State var data: [ChartsData] = []     var body: some View {         List {             VStack {                 HStack {                     Spacer() // MARK - add button                     Button {                         data.append(ChartsData(item: "item"))                     } label: {                         Image(systemName: "plus").imageScale(.large)                     }.buttonStyle(.plain).padding()                 }                                  List {                     ForEach(data) { datum in                         TableRow(data: datum).swipeActions {                             Button(role: .destructive) {                                 data.delete(datum)                             } label: {                                 Label("Delete", systemImage: "trash")                             }                         }                     }                 }                 NavigationLink{                     ChartsView(ofType: .BarChart, data: data)                 } label: {                     Text("Generate").font(.largeTitle).foregroundStyle(.linearGradient(colors: [.orange, .yellow, .blue, .purple], startPoint: .topTrailing, endPoint: .bottomLeading))                 }.padding()             }         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView(ofType: .BarChart, data: [             ChartsData(item: "testItem1", value: 10),             ChartsData(item: "testItem2", value: 20)         ])     } }
Posted
by
Post not yet marked as solved
3 Replies
236 Views
Hi,  I have a gnarly crash that I don't understand how to fix. The issue is actually on the AppStore version of the app when I click on "Discover pro feature" button it should open a modal but instead it crashes. This app is an iPad app that works on a Mac M1 machine and crashes only in this configuration(don't crash on iPhone or iPad). From my understanding the crash seems to be coming from SwiftUI. I can only reproduce it on the store version on the dev version(freshly build) it does not crash. Do you have any ideas to have a way to reproduce it? Maybe the ips file gives some insight into what is happening.  2022-06-13-112851.ips.txt Thanks for your support, Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4344676352 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 102f68000-102f6c000 [ 16K] r-x/r-x SM=COW ...ot.app/Sambot Exception Note: EXC_CORPSE_NOTIFY Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [20585] Triggered by Thread: 0 Kernel Triage: VM - pmap_enter failed with resource shortage VM - pmap_enter failed with resource shortage Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 ??? 0x0 ??? 1 SwiftUI 0x1e2a9ca40 StateObject.Box.update(property:phase:) + 84 2 SwiftUI 0x1e314eec8 static BoxVTable.update(ptr:property:phase:) + 444 3 SwiftUI 0x1e314e11c _DynamicPropertyBuffer.update(container:phase:) + 104 4 SwiftUI 0x1e2dbf624 DynamicBody.updateValue() + 596 5 SwiftUI 0x1e2fff16c partial apply for implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32 6 AttributeGraph 0x1cbb462d4 AG::Graph::UpdateStack::update() + 524 7 AttributeGraph 0x1cbb46844 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, unsigned int) + 396 8 AttributeGraph 0x1cbb4d964 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 548 9 AttributeGraph 0x1cbb643c8 AGGraphGetValue + 240 10 SwiftUI 0x1e2b366d8 BindingActionDispatcher.modifier.getter + 76 11 SwiftUI 0x1e2b36a00 BindingActionDispatcher.updateValue() + 560 12 SwiftUI 0x1e2fff16c partial apply for implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32 13 AttributeGraph 0x1cbb462d4 AG::Graph::UpdateStack::update() + 524 14 AttributeGraph 0x1cbb46844 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, unsigned int) + 396 15 AttributeGraph 0x1cbb51f74 AG::Subgraph::update(unsigned int) + 876 16 SwiftUI 0x1e3142cb0 GraphHost.flushTransactions() + 428 17 SwiftUI 0x1e257f860 specialized closure #2 in UINavigationController.updateRootHost<A>(root:environment:transaction:) + 84 18 SwiftUI 0x1e2a00060 thunk for @escaping @callee_guaranteed () -> () + 28 19 SwiftUI 0x1e302d020 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 1172 20 SwiftUI 0x1e3024618 ViewRendererHost.render(interval:updateDisplayList:) + 388 21 SwiftUI 0x1e32f1a20 _UIHostingView.layoutSubviews() + 260
Posted
by
Post not yet marked as solved
1 Replies
191 Views
Hello! My app has been experiencing some strange crashes in the last few months. The crash log shows it as a Watchdog timeout error of 0x8BADF00D. I knew about this error code before, especially since here is the documentation about addressing-watchdog-terminations. But actually, the call stack shows that the crash appears in dydl and it seems that my app code has not been executed yet. Does anyone know the cause of this problem please? I have observed this crash on iOS 15.6, 15.5, 15.4, and earlier versions. Incident Identifier: 82D9B8D8-88B3-4016-9CB5-5AE280006628 Hardware Model: iPhone10,6 Process: *** [297] Path: /private/var/containers/Bundle/Application/FDF7C78A-E217-482E-A20C-D602C117EB68/***.app/*** Identifier: com.***.*** Version: 3.1 (7774) AppStoreTools: 13C90b AppVariant: 1:iPhone10,6:15 Code Type: ARM-64 (Native) Role: unknown Parent Process: launchd [1] Coalition: com.***.*** [466] Date/Time: 2022-03-18 07:20:38.2452 +0200 Launch Time: 2022-03-18 07:19:37.6871 +0200 OS Version: iPhone OS 15.4 (19E241) Release Type: User Baseband Version: 5.02.02 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: FRONTBOARD 2343432205 &lt;RBSTerminateContext| domain:10 code:0x8BADF00D explanation:process-launch watchdog transgression: application&lt;com.***.***&gt;:297 exhausted real (wall clock) time allowance of 60.00 seconds ProcessVisibility: Background ProcessState: Running WatchdogEvent: process-launch WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 283.260 (user 283.260, system 0.000), 78% CPU", "Elapsed application CPU time (seconds): 0.021, 0% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive&gt; Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x0000000104f82b60 ___ZNK5dyld46Loader13resolveSymbolER11DiagnosticsRNS_12RuntimeStateEiPKcbbU13block_pointerFvjjRKNS0_14ResolvedSymbolEEb_block_invoke.94 + 428 (Loader.cpp:1539) 1 dyld 0x0000000104f71308 dyld4::Loader::resolveSymbol(Diagnostics&amp;, dyld4::RuntimeState&amp;, int, char const*, bool, bool, void (unsigned int, unsigned int, dyld4::Loader::ResolvedSymbol const&amp;) block_pointer, bool) const + 348 (Loader.cpp:1504) 2 dyld 0x0000000104f84cd8 ___ZNK5dyld416JustInTimeLoader17forEachBindTargetER11DiagnosticsRNS_12RuntimeStateEU13block_pointerFvjjRKNS_6Loader14ResolvedSymbolEEbU13block_pointerFvS8_RbESD__block_invoke.46 + 124 (JustInTimeLoader.cpp:621) 3 dyld 0x0000000104f9a9d4 ___ZNK5dyld313MachOAnalyzer25forEachBindTarget_OpcodesER11DiagnosticsbU13block_pointerFvRKNS0_14BindTargetInfoERbES8__block_invoke.408 + 64 (MachOAnalyzer.cpp:5782) 4 dyld 0x0000000104f9a794 dyld3::MachOAnalyzer::forEachBind_OpcodesWeak(Diagnostics&amp;, dyld3::MachOLoaded::LinkEditInfo const&amp;, dyld3::MachOFile::SegmentInfo const*, void (char const*, dyld3::MachOLoaded::LinkEditInfo const&amp;... + 728 (MachOAnalyzer.cpp:6161) 5 dyld 0x0000000104f99b60 dyld3::MachOAnalyzer::forEachBindUnified_Opcodes(Diagnostics&amp;, bool, void (unsigned long long, dyld3::MachOAnalyzer::BindTargetInfo const&amp;, bool&amp;) block_pointer, void (unsigned long long, dyld3::Ma... + 632 (MachOAnalyzer.cpp:5763) 6 dyld 0x0000000104f9975c dyld3::MachOAnalyzer::forEachBindTarget_Opcodes(Diagnostics&amp;, bool, void (dyld3::MachOAnalyzer::BindTargetInfo const&amp;, bool&amp;) block_pointer, void (dyld3::MachOAnalyzer::BindTargetInfo const&amp;, bool&amp;... + 148 (MachOAnalyzer.cpp:5773) 7 dyld 0x0000000104f84304 dyld4::JustInTimeLoader::forEachBindTarget(Diagnostics&amp;, dyld4::RuntimeState&amp;, void (unsigned int, unsigned int, dyld4::Loader::ResolvedSymbol const&amp;) block_pointer, bool, void (dyld4::Loader::Reso... + 176 (JustInTimeLoader.cpp:608) 8 dyld 0x0000000104f732d4 dyld4::JustInTimeLoader::applyFixups(Diagnostics&amp;, dyld4::RuntimeState&amp;, dyld4::DyldCacheDataConstLazyScopedWriter&amp;, bool) const + 388 (JustInTimeLoader.cpp:412) 9 dyld 0x0000000104f79758 dyld4::prepare(dyld4::APIs&amp;, dyld3::MachOAnalyzer const*) + 1592 (dyldMain.cpp:573) 10 dyld 0x0000000104f783b0 start + 412 (dyldMain.cpp:864) Thread 0 crashed with ARM Thread State (64-bit): x0: 0x00000001c076a000 x1: 0x00000000000002f1 x2: 0x000000016b4aa198 x3: 0x000000016b4aa190 x4: 0x0000000000000001 x5: 0x000000016b4ac638 x6: 0x0000000000000000 x7: 0x000000016b4ad160 x8: 0x0000000180000000 x9: 0x000000034076a000 x10: 0x0000000000000000 x11: 0x0000000000000001 x12: 0x0000000104bf278b x13: 0x0000000000000000 x14: 0x00000001ffd94d24 x15: 0x0000000000000001 x16: 0x0000000104fa5070 x17: 0x0000000000000a06 x18: 0x0000000000000000 x19: 0x000000016b4ac6c8 x20: 0x0000000104c50dc0 x21: 0x0000000000000001 x22: 0x000000020b59cad8 x23: 0x000000016b4ac630 x24: 0x000000016b4aa1b0 x25: 0x0000000000000002 x26: 0x0000000000000247 x27: 0x0000000104c55a90 x28: 0x0000000000000770 fp: 0x000000016b4ac6b0 lr: 0x0000000104f82b60 sp: 0x000000016b4aa1b0 pc: 0x0000000104f82b60 cpsr: 0x20000000 esr: 0x92000007 (Data Abort) byte read Translation fault Binary Images: 0x104f60000 - 0x104fb3fff dyld arm64 &lt;5c4972a8ef8132dca84842cc7f7874cf&gt; /usr/lib/dyld EOF
Posted
by
Post not yet marked as solved
1 Replies
108 Views
Given an arbitrary memory address how do I find (in runtime) the nature of memory block it belongs to? For stack addresses I guess there's some "stack start" and "stack end" of the current thread. For other threads' stacks - I guess I'd have to enumerate all threads to get those ranges. I also found that I can use malloc_size and sometimes it gives me correct result (the size if non zero at least), although it doesn't give me the beginning of the block memory address belongs to. For anything else I have no clue at the moment. Ideal method I am looking for: struct MemoryBlock { let type: MemoryBlockType // stack, heap, unmapped, etc let start: UnsafeRawPointer let size: Int let attributes // e.g. red / write } func findMemoryBlock(_ address: UnsafeRawPointer) -> MemoryBlock PS. the language doesn't matter (e.g. can be C) so long as this method works in a swift/obj-c app.
Posted
by
Post not yet marked as solved
1 Replies
150 Views
Recently received quite a number of crashes, and notice from the crash log it seems related to CFNetwork. In the crashed thread's stack trace, I do not see any of my application code involved. GA.crash
Posted
by
Post not yet marked as solved
1 Replies
241 Views
I am using background mode for downloading data from the server and storing it in Realm. I am getting weird crash reports from my users. I attached an example crash log. 2022-06-11_09-48-00.9830_+0300-c163f7d73500cb2d0cff0a66c7684b6e7009adcd.crash My code:    private func addParseReportToDb(serverResponses: [AddNewParseReportResponse], trackedProfileRecordId: String) {     let trackedProfile = TrackedProfile.getByPrimaryKey(recordId: trackedProfileRecordId)!     for serverResponse in serverResponses {               let parseReport = ParseReport()       parseReport.biograph = serverResponse.biography               let realm = try! Realm()       try! realm.write({         realm.add(parseReport)       })               createUserFeedWithLatestReports(trackedProfile: trackedProfile)     }   } Above method is calling from below method:    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {           let realm = try! Realm()           let tst = Test()     tst.type = "silent"           try! realm.write({       realm.add(tst)     })           let parseService = InstaParseService()     parseService.downloadLatestReports {       parseService.getUsersForFetch { status in         completionHandler(.newData)       }     }   } parse.downloadLatestReports method calls the addParseReportToDb method. The crash point is realm.add(parseReport) As you can see actually I can add another object before adding the parseReport without any problem. Don't know why but that part crashes sometimes.
Posted
by
Post not yet marked as solved
1 Replies
192 Views
Incident Identifier: 3400A577-E4A0-483B-AF20-53F105BCB104 CrashReporter Key: 8d970b914f1fd529bba76fcaa1d0ba1588c88c47 Hardware Model: iPhone14,5 Process: Animalsocial [1096] Path: /private/var/containers/Bundle/Application/A645D0E7-C811-4A46-977C-0D46A755C68A/Animalsocial.app/Animalsocial Identifier: org.reactjs.developer.Animalsocial Version: 1.0 (1) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: org.reactjs.developer.Animalsocial [550] Date/Time: 2022-06-10 20:11:40.0525 +0530 Launch Time: 2022-06-10 20:11:30.5303 +0530 OS Version: iPhone OS 15.5 (19F77) Release Type: User Baseband Version: 1.61.00 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000014000 Exception Codes: 0x0000000000000001, 0x0000000000014000 VM Region Info: 0x14000 is not in any region. Bytes before following region: 4307402752 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---&gt; __TEXT 100bf0000-1022e8000 [ 23.0M] r-x/r-x SM=COW .../Animalsocial Exception Note: EXC_CORPSE_NOTIFY Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [1096] Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x1c6e04c54 weak_entry_insert(weak_table_t*, weak_entry_t*) + 72 1 libobjc.A.dylib 0x1c6e0dffc weak_resize(weak_table_t*, unsigned long) + 112 2 libobjc.A.dylib 0x1c6dfea44 weak_register_no_lock + 256 3 libobjc.A.dylib 0x1c6e03924 objc_storeWeak + 448 4 Foundation 0x1af890ba4 -[NSConcreteHashTable addObject:] + 100 5 Animalsocial 0x1013ca198 -[SDImagePhotosLoader requestImageWithURL:options:context:progress:completed:] + 1216 6 Animalsocial 0x10139fc18 -[SDImageLoadersManager requestImageWithURL:options:context:progress:completed:] + 444 7 Animalsocial 0x1013b5240 -[SDWebImageManager callDownloadProcessForOperation:url:options:context:cachedImage:cachedData:cacheType:progress:completed:] + 1632 8 Animalsocial 0x1013b4164 __89-[SDWebImageManager callCacheProcessForOperation:url:options:context:progress:completed:]_block_invoke + 644 9 Animalsocial 0x10138c048 __73-[SDImageCache queryCacheOperationForKey:options:context:cacheType:done:]_block_invoke_2 + 56 10 libdispatch.dylib 0x1add7ae6c _dispatch_call_block_and_release + 32 11 libdispatch.dylib 0x1add7ca30 _dispatch_client_callout + 20 12 libdispatch.dylib 0x1add8af48 _dispatch_main_queue_drain + 928 13 libdispatch.dylib 0x1add8ab98 _dispatch_main_queue_callback_4CF + 44 14 CoreFoundation 0x1ae0cd800 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 15 CoreFoundation 0x1ae087704 __CFRunLoopRun + 2532 16 CoreFoundation 0x1ae09abc8 CFRunLoopRunSpecific + 600 17 GraphicsServices 0x1ca1ce374 GSEventRunModal + 164 18 UIKitCore 0x1b0a0a648 -[UIApplication _run] + 1100 19 UIKitCore 0x1b078bd90 UIApplicationMain + 364 20 Animalsocial 0x100bf6258 main + 104 21 dyld 0x104e7dce4 start + 520 Thread 1 name: Dispatch queue: com.apple.avplayeritem.figplaybackitem.accessor Thread 1: 0 libsystem_kernel.dylib 0x1e5b4bf24 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x21f25f298 _pthread_cond_wait + 1236 2 CoreMedia 0x1b8c348c4 WaitOnCondition + 20 3 CoreMedia 0x1b8c91bd0 FigConditionVariableWaitRelative + 16 4 MediaToolbox 0x1b8430574 itemasync_CopyProperty + 500 5 AVFCore 0x1b76da950 +[AVPlayerItem _copyTimebaseFromFigPlaybackItem:] + 180 6 AVFCore 0x1b7707620 __31-[AVPlayerItem _updateTimebase]_block_invoke + 80 7 libdispatch.dylib 0x1add7ae6c _dispatch_call_block_and_release + 32 8 libdispatch.dylib 0x1add7ca30 _dispatch_client_callout + 20 9 libdispatch.dylib 0x1add84124 _dispatch_lane_serial_drain + 668 10 libdispatch.dylib 0x1add84c80 _dispatch_lane_invoke + 392 11 libdispatch.dylib 0x1add8f500 _dispatch_workloop_worker_thread + 648 12 libsystem_pthread.dylib 0x21f2580bc _pthread_wqthread + 288 13 libsystem_pthread.dylib 0x21f257e5c start_wqthread + 8 Thread 2 name: Dispatch queue: com.apple.avplayeritem.figplaybackitem.accessor Thread 2: 0 libsystem_kernel.dylib 0x1e5b4bf24 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x21f25f298 _pthread_cond_wait + 1236 2 CoreMedia 0x1b8c348c4 WaitOnCondition + 20 3 CoreMedia 0x1b8c91bd0 FigConditionVariableWaitRelative + 16 4 MediaToolbox 0x1b8430574 itemasync_CopyProperty + 500 5 AVFCore 0x1b76da950 +[AVPlayerItem _copyTimebaseFromFigPlaybackItem:] + 180 6 AVFCore 0x1b7707620 __31-[AVPlayerItem _updateTimebase]_block_invoke + 80 7 libdispatch.dylib 0x1add7ae6c _dispatch_call_block_and_release + 32 8 libdispatch.dylib 0x1add7ca30 _dispatch_client_callout + 20 9 libdispatch.dylib 0x1add84124 _dispatch_lane_serial_drain + 668 10 libdispatch.dylib 0x1add84c80 _dispatch_lane_invoke + 392 11 libdispatch.dylib 0x1add8f500 _dispatch_workloop_worker_thread + 648 12 libsystem_pthread.dylib 0x21f2580bc _pthread_wqthread + 288 13 libsystem_pthread.dylib 0x21f257e5c start_wqthread + 8 Thread 3 name: com.apple.uikit.eventfetch-thread Thread 3: 0 libobjc.A.dylib 0x1c6e1c3c4 class_rw_t::methods() const + 112 1 libobjc.A.dylib 0x1c6dfc2b4 class_copyMethodList + 144 2 BaseBoard 0x1b368a084 BSProtobufClassImplmementsProtobufSchema + 40 3 BaseBoard 0x1b36b45ac _BSProtobufValidateClassForEncoding + 44 4 BaseBoard 0x1b367d174 +[BSProtobufSerialization
Posted
by
Post not yet marked as solved
1 Replies
198 Views
I have an iOS project that was created a couple Xcode versions ago bundling some XCFrameworks. As of recently (still with Xcode 13.4.1 (13F100)) the app won't launch anymore on actual devices with the dreaded Unable to install "XYZ" error. I have several other projects using one or other of the XCFrameworks, all using the same team and code signing options, and in any of the other apps still work fine on my test device. I've compared settings between the apps that launch and the one that doesn't but I can't spot any difference that could cause an issue.. Is there any way to track down the specific problem with this app? This is the detailed output when launching on device fails: Unable to install "XYZ" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620375 User Info: { DVTErrorCreationDateKey = "2022-06-10 12:22:19 +0000"; IDERunOperationFailingWorker = IDEInstalliPhoneLauncher; } -- The code signature version is no longer supported. Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620375 User Info: { DVTRadarComponentKey = 261622; MobileDeviceErrorCode = "(0xE8008029)"; "com.apple.dtdevicekit.stacktrace" = ( 0 DTDeviceKitBase 0x000000011e5a1614 DTDKCreateNSErrorFromAMDErrorCode + 272 1 DTDeviceKitBase 0x000000011e5dadd8 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 160 2 DVTFoundation 0x0000000103c39bd0 DVTInvokeWithStrongOwnership + 76 3 DTDeviceKitBase 0x000000011e5dab30 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1336 4 IDEiOSSupportCore 0x000000011e4b9590 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 2916 5 DVTFoundation 0x0000000103d60f50 __DVT_CALLING_CLIENT_BLOCK__ + 16 6 DVTFoundation 0x0000000103d62068 __DVTDispatchAsync_block_invoke + 364 7 libdispatch.dylib 0x00000001891d65f0 _dispatch_call_block_and_release + 32 8 libdispatch.dylib 0x00000001891d81b4 _dispatch_client_callout + 20 9 libdispatch.dylib 0x00000001891df8a8 _dispatch_lane_serial_drain + 668 10 libdispatch.dylib 0x00000001891e0404 _dispatch_lane_invoke + 392 11 libdispatch.dylib 0x00000001891eac98 _dispatch_workloop_worker_thread + 648 12 libsystem_pthread.dylib 0x0000000189398360 _pthread_wqthread + 288 13 libsystem_pthread.dylib 0x0000000189397080 start_wqthread + 8 ); } Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPad12,1"; "device_osBuild" = "15.5 (19F77)"; "device_platform" = "com.apple.platform.iphoneos"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 1993; "operation_errorCode" = "-402620375"; "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain"; "operation_errorWorker" = IDEInstalliPhoneLauncher; "operation_name" = IDEiPhoneRunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 5; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_runnable_swiftVersion" = "5.6.1"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos15.5"; "sdk_osVersion" = "15.5"; "sdk_variant" = iphoneos; } -- System Information macOS Version 12.4 (Build 21F79) Xcode 13.4.1 (20504) (Build 13F100) And this is the output of codesign on the app: Executable=/Users/***/Library/Developer/Xcode/DerivedData/XYZ-bdjavnfzlagnjzdlfbdbfimpdxdp/Build/Products/Debug-iphoneos/XYZ.app/XYZ Identifier=com.*** Format=app bundle with Mach-O thin (arm64) CodeDirectory v=20400 size=163181 flags=0x0(none) hashes=5088+7 location=embedded Signature size=4787 Signed Time=10. Jun 2022 at 14:17:36 Info.plist entries=36 TeamIdentifier=L***T Sealed Resources version=2 rules=10 files=76 Internal requirements count=1 size=208 The page size indicates the app has DER entitlements (as per https://developer.apple.com/documentation/xcode/using-the-latest-code-signature-format): Page size=4096 -7=a2b7cb9fa9a8e60cacfd73d1830ea5bbab35c8213e0abd86c14233ac1aaf9b90 -6=0000000000000000000000000000000000000000000000000000000000000000 -5=8680ba1b7e8bf98de928906c8d4e1a88e836b7d1aa33a40ee0e079513fc9ee04 -4=0000000000000000000000000000000000000000000000000000000000000000 -3=1a6c79ee253b6b0720c630f094054b9dbf8e4adbcf4d169b3f8b291bb5c377c5 -2=b6a4ad6c366acfe77bc7cb3aeeec40016d45baf36431d07e130d429bebffd891 Any hints appreciated. Cheers, Jay
Posted
by