See also NG:D/26297.
Problem code, from ( NG:D/26447):
See also NG:D/26317.
If it's compiled in release (dmd arrays.d -release), it the error is expressed as "Error: Access Violation".
Add this line
- It's generated by std.stream ( NG:digitalmars.D/18709).
The problem was caused by the server's software where I was getting the data from, which, by the way, is written in Java. I was trying to acquire data from that server using D. D acted accordingly, so the problem was java memory cap setting. The cap was set for 128MB of memory. The amount of XML that I was downloading exceeded that amount and I kept getting that "Error: not enough data in stream." After raising the memory cap to 1024MB, the problem went away.
Apparently, d was reading socket.datastream from the server ok, but when the amount of data from the server exceeded 128MB, the server stopped sending data and D aborted with "Error: not enough data in stream." This confused me a bit and I thought that it was something on my side. (Perhaps we should change that error.) But, this only meant that no data at all and the server closed the socket connection. It didn't even send any http headers or anything. Weird. It just returned a null string.
Adapted from NG:digitalmars.D/18731
- It's generated by std.conv ( NG:digitalmars.D.learn/47).
An exception is being thrown from the destructor of the class.