Summary: Crash on exit when embeeding std.stream.File in a
--- Comment #0 from gamezel...@gmail.com 2011-06-29 14:18:56 PDT ---
The following piece of code seems to crash consistently on Windows (but it
seems to also affect Linux, and that's where I found it - particularly, it only
seemed to crash depending on the content of a static constructor: removing
almost any line from it removed the crash; the minimal test case was large, so
I have not included it).
this.output = output;
int main(string args)
new X(new std.stream.File("x.log", FileMode.OutNew));
Adding "writeln(output.isOpen);" to the close() method removes the crash (and
returns true before .close() and false after .close(), as one would expect). On
the large test case for Linux, however, the crash persisted even with isOpen(),
and just "touching" the object crashed the program (it looked like I was
working with an already released object).
PS: Sorry if I'm missing something obvious and this is a not a bug, but the
behaviour is odd, at least. Also, I posted a message directly to the mailing
list - I found that bugzilla.digitalmars.com was only for DMC, so I thought
that I should use the mailing list for D directory - sorry!
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------