Alright, i am reading into a QByteArray like this:
if(myArray.size() < size)
myArray.resize(size);
__memcpy_dgsint(dataArray.data(), start, size);
if(myArray.size() < size)
myArray.resize(size);
__memcpy_dgsint(dataArray.data(), start, size);
To copy to clipboard, switch view to plain text mode
then, some seconds after doing that, i access the read data:
char* r = myArray.data();
char* r = myArray.data();
To copy to clipboard, switch view to plain text mode
this works just fine most of the time ("start" is sanitized in the second sample).
Howver, i get crashes with a certain, very specific input file.
In such a case, the crash happens inside myArray.data(), inside internal QByteArray methods, inside a memcpy() function.
See the callstack here:
And the exception:
First-chance exception at 0x1026ed6a (msvcr90d.dll) in x.exe: 0xC0000005: Access violation reading location 0x00a99f00.
Unhandled exception at 0x1026ed6a (msvcr90d.dll) in x.exe: 0xC0000005: Access violation reading location 0x00a99f00.
The size-values we are talking about here arent huge - ~500 bytes maybe.
This seems all very wired to me. I collected some data and there are no extraordinary values involved when it crashes. Rather, the same call with the same size value succeeded several dozen times before, and then
QByteArray decides to wiredly call some realloc functon and crash.
any ideas why?
winxpsp3, vs2008 + Qt484
Bookmarks