Error Messages /
Runtime Errors
Access Violation
See also NG:D/26297.
Format String Mismatch with Arguments for printf
Problem code, from ( NG:D/26447):
|
Change
|
|
See also HowTo/printf, FaqRoadmap#ErrorMessages, NG:D/26472.
Uninitialized Object
Problem code:
|
Change
|
|
See also NG:D/26317.
Error: Array Bounds Error
Problem code:
|
If it's compiled in release (dmd arrays.d -release), it the error is expressed as "Error: Access Violation".
Add this line
|
|
|
Error: not enough data in stream
- It's generated by std.stream ( NG:digitalmars.D/18709).
Case Study
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
Error: conversion
- It's generated by std.conv ( NG:digitalmars.D.learn/47).
An exception was thrown while finalizing an instance of class
An exception is being thrown from the destructor of the class.