Forum > Networking and Web Programming
Lnet FTP problem with large files in Win64
cybersmyth:
Error exemption class 'External: SIGSEGV'
Running -gl just goes to the line where the FFile.Write(Buf, i); (line 348) Without the -gl I get some assembler data.
I did try a couple of FTP servers and lots of different files. It seems like anything bigger than a few K is trouble. While I was testing, I got this weird thing (screenshot attached). Hope that's helpful.
I will try to compile this at work today too and see if it's just something on this PC. All of my office PCs are 64bit Win7 too. So right now I have no way to test Win32 code.
I did try i := FTP.GetData(Buf, SizeOf(Buf)); and it does the same thing.
fabienwang:
hummm i have a SIGSEGV with visual example project FTP (provided with lnet)
Lazarus 0.9.31 r29829 FPC 2.4.3 i386-win32-win32/win64
latest lnet 0.6.6
It also stops on line FFile.Write(Buf, i); with -gl option
Almindor:
Thanks for testing.
Sigsegv happens on memory access out of bounds situations, so it might be something with our buffer then o.O.
One thing comes to mind, try changing FFile.Write(buf..) to FFile.Write(buf[0],...) and try again please. You can also do the same with GetData(buf, ..) change to GetData(buf[0]...).
I'll try this at home on win32 and Linux64 (I don't have win64, but perhaps I could get it running in virtualbox).
The only way to get even better backtrace would be for you to recompile FPC from source with -gl so we see exactly where it crashes inside that code. But that's a bit too much to ask at this point.
I'll try things tonight and will report here. You can create a bugreport for this so it doesn't fade away.
Thanks
fabienwang:
Same here =(
cybersmyth:
More weirdnesses... I am really getting the impression that it is something wrong with TFIleStream.Write. I am now working at a totally different PC at work, still running Win 7 64bit.
I have tested both binary and text files for download, in both cases larger files cause the error. Small image files download just find and have no errors. Small text files do the same. So this leads me to believe the problem is with all files and not just with binary transfer or anything like that.
There is something particularly odd happening with text files that I think might shed some light on what is happening. I tried to download a really large text file and all of the sudden, just before the crash, the text in the file started filling in the FTP remote file list box! But then the error that gets spit back is "Invalid date format" with a "do you wish to continue" message. I click yes and it then gives me the 'External: SIGSEGV' error. As binary files, it just goes straight to the 'External: SIGSEGV' error. This is making me thing maybe TFIleStream.Write is overwriting the memory instead of going to the hard drive maybe? Something like that.
Another interesting thing, the text files don't always terminate at the same place. I've tried several times on the same file and it always ends at a different spot.
Navigation
[0] Message Index
[#] Next page
[*] Previous page