pilotmoon / Scroll-Reverser

Per-device scrolling prefs on macOS.

Home Page:https://pilotmoon.com/scrollreverser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New version crashes on wake from sleep

berezovskyi opened this issue · comments

macOS 10.12.1 (16B2555)

Scroll Reverser 1.7.3

Is there a way for me to gather the debug log?

With the debug window open, check Pause, and the the table rows will become selectable and copiable to the clipboard.

I just realised you probably meant the crash log - this should be in Console.app under User Reports on the sidebar.

My apologies, I meant crash log.

There is not report for Scroll Reverser. I tried to put the laptop to sleep and wake it, but I couldn't immediately reproduce the issue. But at least twice since the update to the latest version, after the laptop wakes from sleep, there is no Scroll Reverser icon in the menu bar.

Is there a debug build I could install to collect more information? Or I am just not finding the right location where do you write the logs?

Oh dear, it sounds like my relaunch code is failing. The relevant commit is:
176a2a8

If so, it is not actually crashing but simply quitting itself. I wonder if the relaunch script sleep time is too short on your machine for some reason. Or perhaps it's not the timeout but something else. Maybe need a more robust relaunch method...

Thanks for a pointer, Nick. I think this code can be improved to wait until the current PID is not active:

while kill -0 $1 >/dev/null 2>&1
do
    sleep 0.01
done

echo "process '${1}' has exited"

other options: http://stackoverflow.com/questions/11425876/bash-using-while-or-until-to-wait-until-a-pid-doesnt-exist

I made a quick test, here is how it works: https://www.youtube.com/watch?v=RM7I7cpe3-8&feature=youtu.be

Never did Obj-C development before, but I try to make PR for this change.