SFML community forums

Help => Network => Topic started by: The_Xlebushek on September 26, 2020, 11:10:12 am

Title: ftp.download crash
Post by: The_Xlebushek on September 26, 2020, 11:10:12 am
Tied using this one (ftp.download( "test.txt", "", Ftp::Ascii); ), but my app crashes with windows sending data error. Other functions work properly: I connected to server, changed directory, it even shows me a directory list, and there is a test.txt in it. MinGW isn't showing any errors and compiles the app as always. Changing transfer mode didn't help.

This surprisingly does nothing. The same error.
Ftp::Response x = ftp.download("test.txt", "");
cout << "FTP Download: " << x.getStatus() << " : " << x.getMessage() << "\n";

Using windows 10 and MinGW. Compiling with this:
g++ main.cpp -o main.exe -ID:\\SFML-2.5.1\\include -LD:\\SFML-2.5.1\\lib -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network
Title: Re: ftp.download crash
Post by: eXpl0it3r on September 26, 2020, 07:03:16 pm
sfml-system needs to be linked after the sfml-network library.
What software is running on the server you connect to?
What's the call stack when it crashes (use a debugger to find out)?
Does it also fail if you download it as binary instead of ASCII?
Title: Re: ftp.download crash
Post by: The_Xlebushek on September 26, 2020, 07:56:38 pm
That's the call stack

placing sfml-system after the sfml-network didn't help
using binary didn't help either
Title: Re: ftp.download crash
Post by: The_Xlebushek on September 26, 2020, 08:49:09 pm
Oh, I fixed that. Just installed older version of MinGW

LoL