From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by sourceware.org (Postfix) with ESMTP id 4007F3857C5F for ; Sat, 14 Nov 2020 03:45:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4007F3857C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=optusnet.com.au Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dunc@dimstar.local.net Received: from dimstar.local.net (n49-192-180-44.sun4.vic.optusnet.com.au [49.192.180.44]) by mail104.syd.optusnet.com.au (Postfix) with SMTP id 3855D58C635 for ; Sat, 14 Nov 2020 14:45:04 +1100 (AEDT) Received: (qmail 13029 invoked by uid 501); 14 Nov 2020 03:45:04 -0000 Date: Sat, 14 Nov 2020 14:45:04 +1100 From: Duncan Roe To: cygwin@cygwin.com Subject: Re: Failed assertion dialog box Message-ID: <20201114034504.GD2905@dimstar.local.net> Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=F8MpiZpN c=1 sm=1 tr=0 cx=a_idp_d a=LANN2BGfcS3zZ0PSgbjVGw==:117 a=LANN2BGfcS3zZ0PSgbjVGw==:17 a=kj9zAlcOel0A:10 a=nNwsprhYR40A:10 a=RSmzAf-M6YYA:10 a=pGLkceISAAAA:8 a=UntUDk0iTvD3zguGKhcA:9 a=CjuIK1q_8ugA:10 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2020 03:45:11 -0000 Hi William, On Fri, Nov 13, 2020 at 12:27:57PM -0500, cygwin wrote: > I've run into a problem running a collection of tests under Cygwin and I > wonder if anyone can suggest a way around it. > > The problem occurs when a program being run fails a C/C++ runtime > assertion. Ordinarily, this just writes an error message on stderr and > aborts. Under Cygwin, however, if both stdin and stderr are redirected to > files, the program instead pops up a dialog box that must be interactively > dismissed before the failed program will exit - holding up all the tests > that follow it. > > Specifically, if I have the following as assert.cpp: > > #include > int main() { > assert(false); > } > > and say > > gcc assert.cpp > ./a.exe < /dev/null > output 2>&1 > > I get an error dialog box saying > > Failed assertion > false > at line 3 of file assert.cpp > in function int main() > > If I omit either the stdin or the stderr redirection, the program behaves > as desired with no dialog box. > > Is there an environment setting or compiler command-line option I can give > to suppress the dialog box and always just write a message to stderr and > abort? Thanks for any insights. > > -- > William M. (Mike) Miller | Edison Design Group > william.m.miller@gmail.com > -- Your example WFFM, (Cygwin64, gcc 10.2.0, everything else also up to date). Do you still see this behaviour if you run the installer? Cheers ... Duncan.