Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: ftp.download crash  (Read 7623 times)

0 Members and 1 Guest are viewing this topic.

The_Xlebushek

  • Newbie
  • *
  • Posts: 4
    • View Profile
ftp.download crash
« 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
« Last Edit: September 26, 2020, 02:43:35 pm by The_Xlebushek »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: ftp.download crash
« Reply #1 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?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The_Xlebushek

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ftp.download crash
« Reply #2 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

The_Xlebushek

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ftp.download crash
« Reply #3 on: September 26, 2020, 08:49:09 pm »
Oh, I fixed that. Just installed older version of MinGW

LoL