www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - abnormal program termination

reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
I am running into an ICE on windows - Assertion Failure on such-and-such 
line in mtype.c - and I am trying to get a test command for to reduce it 
with the redoubtable dustmite.

Normally, 'abnormal program termination' is printed to the console; 
however if I try to redirect stderr for greppage purposes, windows 
presents me with a message box with the same message.

Any ideas how to disable this abomination?
Aug 24 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer  
<ellery-newcomer utulsa.edu> wrote:

 I am running into an ICE on windows - Assertion Failure on such-and-such  
 line in mtype.c - and I am trying to get a test command for to reduce it  
 with the redoubtable dustmite.

 Normally, 'abnormal program termination' is printed to the console;  
 however if I try to redirect stderr for greppage purposes, windows  
 presents me with a message box with the same message.

 Any ideas how to disable this abomination?
Can you show us an example of how you're redirecting stderr.. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Aug 28 2012
parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 08/28/2012 06:37 AM, Regan Heath wrote:
 On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer
 <ellery-newcomer utulsa.edu> wrote:

 I am running into an ICE on windows - Assertion Failure on
 such-and-such line in mtype.c - and I am trying to get a test command
 for to reduce it with the redoubtable dustmite.

 Normally, 'abnormal program termination' is printed to the console;
 however if I try to redirect stderr for greppage purposes, windows
 presents me with a message box with the same message.

 Any ideas how to disable this abomination?
Can you show us an example of how you're redirecting stderr.. R
dmd stuff 2>&1
Aug 28 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Tue, 28 Aug 2012 15:59:34 +0100, Ellery Newcomer  
<ellery-newcomer utulsa.edu> wrote:

 On 08/28/2012 06:37 AM, Regan Heath wrote:
 On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer
 <ellery-newcomer utulsa.edu> wrote:

 I am running into an ICE on windows - Assertion Failure on
 such-and-such line in mtype.c - and I am trying to get a test command
 for to reduce it with the redoubtable dustmite.

 Normally, 'abnormal program termination' is printed to the console;
 however if I try to redirect stderr for greppage purposes, windows
 presents me with a message box with the same message.

 Any ideas how to disable this abomination?
Can you show us an example of how you're redirecting stderr.. R
dmd stuff 2>&1
I searched the DMD sources, just in case the message "abnormal program termination" was DMD specific, and I found nothing. Then I searched all files and the string appears in the dmd.exe binary, making me suspect the compiler used to produce dmd.exe put it there, so perhaps there is a dmc option to disable it. If that's not it.. What Windows are you on? Do you have visual studio or another JIT debugger installed? I am on Windows 7 x64 and I have been playing with a test.exe (built in VS in debug mode). I can't get my version of windows to output "abnormal program termination" no matter what I tried to make my application do assert, throw exception, divide by zero, illegal pointer/memory write, etc. If I do an assert(0) I see: ...>test Assertion failed: 0, file ...\test.cpp, line 27 plus a popup window saying: "Microsoft Visual C++ Debug Library" "Debug Error! Program: ... This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. (Press Retry to debug the application)" I suspect the popup is a hook into the JIT debugger I have installed (visual studio). By default some versions of windows use DrWatson (drwtsn32.exe), later versions use something else. Google found me this tho, might be helpful: http://blogs.msdn.com/b/alejacma/archive/2011/02/18/how-to-disable-the-pop-up-that-windows-shows-when-an-app-crashes.aspx R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Aug 28 2012
parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 08/28/2012 09:55 AM, Regan Heath wrote:
 I searched the DMD sources, just in case the message "abnormal
 program termination" was DMD specific, and I found nothing.  Then I
 searched all files and the string appears in the dmd.exe binary,
 making me suspect the compiler used to produce dmd.exe put it there,
 so perhaps there is a dmc option to disable it.
maybe so
 What Windows are you on?  Do you have visual studio or another JIT
 debugger installed?
Windows 7 x32 with visual studio 11 beta
 I am on Windows 7 x64 and I have been playing with a test.exe (built in
 VS in debug mode).

 I can't get my version of windows to output "abnormal program
 termination" no matter what I tried to make my application do assert,
 throw exception, divide by zero, illegal pointer/memory write, etc.
If you like, you could try building the unreduced case download pyd https://bitbucket.org/ariovistus/pyd from top dir, run (python setup.py install) go to examples/wrap, run (python setup.py build)
 Google found me this tho, might be helpful:
 http://blogs.msdn.com/b/alejacma/archive/2011/02/18/how-to-disable-the-pop-up-that-windows-shows-when-an-app-crashes.aspx
didn't help
Aug 28 2012
next sibling parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Tue, 28 Aug 2012 21:03:47 +0100, Ellery Newcomer  
<ellery-newcomer utulsa.edu> wrote:
 If you like, you could try building the unreduced case

 download pyd

 https://bitbucket.org/ariovistus/pyd

 from top dir, run (python setup.py install)
 go to examples/wrap, run (python setup.py build)
Ok. I downloaded and installed python. Then pyd. I run "python setup.py build" in examples\wrap and see the ICE. I run "python setup.py build 1>a.txt 2>&1" and get a popup box :) So, we're on the same page at least.. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Aug 29 2012
parent "Regan Heath" <regan netmail.co.nz> writes:
On Wed, 29 Aug 2012 09:47:57 +0100, Regan Heath <regan netmail.co.nz>  
wrote:

 On Tue, 28 Aug 2012 21:03:47 +0100, Ellery Newcomer  
 <ellery-newcomer utulsa.edu> wrote:
 If you like, you could try building the unreduced case

 download pyd

 https://bitbucket.org/ariovistus/pyd

 from top dir, run (python setup.py install)
 go to examples/wrap, run (python setup.py build)
Ok. I downloaded and installed python. Then pyd. I run "python setup.py build" in examples\wrap and see the ICE. I run "python setup.py build 1>a.txt 2>&1" and get a popup box :) So, we're on the same page at least..
How do I get/see the full dmd.exe command line being executed? (I have never used python.. so go slow) R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Aug 29 2012
prev sibling parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
On 08/28/2012 01:03 PM, Ellery Newcomer wrote:
 On 08/28/2012 09:55 AM, Regan Heath wrote:
  > I searched the DMD sources, just in case the message "abnormal
  > program termination" was DMD specific, and I found nothing.  Then I
  > searched all files and the string appears in the dmd.exe binary,
  > making me suspect the compiler used to produce dmd.exe put it there,
  > so perhaps there is a dmc option to disable it.

 maybe so
found it. void dmd_51d770(char* msg, char* title) { HANDLE handle; DWORD nchars; handle = GetStdHandle(STD_ERROR_HANDLE); if(handle == INVALID_HANDLE_VALUE || WriteConsoleA(handle, msg, strlen(msg), &nchars, 0) == 0) { MessageBoxA(NULL, msg, title, MB_OK|MB_ICONHAND|MB_TASKMODAL); } } good old olly. Sorry to waste your time.
Aug 29 2012
parent reply "Regan Heath" <regan netmail.co.nz> writes:
On Wed, 29 Aug 2012 18:43:27 +0100, Ellery Newcomer  
<ellery-newcomer utulsa.edu> wrote:

 On 08/28/2012 01:03 PM, Ellery Newcomer wrote:
 On 08/28/2012 09:55 AM, Regan Heath wrote:
  > I searched the DMD sources, just in case the message "abnormal
  > program termination" was DMD specific, and I found nothing.  Then I
  > searched all files and the string appears in the dmd.exe binary,
  > making me suspect the compiler used to produce dmd.exe put it there,
  > so perhaps there is a dmc option to disable it.

 maybe so
found it.
Where did you find that.. I still can't find the blasted thing :p
 void dmd_51d770(char* msg, char* title) {
      HANDLE handle;
      DWORD nchars;
      handle = GetStdHandle(STD_ERROR_HANDLE);
      if(handle == INVALID_HANDLE_VALUE ||
         WriteConsoleA(handle, msg, strlen(msg), &nchars, 0) == 0) {
          MessageBoxA(NULL, msg, title, MB_OK|MB_ICONHAND|MB_TASKMODAL);
      }
 }


 good old olly.

 Sorry to waste your time.
NP. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Aug 30 2012
parent "Ellery Newcomer" <ellery-newcomer utulsa.edu> writes:
On Thursday, 30 August 2012 at 13:39:30 UTC, Regan Heath wrote:
 Where did you find that.. I still can't find the blasted thing 
 :p

 void dmd_51d770(char* msg, char* title) {
at address 0x51d770 in the _TEXT section (in a slightly less disassembled form) apparently I'm not the first person to meet this textbox: https://github.com/CyberShadow/DustMite/wiki/Suppressing-DMD-crashes
Aug 30 2012