lrucker1 / XTideMac

XTide for macOS, iOS, and watchOS
7 stars 3 forks source link

Custom TCD files cause the App to crash #2

Closed colinfitzpatrick closed 2 years ago

colinfitzpatrick commented 2 years ago

Adding a custom TCD file will cause the app the crash on load.


Translated Report (Full Report Below)

Process: XTide [5229] Path: /Applications/XTide.app/Contents/MacOS/XTide Identifier: com.lrucker.XTide Version: 3.0.2 (302.2) App Item ID: 1170393977 App External ID: 839410175 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501

Date/Time: 2022-07-26 13:25:37.3365 +0100 OS Version: macOS 12.4 (21F79) Report Version: 12 Anonymous UUID: ED607489-70C1-5E57-7832-D244595B8BFD

Sleep/Wake UUID: 1D719F7E-6BAA-4B58-8939-8C5CB5F766CA

Time Awake Since Boot: 130000 seconds Time Since Wake: 15126 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x18dc7ad98 pthread_kill + 8 1 libsystem_pthread.dylib 0x18dcafee0 pthread_kill + 288 2 libsystem_c.dylib 0x18dbea340 abort + 168 3 libsystem_c.dylib 0x18dbe9754 __assert_rtn + 272 4 XTide 0x104390988 0x104338000 + 362888 5 XTide 0x104352bec 0x104338000 + 109548 6 XTide 0x104349264 0x104338000 + 70244 7 MapKit 0x19e8d11dc -[MKQuadTrie contains:] + 76 8 MapKit 0x19e8d0fc4 -[MKAnnotationManager _addAnnotation:updateVisible:] + 72 9 MapKit 0x19e8e4470 -[MKAnnotationManager addAnnotations:] + 184 10 MapKit 0x19e8e4258 -[MKMapView addAnnotations:] + 44 11 XTide 0x10434a270 0x104338000 + 74352 12 XTide 0x10434a44c 0x104338000 + 74828 13 AppKit 0x190a9fa54 -[NSWindowController _windowDidLoad] + 768 14 AppKit 0x190a9b1e0 -[NSWindowController window] + 128 15 XTide 0x104350180 0x104338000 + 98688 16 XTide 0x104350268 0x104338000 + 98920 17 XTide 0x1043500c4 0x104338000 + 98500 18 CoreFoundation 0x18dd7150c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 19 CoreFoundation 0x18de15c08 ___CFXRegistrationPost_block_invoke + 52 20 CoreFoundation 0x18de15b74 _CFXRegistrationPost + 456 21 CoreFoundation 0x18dd401b0 _CFXNotificationPost + 732 22 Foundation 0x18ec04cc8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96 23 AppKit 0x1908ea4fc -[NSApplication _postDidFinishNotification] + 340 24 AppKit 0x1908ea214 -[NSApplication _sendFinishLaunchingNotification] + 236 25 AppKit 0x1908e7c38 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 588 26 AppKit 0x1908e7818 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 780 27 Foundation 0x18ec31868 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 348 28 Foundation 0x18ec316a0 _NSAppleEventManagerGenericHandler + 96 29 AE 0x19451d8f4 0x194512000 + 47348 30 AE 0x19451d24c 0x194512000 + 45644 31 AE 0x1945163f8 aeProcessAppleEvent + 488 32 HIToolbox 0x1969c495c AEProcessAppleEvent + 68 33 AppKit 0x1908e1b64 _DPSNextEvent + 1844 34 AppKit 0x1908e0084 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328 35 AppKit 0x1908d2250 -[NSApplication run] + 596 36 AppKit 0x1908a396c NSApplicationMain + 1132 37 dyld 0x10473508c start + 520

Thread 1: 0 libsystem_pthread.dylib 0x18dcab078 start_wqthread + 0

Thread 2: 0 libsystem_pthread.dylib 0x18dcab078 start_wqthread + 0

Thread 3: 0 libsystem_pthread.dylib 0x18dcab078 start_wqthread + 0

Thread 4: 0 libsystem_pthread.dylib 0x18dcab078 start_wqthread + 0

Thread 5:: CVDisplayLink 0 libsystem_kernel.dylib 0x18dc76270 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x18dcb0868 _pthread_cond_wait + 1280 2 CoreVideo 0x195356b4c CVDisplayLink::waitUntil(unsigned long long) + 324 3 CoreVideo 0x195355e7c CVDisplayLink::runIOThread() + 488 4 libsystem_pthread.dylib 0x18dcb026c _pthread_start + 148 5 libsystem_pthread.dylib 0x18dcab08c thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000000000000 x5: 0x000000000000000f x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0xd10f5fdf8b239aef x9: 0xd10f5fde8f591f6f x10: 0xcccccccccccccccd x11: 0x000000000000000a x12: 0x0000000000000000 x13: 0x0000000000000034 x14: 0x00000000aa41c800 x15: 0x00000001043d3610 x16: 0x0000000000000148 x17: 0x00000001e7d3b680 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x00000001047a8580 x21: 0x0000000000000103 x22: 0x00000001047a8660 x23: 0x000000010439e69e x24: 0x00000001e3e2a000 x25: 0x00000001d84ac000 x26: 0x00000000000001fc x27: 0x00000001d7f69af7 x28: 0x0000600001aacec0 fp: 0x000000016bac5900 lr: 0x000000018dcafee0 sp: 0x000000016bac58e0 pc: 0x000000018dc7ad98 cpsr: 0x40001000 far: 0x0000000119f38000 esr: 0x56000080 Address size fault

Binary Images: 0x18dc71000 - 0x18dca8fff libsystem_kernel.dylib () <03f48dc5-caa7-3678-af61-1a3c7fa8b06e> /usr/lib/system/libsystem_kernel.dylib 0x18dca9000 - 0x18dcb5fff libsystem_pthread.dylib () <42166a2c-89a9-3c38-a215-f028544cea23> /usr/lib/system/libsystem_pthread.dylib 0x18db70000 - 0x18dbf1fff libsystem_c.dylib () <86746b94-88e3-342d-b2b2-54303404e492> /usr/lib/system/libsystem_c.dylib 0x104338000 - 0x1043c3fff com.lrucker.XTide (3.0.2) /Applications/XTide.app/Contents/MacOS/XTide 0x19e8b4000 - 0x19eb37fff com.apple.MapKit (1.0) <4b6b338e-9ef0-39ed-9f24-5f30f5b637fd> /System/Library/Frameworks/MapKit.framework/Versions/A/MapKit 0x1908a0000 - 0x191757fff com.apple.AppKit (6.9) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x18dcf8000 - 0x18e23efff com.apple.CoreFoundation (6.9) <994db908-11a1-3e43-b7df-25c09d51368a> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x18ebfb000 - 0x18efecfff com.apple.Foundation (6.9) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x194512000 - 0x194582fff com.apple.AE (924) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x196981000 - 0x196cb4fff com.apple.HIToolbox (2.1.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x104730000 - 0x10478ffff dyld () /usr/lib/dyld 0x195353000 - 0x1953b0fff com.apple.CoreVideo (1.8) <66746bae-3892-303b-8144-e8568a7904e7> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0

VM Region Summary: ReadOnly portion of Libraries: Total=891.5M resident=0K(0%) swapped_out_or_unallocated=891.5M(100%) Writable regions: Total=1.9G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.9G(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Accelerate framework 128K 1 Activity Tracing 256K 1 CG backing stores 9.9M 8 CG image 48K 1 ColorSync 496K 24 CoreAnimation 16K 1 CoreGraphics 32K 2 CoreUI image data 160K 1 Foundation 16K 1 Kernel Alloc Once 32K 1 MALLOC 336.8M 83 MALLOC guard page 576K 29 MALLOC_MEDIUM (reserved) 1.2G 10 reserved VM address space (unallocated) MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated) STACK GUARD 56.1M 6 Stack 10.6M 6 VM_ALLOCATE 272K 17 AUTH 2117K 230 AUTH_CONST 13.4M 405 CTF 756 1 DATA 10.4M 393 DATA_CONST 15.6M 409 __DATA_DIRTY 1874K 177 FONT_DATA 4K 1 LINKEDIT 577.4M 4 OBJC_CONST 2777K 214 OBJC_RO 83.0M 1 __OBJC_RW 3152K 1 TEXT 314.1M 421 __UNICODE 592K 1 dyld private memory 1024K 1 mapped file 168.7M 25 shared memory 912K 16 =========== ======= ======= TOTAL 3.1G 2493 TOTAL, minus reserved VM space 1.6G 2493

lrucker1 commented 2 years ago

Could you attach your tcd file? Thanks!

colinfitzpatrick commented 2 years ago

Thank you for the quick reply.

GitHub didn't like tcd as an extension, so I compressed the file.

wexford.tcd.zip

In case I'm doing something wrong, I've created a screen recording which you can view here: https://www.icloud.com/iclouddrive/083iRXSqobkFC2AP5WEScy_gw#Screen_Recording_2022-07-27_at_09.05

colinfitzpatrick commented 2 years ago

dunmore.tcd.zip

Adding coordinates to the file prevents crashing.

lrucker1 commented 2 years ago

Thanks! I found the problem; I didn’t know the coordinates were optional, so I was trying to make a map entry for that station and hit an error reading the invalid coordinates. Adding coordinates is the right workaround for now; I’m working on a fix that will filter out stations without coordinates and show them in a list.

On Jul 27, 2022, at 1:17 AM, colinfitzpatrick @.***> wrote:

Thank you for the quick reply.

GitHub didn't like tcd as an extension, so I compressed the file.

wexford.tcd.zip https://github.com/lrucker1/XTideMac/files/9196422/wexford.tcd.zip In case I'm doing something wrong, I've created a screen recording which you can view here: https://www.icloud.com/iclouddrive/083iRXSqobkFC2AP5WEScy_gw#Screen_Recording_2022-07-27_at_09.05 https://www.icloud.com/iclouddrive/083iRXSqobkFC2AP5WEScy_gw#Screen_Recording_2022-07-27_at_09.05 — Reply to this email directly, view it on GitHub https://github.com/lrucker1/XTideMac/issues/2#issuecomment-1196408016, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESOQZXNY5QV6N4AA3XJIE3VWDWBHANCNFSM54WH6A2Q. You are receiving this because you were assigned.

lrucker1 commented 2 years ago

The updated app just hit the app store. There's a toolbar item to show stations that don't have coordinates; you have to customize the toolbar to show it as it's optional.

The iOS version now supports custom files too.

Thanks for all your help!

lrucker1 commented 2 years ago

The updated app just hit the app store. Thanks for all your help!

On Jul 27, 2022, at 1:40 AM, colinfitzpatrick @.***> wrote:

dunmore.tcd.zip https://github.com/lrucker1/XTideMac/files/9196584/dunmore.tcd.zip Adding coordinates to the file prevents crashing.

— Reply to this email directly, view it on GitHub https://github.com/lrucker1/XTideMac/issues/2#issuecomment-1196431599, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESOQZXA6M6XHQMXZ5MM6NDVWDYY5ANCNFSM54WH6A2Q. You are receiving this because you were assigned.