www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Chash at shutdown.

reply =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Tested with dmd 0.91, win2k and win98se.

The attached files compile to an executable that produces the desired 
output but crashes after the main() function has finished.

I haven't been able to reproduce the bug with a smaller example, sorry.

The problem seems to be the import statement inside class A combined 
with the six integer variables (strange, there has to be six of them, 
not five, nor seven).

Other than that I can tell you much about it.


-- 
Julio CÚsar Carrascal Urquijo
http://jcesar.f2o.org/
Jun 01 2004
next sibling parent =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
I'm sorry, that should be "Crash".


-- 
Julio CÚsar Carrascal Urquijo
http://jcesar.f2o.org/
Jun 01 2004
prev sibling next sibling parent reply Billy Zelsnack <billy_zelsnack yahoo.com> writes:
Does this happen in both console and window (ie, no console) mode? My 
stuff has this problem, but I figured I was just doing something stupid 
because the winsamp sample worked fine.

Julio CÚsar Carrascal Urquijo wrote:
 Tested with dmd 0.91, win2k and win98se.
 
 The attached files compile to an executable that produces the desired 
 output but crashes after the main() function has finished.
 
 I haven't been able to reproduce the bug with a smaller example, sorry.
 
 The problem seems to be the import statement inside class A combined 
 with the six integer variables (strange, there has to be six of them, 
 not five, nor seven).
 
 Other than that I can tell you much about it.
 
 

Jun 01 2004
parent =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Billy Zelsnack wrote:

 
 Does this happen in both console and window (ie, no console) mode? My 
 stuff has this problem, but I figured I was just doing something stupid 
 because the winsamp sample worked fine.

Either way. I was chasing another bug on a windows program that make a method almost *disappear* after linking but found this instead. -- Julio CÚsar Carrascal Urquijo http://jcesar.f2o.org/
Jun 01 2004
prev sibling next sibling parent reply =?ISO-8859-1?Q?Julio_C=E9sar_Carrascal_Urquijo?= writes:
Just to let you know that this bug is still present in dmd 0.94. ;)

-- 
Julio CÚsar Carrascal Urquijo


Julio CÚsar Carrascal Urquijo wrote:
 Tested with dmd 0.91, win2k and win98se.
 
 The attached files compile to an executable that produces the desired 
 output but crashes after the main() function has finished.
 
 I haven't been able to reproduce the bug with a smaller example, sorry.
 
 The problem seems to be the import statement inside class A combined 
 with the six integer variables (strange, there has to be six of them, 
 not five, nor seven).
 
 Other than that I can tell you much about it.

Jul 01 2004
parent J C Calvarese <jcc7 cox.net> writes:
Julio CÚsar Carrascal Urquijo wrote:
 Just to let you know that this bug is still present in dmd 0.94. ;)

You're right. (More comments belows...) /* *** a.d *** */ module a; class A { import b; this() { printf("A.this()\n"); _b1 = null; } private: int _i1, _i2, _i3, _i4, _i5, _i6; //import b; B _b1; } /* *** b.d *** */ module b; private import a; class B : A { public: this() { printf("B.this(B)\n"); super(); } } I don't really know anything about the bug, but I'm surprised that class A can contain a member of class B (that inherits from A). Seems like a case of which came first, the chicken or the egg? But it does compiles and even runs if there aren't six integers. So, classes much be able to contain objects of an inherited class. I didn't even think that'd be possible. D keeps on getting cooler. By the way, this seems to be another way to avoid the runtime error: private: //import b; B _b1; /* moved above the 6 integers */ int _i1, _i2, _i3, _i4, _i5, _i6; } /* *** *** Other files for reference... *** *** */ /* *** build.bat *** */ dmd main.d a.d b.d imp.d main.exe pause /* *** main.d *** */ import imp; void main() { printf("main() {\n"); B b1 = new B(); printf("}\n"); } /* *** imp.d *** */ module imp; import a; import b; O.P.: digitalmars.D.bugs/357 -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jul 01 2004
prev sibling parent "Walter" <newshound digitalmars.com> writes:
"Julio CÚsar Carrascal Urquijo" <adnoctum phreaker.net> wrote in message
news:c9i247$150c$1 digitaldaemon.com...
 Tested with dmd 0.91, win2k and win98se.

 The attached files compile to an executable that produces the desired
 output but crashes after the main() function has finished.

 I haven't been able to reproduce the bug with a smaller example, sorry.

 The problem seems to be the import statement inside class A combined
 with the six integer variables (strange, there has to be six of them,
 not five, nor seven).

 Other than that I can tell you much about it.

Try running it under a debugger and see where it is failing. Do you have destructors?
Jul 19 2004