EnyoYoen / Fast-Discord

A new Discord client made in C++ and Qt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord custom profile picture cant be loaded

opened this issue · comments

libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 537, resource id: 21098687, major code: 40 (TranslateCoords), minor code: 0
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap
libpng error: Read Error
QPixmap::scaled: Pixmap is a null pixmap

commented

There are two problems:
1 - When someone has a custom profile picture, we try to request it and apply it right after, but the image is, most of the time, not fully downloaded
2 - Some images are empty, or partially downloaded, I don't know what it's due to, maybe a rate limit

commented

After a long research, I understood that the problem came from Qt.. I tried to make image requests in the main function in the 'main.cpp' file, I got partial / empty images when I include but everything is fine when I only include <curl/curl.h>
I will try to replace libcurl with QNetworkAccessManager

commented

Finally fixed in15bbcdaddaa234a1ba76f4de0b551cb72cfe9ae1