-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash - Skin.m line 406 - -[LuaSkin checkArgs:] #1782
Comments
I disagree with your "Code in question" - if you look at "Keys" section in "View all Sessions" on the crash report, there's:
which is more likely to be one of the two lines preceding the
It seems impossible that 1. could be relevant here. So, that leaves the question of whether the file handles can call the observer block (as defined between lines 891 and 958, after the Task has either terminated on its own, or because we GC'd it. Our That just leaves the GC path, and looking at |
Ha! Sorry, I didn't notice the Keys section. That's my laptop - but I don't remember CommandPost crashing today - strange! |
Also see: #1860 |
@cmsj - Will leave you to close this issue if you think it's not useful. |
Fixed in #1938 |
I am running into an issue that I think might be related. This simple test case from #1938 (comment) works OK: > task = hs.task.new("/bin/ls", function(exitCode, stdOut, stdErr)
print(string.format("exitCode: %s", exitCode))
print(string.format("stdOut: %s", stdOut))
print(string.format("stdErr: %s", stdErr))
end, function(exitCode, stdOut, stdErr)
print(string.format("exitCode: %s", exitCode))
print(string.format("stdOut: %s", stdOut))
print(string.format("stdErr: %s", stdErr))
return true
end):start()
2019-08-16 13:59:02: stream exitCode: hs.task: /bin/ls (0x7fe07b308338)
2019-08-16 13:59:02: stream stdOut: README.md
Spoons
anycomplete.lua
app_jump_menu.lua
app_watcher.lua
foo
hammerspoon-modal-menu-example.png
init.lua
notification_center.lua
utils.lua
volumes.lua
wifi_watcher.lua
window_controls.lua
wireguard-reconnect.sh
2019-08-16 13:59:02: stream stdErr:
2019-08-16 13:59:02: exitCode: 0
2019-08-16 13:59:02: stdOut:
2019-08-16 13:59:02: stdErr: The next test case usually (but not always) fails. Unlike the simpler /bin/ls example above which runs to completion quickly and only makes one call to the streaming callback, this example executes a script which takes ~4-5 seconds to run and triggers multiple callbacks.
#!/bin/bash
set -x
echo hello args $@
sleep 2
echo i am still here $RANDOM
sleep 2
echo ok i am done now $RANDOM
#ls -lR
#exit 1
exit 0 > task = hs.task.new("/tmp/foo.sh", function(exitCode, stdOut, stdErr)
print(string.format("exitCode: %s", exitCode))
print(string.format("stdOut: %s", stdOut))
print(string.format("stdErr: %s", stdErr))
end, function(exitCode, stdOut, stdErr)
print(string.format("stream exitCode: %s", exitCode))
print(string.format("stream stdOut: %s", stdOut))
print(string.format("stream stdErr: %s", stdErr))
return true
end):start() The crash message from hammerspoon when this code fails is:
|
@joemiller THANK YOU! This seems to be a reliable reproducer for one of our most common crash reports, that has eluded a reproducer so far. I can't begin to describe how valuable it is to have people report crashing configs! @asmagill I'm going to be away from my main Mac for a couple of weeks, and for some reason I can't get either Xcode 10 or 11 to debug properly on my Catalina beta macbook. Are you able to get a successful debug session with either current |
I won't have a chance to try any fixes until tonight or tomorrow, but after reviewing the code... I'm not nearly as familiar with Under this assumption, which I admit I'm currently making with no evidence beyond the fact that I can't envision any other way that Unless we want to set different flags in both handlers and then setup a timer which checks that both flags are set before clearing |
See: http://crashes.to/s/f477e2cc3d9
Code in question:
[_skin pushNSObject:stdOutArg];
Logs:
The text was updated successfully, but these errors were encountered: