Qt4.7.4+VS2008写的程序,长时间运行不稳定发生Crash附带错误信息求指点!
如题,使用了eventFilter,重写了paintEvent,程序长时间放着不动不做任何操作就会发生Crash现象。
生成coredump查看callstack信息如下:
第一次:
MyApp.exe!QWidget::mapToParent(const QPoint & pos={...}) 行4254 + 0x7 字节 C++
MyApp.exe!QWidget::mapTo(QWidget * parent=0x007c7a60, const QPoint & pos={...}) 行4210 + 0x10 字节 C++
MyApp.exe!QWidgetBackingStore::dirtyRegion(QWidget * widget=0x007c7a60) 行421 + 0x24 字节 C++
MyApp.exe!qt_dirtyRegion(QWidget * widget=0x007c7a60) 行1081 + 0x10 字节 C++
MyApp.exe!QETWidget::translatePaintEvent(const tagMSG & msg={...}) 行3715 + 0x10 字节 C++
MyApp.exe!QtWndProc(HWND__ * hwnd=0x00b215de, unsigned int message=15, unsigned int wParam=0, long lParam=0) 行1977 + 0xc 字节 C++
user32.dll!765b86ef()
[下面的框架可能不正确和/或缺失,没有为 user32.dll 加载符号]
MyApp.exe!__crtMessageWindowA(int nRptType=1, const char * szFile=0x01c3b0d8, const char * szLine=0x00241414, const char * szModule=0x01c3b0d0, const char * szUserMessage=0x00240414) 行363 + 0x16 字节 C
MyApp.exe!_VCrtDbgReportA(int nRptType=1, const char * szFile=0x01c3b0d8, int nLine=2271, const char * szModule=0x01c3b0d0, const char * szFormat=0x06043478, char * arglist=0x002454a8) 行420 + 0x28 字节 C
MyApp.exe!_CrtDbgReportV(int nRptType=1, const char * szFile=0x01c3b0d8, int nLine=2271, const char * szModule=0x01c3b0d0, const char * szFormat=0x06043478, char * arglist=0x002454a8) 行241 + 0x1d 字节 C
MyApp.exe!_CrtDbgReport(int nRptType=1, const char * szFile=0x01c3b0d8, int nLine=2271, const char * szModule=0x01c3b0d0, const char * szFormat=0x06043478, ...) 行258 + 0x1d 字节 C
MyApp.exe!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x06043478) 行2271 + 0x1a 字节 C++
MyApp.exe!qt_message(QtMsgType msgType=QtFatalMsg, const char * msg=0x01c3afdc, char * ap=0x0024554c) 行2337 + 0x12 字节 C++
MyApp.exe!qFatal(const char * msg=0x01c3afdc, ...) 行2520 + 0xf 字节 C++
MyApp.exe!qt_assert(const char * assertion=0x01c3b2ac, const char * file=0x01c3b26c, int line=446) 行2036 + 0x16 字节 C++
MyApp.exe!QVector<QList<bool (__cdecl*)(void * *)> >::realloc(int asize=1, int aalloc=0) 行446 + 0x1c 字节 C++
MyApp.exe!QVector<QList<bool (__cdecl*)(void * *)> >::detach_helper() 行325 + 0x21 字节 C++
MyApp.exe!QVector<QList<bool (__cdecl*)(void * *)> >::detach() 行134 + 0x22 字节 C++
MyApp.exe!QVector<QList<bool (__cdecl*)(void * *)> >::data() 行139 + 0xf 字节 C++
MyApp.exe!QVector<QList<bool (__cdecl*)(void * *)> >::operator[](int i=0) 行348 + 0x8 字节 C++
MyApp.exe!QInternal::activateCallbacks(QInternal::Callback cb=ConnectCallback, void * * parameters=0x002456dc) 行3066 + 0xc 字节 C++
MyApp.exe!QObject::connect(const QObject * sender=0x05c01fa0, const char * signal=0x01d253f8, const QObject * receiver=0x00762e20, const char * method=0x01d253c4, Qt::ConnectionType type=UniqueConnection) 行2463 + 0xb 字节 C++
MyApp.exe!QToolBarLayout::setUsePopupMenu(bool set=false) 行134 + 0x31 字节 C++
MyApp.exe!QToolBarLayout::checkUsePopupMenu() 行156 C++
MyApp.exe!QToolBarAreaLayoutLine::fitLayout() 行165 C++
MyApp.exe!QToolBarAreaLayoutInfo::fitLayout() 行295 C++
MyApp.exe!QToolBarAreaLayout::fitLayout() 行658 C++
MyApp.exe!QMainWindowLayoutState::fitLayout() 行252 + 0xf 字节 C++
MyApp.exe!QMainWindowLayout::setGeometry(const QRect & _r={...}) 行1473 C++
MyApp.exe!QLayoutPrivate::doResize(const QSize & r={...}) 行683 C++
MyApp.exe!QLayout::activate() 行1261 C++
MyApp.exe!QLayout::widgetEvent(QEvent * e=0x05dd2fd0) 行757 C++
MyApp.exe!QApplicationPrivate::notify_helper(QObject * receiver=0x007c7a60, QEvent * e=0x05dd2fd0) 行4477 C++
MyApp.exe!QApplication::notify(QObject * receiver=0x007c7a60, QEvent * e=0x05dd2fd0) 行4446 + 0x10 字节 C++
MyApp.exe!QCoreApplication::notifyInternal(QObject * receiver=0x007c7a60, QEvent * event=0x05dd2fd0) 行787 + 0x15 字节 C++
MyApp.exe!QCoreApplication::sendEvent(QObject * receiver=0x007c7a60, QEvent * event=0x05dd2fd0) 行215 + 0x39 字节 C++
MyApp.exe!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x009b2db0) 行1428 + 0xd 字节 C++
MyApp.exe!qt_internal_proc(HWND__ * hwnd=0x0f2215a0, unsigned int message=1025, unsigned int wp=0, long lp=0) 行497 + 0x10 字节 C++
user32.dll!765b86ef()
MyApp.exe!__crtMessageWindowA(int nRptType=1, const char * szFile=0x01c3b0d8, const char * szLine=0x002486dc, const char * szModule=0x01c3b0d0, const char * szUserMessage=0x002476dc) 行363 + 0x16 字节 C
MyApp.exe!_VCrtDbgReportA(int nRptType=1, const char * szFile=0x01c3b0d8, int nLine=2271, const char * szModule=0x01c3b0d0, const char * szFormat=0x060433c8, char * arglist=0x0024c770) 行420 + 0x28 字节 C
MyApp.exe!_CrtDbgReportV(int nRptType=1, const char * szFile=0x01c3b0d8, int nLine=2271, const char * szModule=0x01c3b0d0, const char * szFormat=0x060433c8, char * arglist=0x0024c770) 行241 + 0x1d 字节 C
MyApp.exe!_CrtDbgReport(int nRptType=1, const char * szFile=0x01c3b0d8, int nLine=2271, const char * szModule=0x01c3b0d0, const char * szFormat=0x060433c8, ...) 行258 + 0x1d 字节 C
MyApp.exe!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x060433c8) 行2271 + 0x1a 字节 C++
MyApp.exe!qt_message(QtMsgType msgType=QtFatalMsg, const char * msg=0x01c3afdc, char * ap=0x0024c814) 行2337 + 0x12 字节 C++
MyApp.exe!qFatal(const char * msg=0x01c3afdc, ...) 行2520 + 0xf 字节 C++
MyApp.exe!qt_assert(const char * assertion=0x01c8c6a0, const char * file=0x01c8c660, int line=446) 行2036 + 0x16 字节 C++
> MyApp.exe!QVector<QRect>::realloc(int asize=1, int aalloc=0) 行446 + 0x1c 字节 C++
MyApp.exe!QVector<QRect>::detach_helper() 行325 + 0x21 字节 C++
MyApp.exe!QVector<QRect>::detach() 行134 + 0x22 字节 C++
MyApp.exe!QVector<QRect>::data() 行139 + 0xf 字节 C++
MyApp.exe!OffsetRegion(QRegionPrivate & region={...}, int x=-2, int y=-3) 行1917 + 0xb 字节 C++
MyApp.exe!QRegion::translate(int dx=-2, int dy=-3) 行3982 + 0x16 字节 C++
MyApp.exe!QRegion::translate(const QPoint & p={...}) 行94 + 0x21 字节 C++
MyApp.exe!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x007a67b8, const QList<QObject *> & siblings=[...](...,..., ...), int index=0, const QRegion & rgn={...}, const QPoint & offset={...}, int flags=4, QPainter * sharedPainter=0x00000000, QWidgetBackingStore * backingStore=0x00793508) 行5733 C++
MyApp.exe!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x007a67b8, const QRegion & rgn={...}, const QPoint & offset={...}, int flags=4, QPainter * sharedPainter=0x00000000, QWidgetBackingStore * backingStore=0x00793508) 行5583 C++
MyApp.exe!QWidgetPrivate::paintSiblingsRecursive(QPaintDevice * pdev=0x007a67b8, const QList<QObject *> & siblings=[...](...,..., ...), int index=9, const QRegion & rgn={...}, const QPoint & offset={...}, int flags=4, QPainter * sharedPainter=0x00000000, QWidgetBackingStore * backingStore=0x00793508) 行5736 C++
MyApp.exe!QWidgetPrivate::drawWidget(QPaintDevice * pdev=0x007a67b8, const QRegion & rgn={...}, const QPoint & offset={...}, int flags=5, QPainter * sharedPainter=0x00000000, QWidgetBackingStore * backingStore=0x00793508) 行5583 C++
MyApp.exe!QWidgetBackingStore::sync() 行1341 C++
MyApp.exe!QWidgetPrivate::syncBackingStore() 行1865 C++
MyApp.exe!QWidget::event(QEvent * event=0x05dd3e40) 行8589 C++
MyApp.exe!QMainWindow::event(QEvent * event=0x05dd3e40) 行1479 C++
MyApp.exe!QApplicationPrivate::notify_helper(QObject * receiver=0x007c7a60, QEvent * e=0x05dd3e40) 行4481 + 0x11 字节 C++
MyApp.exe!QApplication::notify(QObject * receiver=0x007c7a60, QEvent * e=0x05dd3e40) 行4446 + 0x10 字节 C++
MyApp.exe!QCoreApplication::notifyInternal(QObject * receiver=0x007c7a60, QEvent * event=0x05dd3e40) 行787 + 0x15 字节 C++
MyApp.exe!QCoreApplication::sendEvent(QObject * receiver=0x007c7a60, QEvent * event=0x05dd3e40) 行215 + 0x39 字节 C++
MyApp.exe!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x009b2db0) 行1428 + 0xd 字节 C++
MyApp.exe!qt_internal_proc(HWND__ * hwnd=0x0f2215a0, unsigned int message=1025, unsigned int wp=0, long lp=0) 行497 + 0x10 字节 C++
user32.dll!765b86ef()
MyApp.exe!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) 行810 C++
MyApp.exe!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) 行1170 + 0x14 字节 C++
MyApp.exe!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) 行150 C++
MyApp.exe!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) 行201 + 0x2d 字节 C++
MyApp.exe!QCoreApplication::exec() 行1064 + 0x15 字节 C++
MyApp.exe!QApplication::exec() 行3756 C++
MyApp.exe!main(int argc=1, char * * argv=0x00701ed8) 行24 + 0x5 字节 C++
MyApp.exe!WinMain(HINSTANCE__ * instance=0x00d60000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00381d06, int cmdShow=1) 行131 + 0x12 字节 C++
MyApp.exe!__tmainCRTStartup() 行263 + 0x2c 字节 C
MyApp.exe!WinMainCRTStartup() 行182 C
kernel32.dll!76771174()
输出:
core.dmp 中的 0x01063f70 (MyApp.exe) 处未处理的异常: 0xC0000005: 读取位置 0xcdcdcddd 时发生访问冲突