puffnfresh / Honer.app

OS X application to draw a border around the focused window
MIT License
292 stars 16 forks source link

Honer crashes daily #4

Open wting opened 10 years ago

wting commented 10 years ago

I'm not sure how to debug this, but I have to restart Honer multiple times a day since it keeps crashing.

System: Mavericks on rMBP.

chmac commented 9 years ago

Same here on Yosemite / iMac retina.

I tried starting Honer from a terminal, but that prompted me to allow iTerm to modify my accessibility settings. Is it possible to run Honer with some kind of debug flag enabled?

chmac commented 9 years ago

I'm trying to workaround this with the following crontab.

# Check Honer is running every 5 minutes
*/5  *   *    *    *    if [ ! $(ps aux | grep Honer | wc -l) -eq "2" ]; then open /Applications/Honer.app/; fi

This starts Honer every 5 minutes if it's not already running. I've done some rudimentary testing and it's working for me so far. The -g flag is necessary to stop the open command from making Honer the foreground application (your current window loses focus if that happens).

amirnissim commented 8 years ago

same here on Yosemite, usually after sleep

JakeSc commented 8 years ago

I've been seeing this as well on El Capitan. I have been running Honer in Xcode with break-on-exceptions enabled, hopefully to try to catch one of the crashes in the debugger. This hasn't worked thus far. I'll try on macOS Sierra.

Thanks @chmac for the workaround.

JakeSc commented 8 years ago

Just crashed upon wake:

Process:               Honer [996]
Path:                  /Users/USER/*/Honer.app/Contents/MacOS/Honer
Identifier:            org.brianmckenna.Honer
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Honer [996]
User ID:               501

Date/Time:             2016-08-22 12:15:05.240 -0700
OS Version:            Mac OS X 10.11.6 (15G31)
Report Version:        11
Anonymous UUID:        CC80A4E4-91FA-8208-A6CD-DEADB33F3DA2

Time Awake Since Boot: 5500 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x8:
--> 
    __TEXT                 0000000109f65000-0000000109f69000 [   16K] r-x/rwx SM=COW  /Users/USER/*/Honer.app/Contents/MacOS/Honer

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00007fff899ad79e CFRunLoopAddSource + 78
1   org.brianmckenna.Honer          0x0000000109f67453 0x109f65000 + 9299
2   org.brianmckenna.Honer          0x0000000109f67234 0x109f65000 + 8756
3   com.apple.CoreFoundation        0x00007fff899f5bbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
4   com.apple.CoreFoundation        0x00007fff899f5b4f ___CFXRegistrationPost_block_invoke + 63
5   com.apple.CoreFoundation        0x00007fff899f5ac7 _CFXRegistrationPost + 407
6   com.apple.CoreFoundation        0x00007fff899f5832 ___CFXNotificationPost_block_invoke + 50
7   com.apple.CoreFoundation        0x00007fff899b25e2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
8   com.apple.CoreFoundation        0x00007fff899b1835 _CFXNotificationPost + 693
9   com.apple.Foundation            0x00007fff8698417a -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
10  com.apple.AppKit                0x00007fff8ef2fbcb applicationStatusSubsystemCallback + 782
11  com.apple.LaunchServices        0x00007fff88e3c5f4 ___LSScheduleNotificationFunction_block_invoke_2 + 47
12  com.apple.CoreFoundation        0x00007fff899ff4ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
13  com.apple.CoreFoundation        0x00007fff899ded05 __CFRunLoopDoBlocks + 341
14  com.apple.CoreFoundation        0x00007fff899dea6b __CFRunLoopRun + 2347
15  com.apple.CoreFoundation        0x00007fff899dded8 CFRunLoopRunSpecific + 296
16  com.apple.HIToolbox             0x00007fff976a5935 RunCurrentEventLoopInMode + 235
17  com.apple.HIToolbox             0x00007fff976a576f ReceiveNextEventCommon + 432
18  com.apple.HIToolbox             0x00007fff976a55af _BlockUntilNextEventMatchingListInModeWithFilter + 71
19  com.apple.AppKit                0x00007fff8ed47df6 _DPSNextEvent + 1067
20  com.apple.AppKit                0x00007fff8ed47226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
21  com.apple.AppKit                0x00007fff8ed3bd80 -[NSApplication run] + 682
22  com.apple.AppKit                0x00007fff8ed05368 NSApplicationMain + 1176
23  libdyld.dylib                   0x00007fff944f05ad start + 1
andbloch commented 7 years ago

Rather than using a cron, I'd do the following:

cd ~/Library/LaunchAgents

and create the following file: user.launchkeep.honer.plist

with the following contents

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>user.launchkeep.honer</string>
  <key>KeepAlive</key>
  <true/>
  <key>Program</key>
  <string>/Applications/Honer.app/Contents/MacOS/Honer</string>
</dict>
</plist>

Next time you'll login into your user account there'll be a deamon constantly restarting Honer (if it quits for some reason).

You may also activate the deamon (without having to sign out) by typing

launchctl load ~/Library/LaunchAgents/user.launchkeep.honer.plist

into your terminal.

bnisly commented 6 years ago

This stacktrace shows class and method names:

Process:               Honer [1642]
Path:                  /Applications/Honer.app/Contents/MacOS/Honer
Identifier:            Honer
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Honer [1642]
User ID:               101917201

Date/Time:             2017-11-13 20:00:14.460 -0800
OS Version:            Mac OS X 10.13.1 (17B48)
Report Version:        12
Anonymous UUID:        B5E39543-F911-DDFF-1B8F-938E082C9DC3

Time Awake Since Boot: 1900 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x8:
--> 
    __TEXT                 000000010e4a2000-000000010e4a9000 [   28K] r-x/rwx SM=COW  (
 [/Applications/Honer.app/Contents/MacOS/Honer]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00007fff28182759 CFRunLoopAddSource + 153
1   org.brianmckenna.Honer          0x000000010e4a4410 -[HonerApplicationDelegate attachNotifications:] + 400
2   org.brianmckenna.Honer          0x000000010e4a3f78 -[HonerApplicationDelegate updateWindow] + 200
3   org.brianmckenna.Honer          0x000000010e4a3e9a -[HonerApplicationDelegate onDeactivate:] + 58
4   com.apple.CoreFoundation        0x00007fff281c9cbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
5   com.apple.CoreFoundation        0x00007fff281c9baa _CFXRegistrationPost + 442
6   com.apple.CoreFoundation        0x00007fff281c98f2 ___CFXNotificationPost_block_invoke + 50
7   com.apple.CoreFoundation        0x00007fff281876d0 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1664
8   com.apple.CoreFoundation        0x00007fff28186803 _CFXNotificationPost + 595
9   com.apple.Foundation            0x00007fff2a249477 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
10  com.apple.AppKit                0x00007fff25987513 applicationStatusSubsystemCallback + 761
11  com.apple.LaunchServices        0x00007fff2961210e ___LSScheduleNotificationFunction_block_invoke_2 + 47
12  com.apple.CoreFoundation        0x00007fff281d268c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
13  com.apple.CoreFoundation        0x00007fff281b50a3 __CFRunLoopDoBlocks + 275
14  com.apple.CoreFoundation        0x00007fff281b4e68 __CFRunLoopRun + 3128
15  com.apple.CoreFoundation        0x00007fff281b3fa3 CFRunLoopRunSpecific + 483
16  com.apple.HIToolbox             0x00007fff274d3866 RunCurrentEventLoopInMode + 286
17  com.apple.HIToolbox             0x00007fff274d35d6 ReceiveNextEventCommon + 613
18  com.apple.HIToolbox             0x00007fff274d3354 _BlockUntilNextEventMatchingListInModeWithFilter + 64
19  com.apple.AppKit                0x00007fff257d0a23 _DPSNextEvent + 2085
20  com.apple.AppKit                0x00007fff25f65e6c -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
21  com.apple.AppKit                0x00007fff257c5831 -[NSApplication run] + 764
22  com.apple.AppKit                0x00007fff257949d2 NSApplicationMain + 804
23  org.brianmckenna.Honer          0x000000010e4a5172 main + 34
24  libdyld.dylib                   0x00007fff4f796145 start + 1