ASSERT: "bitmap" in file image\qnativeimage.cpp, line 114

  • Hi all, I am facing to assertion failed issue in image\qnativeimage.cpp at line 114.

    I use open source QT version 4.7.1 and QTWinMigrate 2.8_1 in standalone MFC application where I can not modify code, so I use QMfcApp.pluginInstance to attach.
    I have looked into call stack and it seems like low memory issue, but I think it is not.

    Problem seems to be that QNativeImage is asked to allocate bitmap of size 32768 * 32768 which is probably too much (you can see it in fallowing call stack).
    Does anybody know how to avoid this issue? Or at least how can I workaround it?

    Follows my call stack:

    @QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x10b705a8) Line 2270 C++
    QtCored4.dll!qt_message(QtMsgType msgType=QtFatalMsg, const char * msg=0x672a6a80, char * ap=0x0027e764) Line 2328 + 0x12 bytes C++
    QtCored4.dll!qFatal(const char * msg=0x672a6a80, ...) Line 2511 + 0xf bytes C++
    QtCored4.dll!qt_assert(const char * assertion=0x11ff0314, const char * file=0x11ff02fc, int line=114) Line 2027 + 0x16 bytes C++
    QtGuid4.dll!QNativeImage::QNativeImage(int width=32767, int height=32767, QImage::Format format=Format_RGB32, bool isTextBuffer=false, QWidget * __formal=0x10bc0ce0) Line 114 + 0x1b bytes C++
    QtGuid4.dll!QRasterWindowSurface:repareBuffer(QImage::Format format=Format_RGB32, QWidget * widget=0x10bc0ce0) Line 378 + 0x34 bytes C++

    QtGuid4.dll!QRasterWindowSurface::setGeometry(cons t QRect & rect={...}) Line 325 C++
    QtGuid4.dll!QWidgetBackingStore::sync() Line 1183 C++
    QtGuid4.dll!QWidgetPrivate::syncBackingStore() Line 1819 C++
    QtGuid4.dll!QWidget::event(QEvent * event=0x10b1a720) Line 8494 C++
    QtGuid4.dll!QApplicationPrivate::notify_helper(QOb ject * receiver=0x10bc0ce0, QEvent * e=0x10b1a720) Line 4445 + 0x11 bytes C++
    QtGuid4.dll!QApplication::notify(QObject * receiver=0x10bc0ce0, QEvent * e=0x10b1a720) Line 4410 + 0x10 bytes C++
    QtCored4.dll!QCoreApplication::notifyInternal(QObj ect * receiver=0x10bc0ce0, QEvent * event=0x10b1a720) Line 732 + 0x15 bytes C++
    QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x10bc0ce0, QEvent * event=0x10b1a720) Line 215 + 0x39 bytes C++
    QtCored4.dll!QCoreApplicationPrivate::sendPostedEv ents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x0df77258) Line 1373 + 0xd bytes C++
    QtCored4.dll!QCoreApplication::sendPostedEvents(QO bject * receiver=0x00000000, int event_type=-1) Line 1266 + 0x11 bytes C++
    QtWinMigrate-2.8d.dll!QtFilterProc(int nCode=0, unsigned int wParam=1, long lParam=2618184) Line 105 + 0x10 bytes C++@

    Thanks in advance,

  • I have found a way to workaround it by filtering out Paint events when window is not visible. Problem is that I can not find a way how to repair this issue directly in QT. It is needed to use Win32 API for getting parent and to check if it is visible.

    There is probably something going wrong with double-buffering with widgets used in Win32 app. where QT is only attached as plugin.


  • Hi,
    I am also getting this issue when playing the youttube videos in my qt application using QWebView.

    Please let me know if you have found any solution/workaround for this issue.

    Thanks in advance.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.