-
Notifications
You must be signed in to change notification settings - Fork 283
Crash when interrupting and auto-answering a redirected app in 0.4.4 #304
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
Comments
I tried all sorts of redirection inside a .bat file to no avail sadly. Are you able to get a minidump of the cmd.exe process that has segfaulted? It would be useful to see the contents of clink.log too if possible. |
Sure. Can you please let me know how I can do that? Some blog post, link somewhere I can use to make sure the dump is in the right format? Thanks! |
use WER to create a dump: http://msdn.microsoft.com/en-us/library/bb787181%28VS.85%29.aspx. I made a .reg file which configures WER to generate a full dump under C:\localdumps: https://www.dropbox.com/s/x4rhog9aujg53bz/WER_cmd.reg?dl=0 |
For some reason after importing the reg the dumps where under the default folder but nevertheless hopefully it is just as useful: https://www.dropbox.com/sh/vtmxn9p4unl0rf3/AACvujG9R6hJF_PXQzvnnTpia?dl=0
|
Thanks! For some reason the minidump was pretty garbled but I did manage to get an address which looked like a possible candidate. Clink will actually create its own minidumps if it crashes but I set the handler after the auto-answering code. Would you be able to try the build below? I've added a guard against the possible smoking gun in the minidump you provided and increased the scope of Clink's exception handler; https://www.dropbox.com/sh/hqbrpkf0dpmmizq/AADwEdKRtMkmmDLesBVNtp5Ja/20150408_e90f83 |
Thanks - just tried the dev build and there are no more crashes - thanks! By the way, one thing I've noticed is that when redirecting, I need to press ^C twice in order to return to the shell:
Looking at the log file it looks like the
If I press y, the shell properly exists without the
Would it be possible to somehow answer the question even when the input is redirected? Thanks for looking into this and the fast responses! The fact that the project is simply awesome goes without saying! |
tl;dr; cmd.exe is a mysterious beast. The redirection and piping of input, output, and error streams isn't all that straight forward when it comes to cmd.exe, and can sometimes require multiple Ctrl-C presses to get back to a prompt. It happens most often with .bat scripts that call out to other .bat scripts. This is regardless of whether Clink in use or not and as much as I'd like to try it isn't trivial to explain. Take you first example above. What the command command does is important. If it's a .bat script that spawns another .bat script, then it's probable you will need to press Ctrl-C twice - once for each active script. It's important to realise that there can be multiple processes attached to a console that you press Ctrl-C in - it's anyone's guess who actually gets that Ctrl-C. As for the "cannot open device for file" message - numerous scenarios can occur to cause this. Perhaps two .bat scripts tried to redirect to out.log simultaneously? Maybe one process was pipeline output to the input of another but opening the pipe failed, or it was closed early due to the Ctrl-C? |
Fair enough - I was hoping there was a way for clink to tag the starting shell and somehow intercept and propagate the 'signal' until it reaches the root but I realize that's not really possible since there are several, independent processes. Any idea when the next version will be released? Cheers, |
@costin importing can fail because of AV suites. Disable it next time or manually add the entry. |
@MagicAndre1981 I've actually added the .reg manually - probably need to double check that the entry is there and potentially reboot/relog. Cheers! |
Hi,
I'm experiencing a consistent crash on Win 8.1 SP1 x64 when auto-answering is enabled. Appears both in conemu and outside of it on a pure cmd prompt.
The problem seems to appear when running a java app that is redirected to a file:
Note that this does not occur when the app is not redirected. I suspect the bug might be caused by the fact that the app might steal the output (
System.in
andSystem.out
) but it's just a hunch.Note the problem does not occur in clink 0.4.3 nor 0.4.2.
The text was updated successfully, but these errors were encountered: