Qt4.7.4+VS2008写的程序,长时间运行不稳定发生Crash附带错误信息求指点!

YouNeverCanTell 2015-04-03 11:34:10
如题,使用了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 时发生访问冲突
...全文
366 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
YouNeverCanTell 2015-04-10
  • 打赏
  • 举报
回复
原因找到了,原来是使用了Windows的API创建线程的关系,改回使用QThread就好了。
YouNeverCanTell 2015-04-03
  • 打赏
  • 举报
回复
第二次: MyApp.exe!QWidgetBackingStore::resetWidget(QWidget * widget=0x02091fac) 行246 + 0x1e 字节 C++ MyApp.exe!QWidgetBackingStore::~QWidgetBackingStore() 行881 C++ MyApp.exe!QWidgetBackingStore::`scalar deleting destructor'() + 0xf 字节 C++ MyApp.exe!QWidgetBackingStoreTracker::destroy() 行210 + 0x1e 字节 C++ MyApp.exe!QWidgetPrivate::deleteExtra() 行1797 C++ MyApp.exe!QWidgetPrivate::~QWidgetPrivate() 行344 C++ MyApp.exe!QWidgetPrivate::`scalar deleting destructor'() + 0xf 字节 C++ MyApp.exe!QScopedPointerDeleter<QObjectData>::cleanup(QObjectData * pointer=0x008380d0) 行62 + 0x20 字节 C++ MyApp.exe!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::~QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >() 行100 + 0x9 字节 C++ MyApp.exe!QObject::~QObject() 行964 + 0x12 字节 C++ MyApp.exe!QWidget::~QWidget() 行1671 + 0x24 字节 C++ MyApp.exe!QWidget::`scalar deleting destructor'() + 0xf 字节 C++ MyApp.exe!qt_tablet_cleanup() 行232 + 0x24 字节 C++ MyApp.exe!qt_call_post_routines() 行255 + 0xa 字节 C++ MyApp.exe!QApplication::~QApplication() 行1104 C++ MyApp.exe!_CallSettingFrame(unsigned long funclet=2750584, unsigned long pRN=259, unsigned long dwInCode=4072306611) 行73 Asm MyApp.exe!__FrameUnwindToState(EHRegistrationNode * pRN=0x0029f878, void * pDC=0x0029c660, const _s_FuncInfo * pFuncInfo=0x02135900, int targetState=-1) 行1151 C++ MyApp.exe!__InternalCxxFrameHandler(EHExceptionRecord * pExcept=0x0029c5c0, EHRegistrationNode * pRN=0x0029f878, _CONTEXT * pContext=0x0029c66c, void * pDC=0x0029c660, const _s_FuncInfo * pFuncInfo=0x02135900, int CatchDepth=0, EHRegistrationNode * pMarkerRN=0x00000000, unsigned char recursive=0) 行479 + 0x13 字节 C++ MyApp.exe!__CxxFrameHandler3(EHExceptionRecord * pExcept=0x0029c5c0, EHRegistrationNode * pRN=0x0029f878, void * pContext=0x772d9012, void * pDC=0x0029c5c0) 行365 + 0x1f 字节 C++ MyApp.exe!_FindNextChangeNotification@4() + 0x261d9d 字节 C++ MyApp.exe!_FindNextChangeNotification@4() + 0x261d9d 字节 C++ 0028a000() MyApp.exe!CreateMiniDump(_EXCEPTION_POINTERS * pep=0x0029c974, char * strFileName=0x01f25754) 行66 C++ MyApp.exe!MyUnhandledExceptionFilter(_EXCEPTION_POINTERS * pExceptionInfo=0x76782ce4) 行5 + 0xe 字节 C++ kernel32.dll!76782c2a() [下面的框架可能不正确和/或缺失,没有为 kernel32.dll 加载符号] MyApp.exe!QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState=2739968) 行456 + 0xf 字节 C++ 00170000() MyApp.exe!_free_base(void * pBlock=0x05e6ff20) 行109 + 0x12 字节 C 00000001() MyApp.exe!_free_base(void * pBlock=0x01384113) 行109 + 0x12 字节 C 0029cfe4() MyApp.exe!_free_base(void * pBlock=0x01b03e66) 行109 + 0x12 字节 C 0029d0f8() MyApp.exe!_unlock(int locknum=4) 行376 C MyApp.exe!operator delete(void * pUserData=0x05d11b18) 行57 + 0x7 字节 C++ MyApp.exe!operator delete(void * pUserData=0x05d11b18) 行56 + 0xc 字节 C++ MyApp.exe!QPropertyAnimation::`scalar deleting destructor'() + 0x20 字节 C++ f2ba62d3() MyApp.exe!QThreadData::current() 行102 + 0xc 字节 C++ 008fc084() MyApp.exe!QApplicationPrivate::notify_helper(QObject * receiver=0x008fc080, QEvent * e=0x05d120c8) 行4481 + 0x11 字节 C++ MyApp.exe!QApplication::notify(QObject * receiver=0x008fc080, QEvent * e=0x05d120c8) 行4446 + 0x10 字节 C++ MyApp.exe!QCoreApplication::notifyInternal(QObject * receiver=0x008fc080, QEvent * event=0x05d120c8) 行787 + 0x15 字节 C++ MyApp.exe!QCoreApplication::sendEvent(QObject * receiver=0x008fc080, QEvent * event=0x05d120c8) 行215 + 0x39 字节 C++ MyApp.exe!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x00172db0) 行1428 + 0xd 字节 C++ MyApp.exe!qt_internal_proc(HWND__ * hwnd=0x000a06e2, 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=0x00831ed8) 行24 + 0x5 字节 C++ > MyApp.exe!WinMain(HINSTANCE__ * instance=0x01070000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00361d06, int cmdShow=1) 行131 + 0x12 字节 C++ MyApp.exe!__tmainCRTStartup() 行263 + 0x2c 字节 C MyApp.exe!WinMainCRTStartup() 行182 C kernel32.dll!76771174() 输出: core.dmp 中的 0x01518010 (MyApp.exe) 处未处理的异常: 0xC0000005: 写入位置 0x02120400 时发生访问冲突 ———————— 我发现第一次出错有MyApp.exe!QVector<QList<bool (__cdecl*)(void * *)> >::realloc(int asize=1, int aalloc=0) 行446 + 0x1c 字节 C++,realloc失败现象,不知道跟这个有没有关系?

16,819

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧