C
Keiner eine Idee?
Ich habe mal weiter geforscht, in der qiodevice.cpp bleibt er hängen.
qint64 QIODevice::read(char *data, qint64 maxSize)
{
Q_D(QIODevice);
#if defined QIODEVICE_DEBUG
printf("%p QIODevice::read(%p, %d), d->pos = %d, d->buffer.size() = %d\n",
this, data, int(maxSize), int(d->pos), int(d->buffer.size()));
#endif
// Short circuit for getChar()
if (maxSize == 1) {
int chint;
while ((chint = d->buffer.getChar()) != -1) {
++(*d->pPos);
char c = char(uchar(chint));
if (c == '\r' && (d->openMode & Text))
continue;
*data = c;
#if defined QIODEVICE_DEBUG
printf("%p \tread 0x%hhx (%c) returning 1 (shortcut)\n", this,
int(c), isprint(c) ? c : '?');
#endif
if (d->buffer.isEmpty())
readData(data, 0);
return qint64(1);
}
}
CHECK_MAXLEN(read, qint64(-1));
qint64 readSoFar = 0;
bool moreToRead = true;
do {
// Try reading from the buffer.
int lastReadChunkSize = d->buffer.read(data, maxSize);
if (lastReadChunkSize > 0) {
*d->pPos += lastReadChunkSize;
readSoFar += lastReadChunkSize;
// fast exit when satisfied by buffer
if (lastReadChunkSize == maxSize && !(d->openMode & Text)) {
if (d->buffer.isEmpty()) {
d->buffer.clear(); // Absturz
readData(data, 0);
}
return readSoFar;
}
In der Variable buff steht folgendes "0x00495620" "HXE"
class QIODevicePrivateLinearBuffer
{
public:
QIODevicePrivateLinearBuffer(int) : len(0), first(0), buf(0), capacity(0) {
}
~QIODevicePrivateLinearBuffer() {
delete [] buf;
}
void clear() {
len = 0;
delete [] buf; // <- Hier
buf = 0;
first = buf;
capacity = 0;
}