Hello,
Please see:
http://bugs.freepascal.org/view.php?id=24746
Thank you!
Silvio Clécio
My public projects - github.com/silvioprog

Mailing lists / fpc-pascal / 2013-07
3 messages · 2 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
Please see:
http://bugs.freepascal.org/view.php?id=24746
Thank you!
silvioprog wroteHello, Please see: http://bugs.freepascal.org/view.php?id=24746
There are several things VERY wrong with your test program. First:
VFile.Read(VBuf, VBufLen); // reading only the first 1024 bytes ...
Overrides the VBUf address. It must be
VFile.Read(VBuf[0], VBufLen); // reading only the first 1024 bytes ...
Secondly,
VFile.Free; // free stream allowing to delete uploaded file, but, it causes
Frees the stream, but does not set the Stream property of TUploadedFile to nil.
When TUploadedFile is freed, it frees again the memory stream, causing an access violation.
I do not understand how your program could ever function.
I got access violations all over the place trying to run it.
Anyway, after fixing the 2 above issues it ran smootly.
Now, I suspect that the DeleteTempUploadedFiles does not work because Windows has the files locked when you attempt to delete them, so I changed TUploadedFile.DeleteTempUploadedFile
so it first frees the stream if there is one.
(cannot test that under Linux, where the demo runs fine)Michael.
2013/7/15 Michael Van Canneyt
Yes! :)
I'll test it and reply via mantis. Wait me please ...