January 22, 2005 std.stream Access Violation | ||||
---|---|---|---|---|
| ||||
DMD 0.111 on Windows, import std.stream; int main() { File f; EndianStream stm; f = new File("foo.txt", FileMode.OutNew); stm = new EndianStream(f); stm.writeBOM(BOM.UTF8); // Here. stm.close(); f.close(); return 0; } Causes an Access Violation when using phobos.lib, but if I compile stream.d and link it in myself it works OK. Took too long to track this down :| Debugger gave me an irrelevant line number and said the AV was from MemoryStream's vtbl. |
January 22, 2005 Re: std.stream Access Violation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vathix | It looks like the phobos.lib that is in dmd.zip isn't quite right. When I recompile phobos without changing anything I get a slightly larger phobos.lib (579K instead of 574K) and, more importantly, the lib works. I think Walter should do a clean build on phobos - my guess is an old stream.obj was floating around and when he dropped in my updated stream.d the time-stamp on my file was probably older than the obj (I'm stretching, perhaps) and that fooled the dependency checker so it didn't rebuild stream.obj. I can't explain the behavior otherwise. "Vathix" <vathix@dprogramming.com> wrote in message news:opskz9g9h7kcck4r@tc3-ppp223.dialup.wzrd.com... > DMD 0.111 on Windows, > > import std.stream; > int main() > { > File f; > EndianStream stm; > > f = new File("foo.txt", FileMode.OutNew); > stm = new EndianStream(f); > > stm.writeBOM(BOM.UTF8); // Here. > > stm.close(); > f.close(); > return 0; > } > > Causes an Access Violation when using phobos.lib, but if I compile stream.d and link it in myself it works OK. Took too long to track this down :| Debugger gave me an irrelevant line number and said the AV was from MemoryStream's vtbl. |
Copyright © 1999-2021 by the D Language Foundation