De : Cygwin <cygwin-boun...@cygwin.com> de la part de Thomas Wolff <redacted> Envoyé : 19 novembre 2020 13:30 À : cygwin@cygwin.com <cygwin@cygwin.com> Objet : Re: Failed assertion dialog box ATTN: Takashi Yano ---------------------------------------------------------------------------------------
Am 19.11.2020 um 15:21 schrieb André Bleau via Cygwin: > ... > Here's some more info: > > It seems the bug is related to pseudo-console support; that explains why it > is Windows 10 specific. > > Experiment: > > CYGWIN=disable_pcon /usr/bin/mintty & > > In the newly created window: > > $ ./a.exe </dev/null >output.txt 2>&1 > Aborted (core dumped) > > No message box popup. > > $ cat output.txt > assertion "false" failed: file "assert.cpp", line 3, function: int main() > > In the original mintty window, with empty CYGWIN env variable: > > $ ./a.exe </dev/null >output.txt 2>&1 > Aborted (core dumped) > > A message box pops > > AND: > > $ cat output.txt > > output.txt is empty > > So, 2 problems here. > > In a CMD Window: > > set path=%PATH%D:\Cygwin\bin; > a.exe <NUL: >outcmd.txt 2>&1 > 1 [main] a 759 cygwin_exception::open_stackdumpfile: Dumping stack >trace to a.exe.stackdump > > type outcmd.txt > assertion "false" failed: file "assert.cpp", line 3, function: int main() > 1 [main] a 759 cygwin_exception::open_stackdumpfile: Dumping stack >trace to a.exe.stackdump > > The bug could be in cygwin or in mintty. Maybe this is something that Thomas > Wolff (mintty author) or Takashi Yano (pseudo-console support expert) would > want to look at. > --------------------------------------------------------------------------------------- > > OK, I opened an issue for mintty and it was quickly closed with that quote: > > "Quick generic answer: if it's caused by ConPTY support, it's not related to > mintty; also mintty never shows any popups. > Funny thing, though, but really: assert isn't handled by the terminal." > > So the issue can only be with pseudo-console support in cygwin. It does not seem to happen in xterm which is weird. It does however also happen in rxvt-unicode, xfce4-terminal, and vte. The message text of the popup can be easily found in cygwin code. Thomas --------------------------------------------------------------------------------------- One more data point: The following program: $ cat stderr.c #include <stdio.h> int main() { fprintf(stdout, "To stdout\n"); fprintf(stderr, "To stderr\n"); return 0; } $ gcc stderr.c $ ./a.exe </dev/null >output.txt 2>&1 Behaves normally, with either empty CYGWIN env variable or with $ CYGWIN=disable_pcon /usr/bin/mintty & So the problem is narrowly confined to how Cygwin handles assert when pseudo-console is used and stdin, stdout, and stderr are redirected. Not in all cases where pseudo-console is used and stdin, stdout, and stderr are redirected. - André Bleau -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple