Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1
-
None
-
Qt 5.5.1, Windows, MSVC 2013, QCoreApplication, CONFIG += console
Description
I have a server application (using QCoreApplication) which is trying to load some data into QPixmap using QPixmap::loadFromData(loadFromData(const QByteArray &buf, const char *format, Qt::ImageConversionFlags flags).
It crashes with the following stack trace (MSVC 2013);:
Qt5Guid.dll!QPlatformPixmap::create(int w=0, int h=0, QPlatformPixmap::PixelType type=PixmapType) Line 55 C++ Qt5Guid.dll!QPixmap::loadFromData(const unsigned char * buf=0x0344b068, unsigned int len=3584, const char * format=0x00000000, QFlags<enum Qt::ImageConversionFlag> flags={...}) Line 827 C++ Qt5Guid.dll!QPixmap::loadFromData(const QByteArray & buf={...}, const char * format=0x00000000, QFlags<enum Qt::ImageConversionFlag> flags={...}) Line 214 C++
It works fine if I use a QApplication instead of QCoreApplication.
This looks similar to QTBUG-17873 from Qt 4.x, but that fix doesn't seem to be in 5.5.1.
It doesn't seem to be documented anywhere that QPixmap requires a QApplication.
Attachments
Issue Links
- is duplicated by
-
QTBUG-64125 QPixmap will crash when create
- Closed
For Gerrit Dashboard: QTBUG-53572 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
209896,2 | QPixmap without QGuiApplication: do not crash, terminate gracefully | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |