www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Unhandled exception in dmd.exe:0xC0000005:Access Violation

reply David L. Davis <SpottedTiger yahoo.com> writes:
// WinXP SP2 with dmd v0.122
// Bug: Unhandled exception in dmd.exe:0xC0000005:Access Violation.
// CrashD.d
private import std.stdio;

class A 
{
void test() { writefln( "A.test() Called."); }
void test( in int iVal ) 
{ writefln( "A.test( in int iVal=\"%s\" ) Called.", iVal ); }
}

class B : A
{
void test() { writefln( "B.test() Called."); }
}

void main()
{
B ob = new B();

ob.test( 6 ); //<- This line causes the error, which is normal, 
//   but not the "Access Violation" error that follows.  
ob.test();
}

Output:
--------
C:\dmd>dmd crashd.d
crashd.d(19): function crashd.B.test () does not match argument types (int)

*-->Debug dialog pops up, then when clicking on the debug command button,
MS VC++ v6.0 starts up and gives following message: 
"Unhandled exception in dmd.exe:0xC0000005:Access Violation."

---------------
Note: That this same code was compiled under dmd v0.114 in 
Feburary 2005 with following error messages which are correct:
C:\dmd>dmd crashd.d
crashd.d(19): function crashd.B.test () does not match argument types (int)
crashd.d(19): Error: expected 0 arguments, not 1
C:\dmd>

David L.

-------------------------------------------------------------------
"Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"
-------------------------------------------------------------------

MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
May 05 2005
parent reply Derek Parnell <derek psych.ward> writes:
On Fri, 6 May 2005 04:01:19 +0000 (UTC), David L. Davis wrote:

 // WinXP SP2 with dmd v0.122
 // Bug: Unhandled exception in dmd.exe:0xC0000005:Access Violation.

This has been reported earlier. It is caused because Walter had left some 'debug' code in the DMD front-end code. Only crashes DMD if you have mismatching arguments. -- Derek Melbourne, Australia 6/05/2005 2:07:44 PM
May 05 2005
parent David L. Davis <SpottedTiger yahoo.com> writes:
In article <3m396cc2ypnm$.qcjhhvm7s2x5$.dlg 40tude.net>, Derek Parnell says...
On Fri, 6 May 2005 04:01:19 +0000 (UTC), David L. Davis wrote:

 // WinXP SP2 with dmd v0.122
 // Bug: Unhandled exception in dmd.exe:0xC0000005:Access Violation.

This has been reported earlier. It is caused because Walter had left some 'debug' code in the DMD front-end code. Only crashes DMD if you have mismatching arguments. -- Derek Melbourne, Australia 6/05/2005 2:07:44 PM

Derek, thanks for pointing out that this has been already reported, and the reason why dmd is crashing. David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
May 05 2005