csexton / captured-mac

Captured
http://www.capturedapp.com
MIT License
5 stars 1 forks source link

Crash when holding <Control> and taking screenshot #50

Open csexton opened 7 years ago

csexton commented 7 years ago

Got an email from a Tim:

I noticed that if I try to hold control down while releasing the cursor I've used to draw a square on my display so as to shove the resulting screenshot into my clipboard vs. captured, captured will crash. workflow:

shift-cmd-4, make a selection, hold control while releasing selection = crash shift-cmd-4, make a selection, release = screenshot goes to captured as expected

Here's the system.log event:

Oct 10 10:41:13 centra com.apple.xpc.launchd[1] (com.codeography.captured-mac.2280[79658]): Service exited due to signal: Illegal instruction: 4 sent by exc handler[0]
Oct 10 10:41:14 centra ReportCrash[89256]: Saved crash report for Captured[79658] version 4.5 (10) to /Users/tim/Library/Logs/DiagnosticReports/Captured_2016-10-10-104114_centra.crash
Oct 10 10:43:02 centra com.apple.xpc.launchd[1] (com.codeography.captured-mac.2280[89264]): Service exited due to signal: Illegal instruction: 4 sent by exc handler[0]
Oct 10 10:43:02 centra ReportCrash[89288]: Saved crash report for Captured[89264] version 4.5 (10) to /Users/tim/Library/Logs/DiagnosticReports/Captured_2016-10-10-104302_centra.crash

.crash log attached.

If this is something on my end, please feel free to beat me with a thousand party parrots. Otherwise, I hope the bug hunt is fruitful. :)

I was able to reproduce. This is because when screencapture runs in interactive mode and you hold control when clicking it goes to the pasteboard. Thus the file DNE, and my code doesn't handle that case.

Should fix this by checking to see if the file exists after running the command. If it does, run normally; if not, just exit the command.

juliancheal commented 7 years ago

giphy