mipstian / catch

Catch: Broadcatching made easy.
https://kaylees.site/catch.html
MIT License
432 stars 41 forks source link

Catch 1.9 crashes #39

Closed crgmrgn closed 9 years ago

crgmrgn commented 10 years ago

Catch 1.9 is crashing out frequently (once every few hours) on OSX 10.10 release version. I generally run my menubar tools under Bartender (v1.2.24), in case that is relevant, I'll try shutting down Bartender for the next few days to see if I can replicate the issues without, just in case. Considerable log entries such as below (approx 100x) are being dumped into system console just before it seg faults:

22/10/2014 23:21:49.531 Catch[39671]: This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.
 Stack:(
    0   CoreFoundation                      0x00007fff8715c64c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff84d8b6de objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8715c4fd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff907dabe0 _AssertAutolayoutOnMainThreadOnly + 83
    4   Foundation                          0x00007fff905b9432 -[NSISEngine withBehaviors:performModifications:] + 31
    5   AppKit                              0x00007fff8cba993a -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 70
    6   AppKit                              0x00007fff8cba8fc6 -[NSView _setSuperview:] + 1041
    7   AppKit                              0x00007fff8cbac3a0 -[NSView removeFromSuperview] + 435
    8   AppKit                              0x00007fff8cc00a1a -[NSView removeFromSuperviewWithoutNeedingDisplay] + 38
    9   AppKit                              0x00007fff8cc9c6e0 -[NSTableRowData _removeViewAndAddToReuse:forRow:] + 59
    10  AppKit                              0x00007fff8cd15f7d -[NSTableRowData _removeRowViewForRow:] + 373
    11  AppKit                              0x00007fff8cbff6fd -[NSTableRowData _removeVisibleRows] + 93
    12  AppKit                              0x00007fff8cbff36a -[NSTableRowData removeAllKnownSubviews] + 139
    13  AppKit                              0x00007fff8cbff11b -[NSTableRowData reloadData] + 74
    14  AppKit                              0x00007fff8cbfef83 -[NSTableView reloadData] + 175
    15  Catch                               0x0000000101080392 Catch + 9106
    16  Foundation                          0x00007fff9058a49c -[__NSObserver _doit:] + 307
    17  CoreFoundation                      0x00007fff87118cbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    18  CoreFoundation                      0x00007fff8700a1b4 _CFXNotificationPost + 3140
    19  Foundation                          0x00007fff90569ea1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    20  Catch                               0x00000001010844a6 Catch + 25766
    21  Catch                               0x0000000101083ae4 Catch + 23268
    22  Foundation                          0x00007fff905ff2b7 message_handler + 780
    23  libxpc.dylib                        0x00007fff8e4f4589 _xpc_connection_call_event_handler + 58
    24  libxpc.dylib                        0x00007fff8e4f6e78 do_mach_notify_port_destroyed + 166
    25  libxpc.dylib                        0x00007fff8e4f6db3 _Xmach_notify_port_destroyed + 74
    26  libxpc.dylib                        0x00007fff8e4f6d49 notify_server + 76
    27  libxpc.dylib                        0x00007fff8e4f2efa _xpc_connection_mach_event + 1564
    28  libdispatch.dylib                   0x00007fff8c2aa0f8 _dispatch_client_callout4 + 9
    29  libdispatch.dylib                   0x00007fff8c2ab1a3 _dispatch_mach_msg_invoke + 445
    30  libdispatch.dylib                   0x00007fff8c2a8154 _dispatch_queue_drain + 571
    31  libdispatch.dylib                   0x00007fff8c2a9a10 _dispatch_mach_invoke + 232
    32  libdispatch.dylib                   0x00007fff8c2a8154 _dispatch_queue_drain + 571
    33  libdispatch.dylib                   0x00007fff8c2a9ecc _dispatch_queue_invoke + 202
    34  libdispatch.dylib                   0x00007fff8c2a76b7 _dispatch_root_queue_drain + 463
    35  libdispatch.dylib                   0x00007fff8c2b5fe4 _dispatch_worker_thread3 + 91
    36  libsystem_pthread.dylib             0x00007fff91feb6cb _pthread_wqthread + 729
    37  libsystem_pthread.dylib             0x00007fff91fe94a1 start_wqthread + 13
)
22/10/2014 23:21:52.308 com.apple.xpc.launchd[1]: (org.giorgiocalderolla.Catch.54276[39671]) Service exited due to signal: Segmentation fault: 11

CrashReporter dump at https://gist.github.com/crgmrgn/c2c51f3c78f223ff80bf, if it helps ...

crgmrgn commented 10 years ago

Subsequent run lead to another crash, this time an uncaught exception :( …

22/10/2014 23:31:37.840 Catch[49839]: An uncaught exception was raised
22/10/2014 23:31:37.840 Catch[49839]: endUpdates called without a beginUpdates
22/10/2014 23:31:37.841 Catch[49839]: (
    0   CoreFoundation                      0x00007fff8715c64c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff84d8b6de objc_exception_throw + 43
    2   AppKit                              0x00007fff8cbfc311 -[NSTableRowData _doWorkAfterEndUpdates] + 0
    3   AppKit                              0x00007fff8cbf4792 -[NSTableView _endUpdateWithTile:] + 130
    4   Catch                               0x0000000109fab392 Catch + 9106
    5   Foundation                          0x00007fff9058a49c -[__NSObserver _doit:] + 307
    6   CoreFoundation                      0x00007fff87118cbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    7   CoreFoundation                      0x00007fff8700a1b4 _CFXNotificationPost + 3140
    8   Foundation                          0x00007fff90569ea1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    9   Catch                               0x0000000109faf4a6 Catch + 25766
    10  Catch                               0x0000000109faeae4 Catch + 23268
    11  Foundation                          0x00007fff905ff2b7 message_handler + 780
    12  libxpc.dylib                        0x00007fff8e4f4589 _xpc_connection_call_event_handler + 58
    13  libxpc.dylib                        0x00007fff8e4f6e78 do_mach_notify_port_destroyed + 166
    14  libxpc.dylib                        0x00007fff8e4f6db3 _Xmach_notify_port_destroyed + 74
    15  libxpc.dylib                        0x00007fff8e4f6d49 notify_server + 76
    16  libxpc.dylib                        0x00007fff8e4f2efa _xpc_connection_mach_event + 1564
    17  libdispatch.dylib                   0x00007fff8c2aa0f8 _dispatch_client_callout4 + 9
    18  libdispatch.dylib                   0x00007fff8c2ab1a3 _dispatch_mach_msg_invoke + 445
    19  libdispatch.dylib                   0x00007fff8c2a8154 _dispatch_queue_drain + 571
    20  libdispatch.dylib                   0x00007fff8c2a9a10 _dispatch_mach_invoke + 232
    21  libdispatch.dylib                   0x00007fff8c2a8154 _dispatch_queue_drain + 571
    22  libdispatch.dylib                   0x00007fff8c2a9ecc _dispatch_queue_invoke + 202
    23  libdispatch.dylib                   0x00007fff8c2a76b7 _dispatch_root_queue_drain + 463
    24  libdispatch.dylib                   0x00007fff8c2b5fe4 _dispatch_worker_thread3 + 91
    25  libsystem_pthread.dylib             0x00007fff91feb6cb _pthread_wqthread + 729
    26  libsystem_pthread.dylib             0x00007fff91fe94a1 start_wqthread + 13
)
22/10/2014 23:31:37.846 Catch[49839]: *** Terminating app due to uncaught exception 'NSTableViewException', reason: 'endUpdates called without a beginUpdates'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8715c64c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff84d8b6de objc_exception_throw + 43
    2   AppKit                              0x00007fff8cbfc311 -[NSTableRowData _doWorkAfterEndUpdates] + 0
    3   AppKit                              0x00007fff8cbf4792 -[NSTableView _endUpdateWithTile:] + 130
    4   Catch                               0x0000000109fab392 Catch + 9106
    5   Foundation                          0x00007fff9058a49c -[__NSObserver _doit:] + 307
    6   CoreFoundation                      0x00007fff87118cbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    7   CoreFoundation                      0x00007fff8700a1b4 _CFXNotificationPost + 3140
    8   Foundation                          0x00007fff90569ea1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    9   Catch                               0x0000000109faf4a6 Catch + 25766
    10  Catch                               0x0000000109faeae4 Catch + 23268
    11  Foundation                          0x00007fff905ff2b7 message_handler + 780
    12  libxpc.dylib                        0x00007fff8e4f4589 _xpc_connection_call_event_handler + 58
    13  libxpc.dylib                        0x00007fff8e4f6e78 do_mach_notify_port_destroyed + 166
    14  libxpc.dylib                        0x00007fff8e4f6db3 _Xmach_notify_port_destroyed + 74
    15  libxpc.dylib                        0x00007fff8e4f6d49 notify_server + 76
    16  libxpc.dylib                        0x00007fff8e4f2efa _xpc_connection_mach_event + 1564
    17  libdispatch.dylib                   0x00007fff8c2aa0f8 _dispatch_client_callout4 + 9
    18  libdispatch.dylib                   0x00007fff8c2ab1a3 _dispatch_mach_msg_invoke + 445
    19  libdispatch.dylib                   0x00007fff8c2a8154 _dispatch_queue_drain + 571
    20  libdispatch.dylib                   0x00007fff8c2a9a10 _dispatch_mach_invoke + 232
    21  libdispatch.dylib                   0x00007fff8c2a8154 _dispatch_queue_drain + 571
    22  libdispatch.dylib                   0x00007fff8c2a9ecc _dispatch_queue_invoke + 202
    23  libdispatch.dylib                   0x00007fff8c2a76b7 _dispatch_root_queue_drain + 463
    24  libdispatch.dylib                   0x00007fff8c2b5fe4 _dispatch_worker_thread3 + 91
    25  libsystem_pthread.dylib             0x00007fff91feb6cb _pthread_wqthread + 729
    26  libsystem_pthread.dylib             0x00007fff91fe94a1 start_wqthread + 13
)
22/10/2014 23:31:41.342 com.apple.xpc.launchd[1]: (org.giorgiocalderolla.Catch.54276[49839]) Service exited due to signal: Abort trap: 6
mipstian commented 10 years ago

Checking this out

mipstian commented 10 years ago

@crgmrgn I think I know why this is happening, I just pushed a commit that should fix it. Can you try to build it and see if you can reproduce?

Bad news is, the only way I could find to trigger this crash is if the feed checker service crashes. Which means there's still a crash out there. Can you look for any crash logs named com.giorgiocalderolla.Catch.CatchFeedHelper... in Console?

crgmrgn commented 10 years ago

Yup, got 4x of those in recent days, each flagging

Crashed Thread:        5  Dispatch queue: com.apple.NSXPCConnection.user.com.giorgiocalderolla.Catch.CatchFeedHelper

as the culprit, all with the same exception, "endUpdates called without a beginUpdates", etc.

Can upload them somewhere for you if it helps diagnose the issue, they're on my laptop to hand. I'll build the latest version after the weekend when I have a machine with the build tools on hand.

crgmrgn commented 10 years ago

I put one of the CrashReporter logs up as https://gist.github.com/crgmrgn/9b98856e5404052c3a51, happy to upload a few more ...

mipstian commented 10 years ago

That's a crash log for Catch the main process, I meant a crash log for the CatchFeedHelper deamon itself. In Console, in the sidebar, they will be named com.giorgiocalderolla.Catch.CatchFeedHelper<date><hostname>.crash. And the "Process" line at the top will read com.giorgiocalderolla.Catch.CatchFeedHelper. Do you have any of these?

crgmrgn commented 10 years ago

Nope, not seen any crash logs from the helper process directly retained ...

mipstian commented 10 years ago

Ok, so maybe the service was just evicted for memory pressure or something. That's good :)

So can you try building the current version from master for a few days and see if it doesn't crash? If everything's fine, I'll release it as 1.9.1.

timbck2 commented 10 years ago

I'm also having frequent crashes of Catch on OS X 10.10.1. I went ahead and built the current version from master and I'll run that for a while to see if it's fixed.

mipstian commented 10 years ago

Thanks so much timbck2, I was waiting for someone to report back on this issue before releasing 1.9.1. Let me know!

timbck2 commented 9 years ago

I'd like to report that I've had not a single crash of Catch.app since building the version from master.

mipstian commented 9 years ago

Great, thanks for helping out! I'll release 1.9.1 when I get a chance.

canyoubelieveit commented 9 years ago

I am also seeing this crash. How can I get 1.9.1 please? I am not a developer so I am not sure how to build it. I really appreciate your assistance.

mipstian commented 9 years ago

Try this: https://github.com/mipstian/catch/releases/tag/1.9.1