如何将Open GL驱动程序中的分段错误追溯到我的源代码?

时间:2015-01-03 15:07:46

标签: c++ qt debugging opengl qml

seg错误总是出现在C:\ WINDOWS \ SYSTEM32 \ igdogl32.dll的函数OGLDRV!DrvValidateVersion()中。但是,在我的应用程序中引发错误的原因并不完全一致。有时它会在用户启动动态创建新QML Image元素时触发。有时在导航QML ListView时会触发故障。这导致我怀疑内存损坏或竞争条件,但我只是在猜测。我不会在自己的源代码中创建或管理任何线程,但Qt会自动为应用程序创建许多线程。

不幸的是,我没有足够的经验来调试GDB和QtCreator以收集有用的信息,这些信息可能会导致我自己的源代码的哪一部分导致此错误。因此,我的首要任务是获取有关我应该采取哪些步骤以便将此错误追溯到我自己的源代码的建议。从GDB回溯中我可以看到,当Segfault发生时,总有一个Thread来自QQuickPixmapReader ::在qquickpixmapcache.cpp中运行。这个函数反过来似乎调用QThread :: exec(),它返回一个非零返回码(表示错误)。但是,如何才能找出应用程序中导致这些函数失败的特定元素?是否可以从Open GL驱动程序或Qt函数中检索一些错误代码以了解更多信息?从回溯看起来它看起来像QEventLoop:exec()警告异常,但我怎么能找到更多关于这个异常的性质?

使用Qt 5.4.0(使用QtQuick 2.2)。在配备Windows 8.1,MinGW 32位的Dell Latitude 10平板电脑上开发和运行该应用程序。

这是我向StackOverflow发表的第一篇文章,请告诉我是否需要调整帖子或添加其他信息。我很乐意发布源代码,但我不确定我自己的代码的哪一部分是相关的,因为我在segfault之后的backtrace中找不到对我自己的源代码文件的任何引用。下面附有最有趣线程的完整GDB回溯。 Segfault发生在线程1,QQuickPixmapCache在线程16中可见。

<365thread apply all backtrace full
>&"thread apply all backtrace full\n"


>~"\nThread 16 (Thread 5500.0x111c):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x77384636 in ntdll!ZwWaitForMultipleObjects () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x74eed241 in WaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\KernelBase.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x751c91a2 in USER32!MsgWaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\user32.dll\n"
>~"No symbol table info available.\n"

>~"#4  0x6b97e71c in QEventDispatcherWin32::processEvents (this=0x2e5632c0, flags=...) at kernel\\qeventdispatcher_win.cpp:828\n"
>~"        nCount = 0"
>~"\n"
>~"        waitRet = 258"
>~"\n"
>~"        pHandles = {0x0 <repeats 63 times>}"
>~"\n"
>~"        processedTimers = {a = 256"
>~", s = 0"

>~", ptr = 0x2cf8e120, {array = (((omitted long array))),
>~", q_for_alignment_1 = 0"
>~", q_for_alignment_2 = 0"
>~"}"
>~"}"
>~"\n"
>~"        canWait = true"
>~"\n"
>~"        retVal = false"
>~"\n"
>~"        seenWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"        d = 0x2e62dea0\n"
>~"        needWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"

>~"#5  0x6b92c77c in QEventLoop::processEvents (this=0x2cf8fe98, flags=...) at kernel\\qeventloop.cpp:128\n"
>~"        d = 0x2e62ee88\n"
>~"#6  0x6b92ca0f in QEventLoop::exec (this=0x2cf8fe98, flags=...) at kernel\\qeventloop.cpp:204\n"
>~"        locker = {val = 778227848"
>~"}"
>~"\n"
>~"        __PRETTY_FUNCTION__ = \"int QEventLoop::exec(QEventLoop::ProcessEventsFlags)\""
>~"\n"
>~"        ref = {d = 0x2e62ee88, locker = @0x2cf8fe3c"
>~", exceptionCaught = true"
>~"}"
>~"\n"

>~"        app = 0x23fe30\n"
>~"        d = 0x2e62ee88\n"

>~"#7  0x6b7966c1 in QThread::exec (this=0x2e62d000) at thread\\qthread.cpp:503\n"
>~"        d = 0x2e62d048\n"
>~"        locker = {val = 778227848"
>~"}"
>~"\n"

>~"        eventLoop = {<QObject> = {_vptr.QObject = 0x6bbe4ee8 <vtable for QEventLoop+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb76f80 <qt_meta_stringdata_QObject>, data = 0x6bb77080 <qt_meta_data_QObject>, static_metacall = 0x6b95bac4 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}, d_ptr = {d = 0x2e62ee88}"

>~", static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bbc6280 <qt_meta_stringdata_Qt>, data = 0x6bbce400 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}, static staticMetaObject = {d = {superdata = 0x6bb76b0c <QObject::staticMetaObject>, stringdata = 0x6bbd9c80 <qt_meta_stringdata_QEventLoop>, data = 0x6bbd9d00 <qt_meta_data_QEventLoop>, static_metacall = 0x6b9b0884 <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}"
>~"\n"
>~"        returnCode = 778229032"
>~"\n"
>~"#8  0x63298832 in QQuickPixmapReader::run (this=0x2e62d000) at util\\qquickpixmapcache.cpp:712\n"
>~"No locals.\n"
>~"#9  0x6b799238 in QThreadPrivate::start(void*)@4 (arg=0x2e62d000) at thread\\qthread_win.cpp:344\n"
>~"        thr = 0x2e62d000\n"
>~"        data = 0x2e62d0d0\n"
>~"#10 0x77270bc4 in wtoi64 () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#11 0x77270cec in msvcrt!_beginthreadex () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#12 0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#13 0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#14 0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#15 0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 11 (Thread 5500.0x2a8):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x77384636 in ntdll!ZwWaitForMultipleObjects () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x74eed241 in WaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\KernelBase.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x76d114f6 in WaitForMultipleObjects () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x6b798e24 in qt_adopted_thread_watcher_function(void*)@4 () at thread\\qthread_win.cpp:213\n"
>~"        ret = 258"
>~"\n"
>~"        count = 3"
>~"\n"
>~"        loops = 1"
>~"\n"
>~"        handlesCopy = {d = 0x240fc900}"
>~"\n"
>~"        offset = 0"
>~"\n"
>~"        handleIndex = 0"
>~"\n"
>~"        __PRETTY_FUNCTION__ = \"DWORD qt_adopted_thread_watcher_function(LPVOID)\""
>~"\n"
>~"        threadData = 0x0\n"
>~"#5  0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#7  0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#8  0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 9 (Thread 5500.0xc94):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x7738460e in ntdll!ZwWaitForSingleObject () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x74ee11a3 in WaitForSingleObjectEx () from C:\\WINDOWS\\system32\\KernelBase.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x70f4bf6a in wlanapi!WFDOpenHandleInt () from C:\\WINDOWS\\SYSTEM32\\wlanapi.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#7  0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 8 (Thread 5500.0xe34):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x77384636 in ntdll!ZwWaitForMultipleObjects () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x74eed241 in WaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\KernelBase.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x751c91a2 in USER32!MsgWaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\user32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x6b97e71c in QEventDispatcherWin32::processEvents (this=0x24109d78, flags=...) at kernel\\qeventdispatcher_win.cpp:828\n"
>~"        nCount = 0"
>~"\n"
>~"        waitRet = 258"
>~"\n"
>~"        pHandles = {0x0 <repeats 63 times>}"
>~"\n"
>~"        processedTimers = {a = 256"
>~", s = 0"
>~", ptr = 0x26d0e150, {array = (((omitted long array)))
>~", q_for_alignment_1 = 1181116466064"
>~", q_for_alignment_2 = 5.8354906961964092e-312"
>~"}"
>~"}"
>~"\n"
>~"        canWait = true"
>~"\n"
>~"        retVal = false"
>~"\n"
>~"        seenWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"        d = 0x24109e48\n"
>~"        needWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"#5  0x6b92c77c in QEventLoop::processEvents (this=0x26d0fec8, flags=...) at kernel\\qeventloop.cpp:128\n"
>~"        d = 0x24109ee8\n"
>~"#6  0x6b92ca0f in QEventLoop::exec (this=0x26d0fec8, flags=...) at kernel\\qeventloop.cpp:204\n"
>~"        locker = {val = 605068544"
>~"}"
>~"\n"
>~"        __PRETTY_FUNCTION__ = \"int QEventLoop::exec(QEventLoop::ProcessEventsFlags)\""
>~"\n"
>~"        ref = {d = 0x24109ee8, locker = @0x26d0fe6c"
>~", exceptionCaught = true"
>~"}"
>~"\n"
>~"        app = 0x23fe30\n"
>~"        d = 0x24109ee8\n"
>~"#7  0x6b7966c1 in QThread::exec (this=0x24109b80) at thread\\qthread.cpp:503\n"
>~"        d = 0x24109cc0\n"
>~"        locker = {val = 605068544"
>~"}"
>~"\n"
>~"        eventLoop = {<QObject> = {_vptr.QObject = 0x6bbe4ee8 <vtable for QEventLoop+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb76f80 <qt_meta_stringdata_QObject>, data = 0x6bb77080 <qt_meta_data_QObject>, static_metacall = 0x6b95bac4 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}, d_ptr = {d = 0x24109ee8}"
>~", static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bbc6280 <qt_meta_stringdata_Qt>, data = 0x6bbce400 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}, static staticMetaObject = {d = {superdata = 0x6bb76b0c <QObject::staticMetaObject>, stringdata = 0x6bbd9c80 <qt_meta_stringdata_QEventLoop>, data = 0x6bbd9d00 <qt_meta_data_QEventLoop>, static_metacall = 0x6b9b0884 <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}"
>~"\n"
>~"        returnCode = 651230984"
>~"\n"
>~"#8  0x6b796821 in QThread::run (this=0x24109b80) at thread\\qthread.cpp:570\n"
>~"No locals.\n"
>~"#9  0x6b799238 in QThreadPrivate::start(void*)@4 (arg=0x24109b80) at thread\\qthread_win.cpp:344\n"
>~"        thr = 0x24109b80\n"
>~"        data = 0x24109ba0\n"
>~"#10 0x77270bc4 in wtoi64 () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#11 0x77270cec in msvcrt!_beginthreadex () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#12 0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#13 0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#14 0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#15 0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 6 (Thread 5500.0x148):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x773845fa in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x7734941b in ntdll!RtlReleaseSRWLockExclusive () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 5 (Thread 5500.0x6b4):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x773845fa in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x7734941b in ntdll!RtlReleaseSRWLockExclusive () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 4 (Thread 5500.0x420):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x77384ee6 in ntdll!ZwRemoveIoCompletion () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x7474a534 in Tcpip4_WSHGetWildcardSockaddr () from C:\\WINDOWS\\system32\\mswsock.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 3 (Thread 5500.0x1488):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x77384636 in ntdll!ZwWaitForMultipleObjects () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x74eed241 in WaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\KernelBase.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x751c91a2 in USER32!MsgWaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\user32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x6b97e71c in QEventDispatcherWin32::processEvents (this=0x16c665f0, flags=...) at kernel\\qeventdispatcher_win.cpp:828\n"
>~"        nCount = 0"
>~"\n"
>~"        waitRet = 258"
>~"\n"
>~"        pHandles = {0x0 <repeats 63 times>}"
>~"\n"
>~"        processedTimers = {a = 256"
>~", s = 0"

>~", ptr = 0x178de0e0, {array = (((omitted long array)))
>~", q_for_alignment_1 = 0"
>~", q_for_alignment_2 = 0"
>~"}"
>~"}"
>~"\n"
>~"        canWait = true"
>~"\n"
>~"        retVal = false"
>~"\n"
>~"        seenWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"        d = 0x16c64e78\n"
>~"        needWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"#5  0x6b92c77c in QEventLoop::processEvents (this=0x178dfe58, flags=...) at kernel\\qeventloop.cpp:128\n"
>~"        d = 0x16c6b010\n"
>~"#6  0x6b92ca0f in QEventLoop::exec (this=0x178dfe58, flags=...) at kernel\\qeventloop.cpp:204\n"
>~"        locker = {val = 382095272"
>~"}"
>~"\n"
>~"        __PRETTY_FUNCTION__ = \"int QEventLoop::exec(QEventLoop::ProcessEventsFlags)\""
>~"\n"
>~"        ref = {d = 0x16c6b010, locker = @0x178dfdfc"
>~", exceptionCaught = true"
>~"}"
>~"\n"
>~"        app = 0x23fe30\n"
>~"        d = 0x16c6b010\n"

>~"#7  0x6b7966c1 in QThread::exec (this=0x16c65b38) at thread\\qthread.cpp:503\n"
>~"        d = 0x16c64f68\n"
>~"        locker = {val = 382095272"
>~"}"
>~"\n"
>~"        eventLoop = {<QObject> = {_vptr.QObject = 0x6bbe4ee8 <vtable for QEventLoop+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb76f80 <qt_meta_stringdata_QObject>, data = 0x6bb77080 <qt_meta_data_QObject>, static_metacall = 0x6b95bac4 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}, d_ptr = {d = 0x16c6b010}"
>~", static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bbc6280 <qt_meta_stringdata_Qt>, data = 0x6bbce400 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}, static staticMetaObject = {d = {superdata = 0x6bb76b0c <QObject::staticMetaObject>, stringdata = 0x6bbd9c80 <qt_meta_stringdata_QEventLoop>, data = 0x6bbd9d00 <qt_meta_data_QEventLoop>, static_metacall = 0x6b9b0884 <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}"
>~"\n"
>~"        returnCode = 346064028"
>~"\n"
>~"#8  0x090a1512 in QQmlDebugServerThread::run (this=0x16c65b38) at debugger\\qqmldebugserver.cpp:306\n"
>~"        wrapper = 0x9434534 <(anonymous namespace)::Q_QGS_debugServerInstance::innerFunction()::holder>\n"
>~"        __PRETTY_FUNCTION__ = \"virtual void QQmlDebugServerThread::run()\""
>~"\n"
>~"        connection = 0x14a08168\n"
>~"        server = 0x9434534 <(anonymous namespace)::Q_QGS_debugServerInstance::innerFunction()::holder>\n"
>~"        eventLoop = {<QObject> = {_vptr.QObject = 0x16c64e78, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb76f80 <qt_meta_stringdata_QObject>, data = 0x6bb77080 <qt_meta_data_QObject>, static_metacall = 0x6b95bac4 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}, d_ptr = {d = 0x178dfec8}"
>~", static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bbc6280 <qt_meta_stringdata_Qt>, data = 0x6bbce400 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}, static staticMetaObject = {d = {superdata = 0x6bb76b0c <QObject::staticMetaObject>, stringdata = 0x6bbd9c80 <qt_meta_stringdata_QEventLoop>, data = 0x6bbd9d00 <qt_meta_data_QEventLoop>, static_metacall = 0x6b9b0884 <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}"
>~"\n"
>~"#9  0x6b799238 in QThreadPrivate::start(void*)@4 (arg=0x16c65b38) at thread\\qthread_win.cpp:344\n"
>~"        thr = 0x16c65b38\n"
>~"        data = 0x16c66000\n"
>~"#10 0x77270bc4 in wtoi64 () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#11 0x77270cec in msvcrt!_beginthreadex () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#12 0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#13 0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#14 0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#15 0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 2 (Thread 5500.0x1194):\n"
>~"#0  0x77386ce4 in ntdll!KiFastSystemCallRet () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x77384636 in ntdll!ZwWaitForMultipleObjects () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x74eed241 in WaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\KernelBase.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x751c91a2 in USER32!MsgWaitForMultipleObjectsEx () from C:\\WINDOWS\\system32\\user32.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x6b97e71c in QEventDispatcherWin32::processEvents (this=0x16bb17d8, flags=...) at kernel\\qeventdispatcher_win.cpp:828\n"
>~"        nCount = 0"
>~"\n"
>~"        waitRet = 258"
>~"\n"
>~"        pHandles = {0x0 <repeats 63 times>}"
>~"\n"
>~"        processedTimers = {a = 256"
>~", s = 0"
>~", ptr = 0x16eae150, {array = (((omitted long array)))
>~", q_for_alignment_1 = 0"
>~", q_for_alignment_2 = 0"
>~"}"
>~"}"
>~"\n"
>~"        canWait = true"
>~"\n"
>~"        retVal = false"
>~"\n"
>~"        seenWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"        d = 0x16bb17f8\n"
>~"        needWM_QT_SENDPOSTEDEVENTS = false"
>~"\n"
>~"#5  0x6b92c77c in QEventLoop::processEvents (this=0x16eafec8, flags=...) at kernel\\qeventloop.cpp:128\n"
>~"        d = 0x16bb1898\n"
>~"#6  0x6b92ca0f in QEventLoop::exec (this=0x16eafec8, flags=...) at kernel\\qeventloop.cpp:204\n"
>~"        locker = {val = 381359752"
>~"}"
>~"\n"
>~"        __PRETTY_FUNCTION__ = \"int QEventLoop::exec(QEventLoop::ProcessEventsFlags)\""
>~"\n"
>~"        ref = {d = 0x16bb1898, locker = @0x16eafe6c"
>~", exceptionCaught = true"
>~"}"
>~"\n"
>~"        app = 0x23fe30\n"
>~"        d = 0x16bb1898\n"

>~"#7  0x6b7966c1 in QThread::exec (this=0x16bb15f0) at thread\\qthread.cpp:503\n"
>~"        d = 0x16bb1648\n"
>~"        locker = {val = 381359752"
>~"}"
>~"\n"
>~"        eventLoop = {<QObject> = {_vptr.QObject = 0x6bbe4ee8 <vtable for QEventLoop+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb76f80 <qt_meta_stringdata_QObject>, data = 0x6bb77080 <qt_meta_data_QObject>, static_metacall = 0x6b95bac4 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}, d_ptr = {d = 0x16bb1898}"
>~", static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bbc6280 <qt_meta_stringdata_Qt>, data = 0x6bbce400 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}, static staticMetaObject = {d = {superdata = 0x6bb76b0c <QObject::staticMetaObject>, stringdata = 0x6bbd9c80 <qt_meta_stringdata_QEventLoop>, data = 0x6bbd9d00 <qt_meta_data_QEventLoop>, static_metacall = 0x6b9b0884 <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}"
>~"}}"
>~"\n"
>~"        returnCode = 384499464"
>~"\n"
>~"#8  0x0908d812 in QQmlThreadPrivate::run (this=0x16bb15f0) at qml\\ftw\\qqmlthread.cpp:141\n"
>~"No locals.\n"
>~"#9  0x6b799238 in QThreadPrivate::start(void*)@4 (arg=0x16bb15f0) at thread\\qthread_win.cpp:344\n"
>~"        thr = 0x16bb15f0\n"
>~"        data = 0x16bb16d0\n"
>~"#10 0x77270bc4 in wtoi64 () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#11 0x77270cec in msvcrt!_beginthreadex () from C:\\WINDOWS\\system32\\msvcrt.dll\n"
>~"No symbol table info available.\n"
>~"#12 0x76d117ad in KERNEL32!BaseThreadInitThunk () from C:\\WINDOWS\\system32\\kernel32.dll\n"
>~"No symbol table info available.\n"
>~"#13 0x7737226c in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#14 0x77372245 in ntdll!RtlTryAcquireSRWLockShared () from C:\\WINDOWS\\SYSTEM32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#15 0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"


>~"\nThread 1 (Thread 5500.0x9c4):\n"
>~"#0  0x59f754c0 in OGLDRV!DrvValidateVersion () from C:\\WINDOWS\\SYSTEM32\\igdogl32.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x0023cec4 in ?? ()\n"
>~"No symbol table info available.\n"
>~"#2  0x59f6e8c5 in OGLDRV!DrvValidateVersion () from C:\\WINDOWS\\SYSTEM32\\igdogl32.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x299b8d08 in ?? ()\n"
>~"No symbol table info available.\n"
>~"#4  0x59f8abc0 in OGLDRV!DrvValidateVersion () from C:\\WINDOWS\\SYSTEM32\\igdogl32.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x299b8d08 in ?? ()\n"
>~"No symbol table info available.\n"
>~"#6  0x59f8b1e1 in OGLDRV!DrvValidateVersion () from C:\\WINDOWS\\SYSTEM32\\igdogl32.dll\n"
>~"No symbol table info available.\n"
>~"#7  0x299b8d08 in ?? ()\n"
>~"No symbol table info available.\n"
>~"#8  0x59f8be5a in OGLDRV!DrvValidateVersion () from C:\\WINDOWS\\SYSTEM32\\igdogl32.dll\n"
>~"No symbol table info available.\n"
>~"#9  0x00000de1 in ?? ()\n"
>~"No symbol table info available.\n"
>~"#10 0x00000000 in ?? ()\n"
>~"No symbol table info available.\n"
>365^done

1 个答案:

答案 0 :(得分:0)

我继续对这个问题进行研究,因为我没有回答我的问题。我意识到缺乏答案可能是因为我的问题是以冗长而含糊的方式提出的。我没有设法找到分段错误的原因。但是,我想分享一些关于调试Qt和Open GL的一些知识。也许对于像我这样的其他Open GL新秀来说,这可能会有所帮助。

经过几天的挣扎,我仍然无法从QtCreator调试器(GDB)获得有用的错误消息。我开始寻找替代品,结果证明gDEBugger非常有用。以下是我一步一步做的事情:

<强> 1。部署我的应用程序

为了能够使用外部调试器进行调试,我必须在我的机器上完全部署我的应用程序(Windows 8.1 32位)。之前我从来没有这样做,因为我只通过QtCreator直接运行和调试我的应用程序。在我的情况下,部署过程非常简单,但我会解释它:我使用了随Windows Qt安装二进制文件一起提供的工具windeployqt.exe。位于我机器上的QTDIR / min gw491_32 / bin。首先,我构建我的应用程序(调试版本)和QtCreator。在此之后,我运行以下控制台命令“windeployqt.exe path-to-application-binary”。它要求将Qt bin文件夹添加到机器的PATH环境变量中。要包含外部QML文件,请参阅windeployqt的文档。

<强> 2。下载并安装gDEBugger

第3。开始调试

现在你可以启动gDEbugger了。创建一个新项目并选择应用程序二进制文件。 gDEBugger文档很容易理解,我推荐它。在同一个目录中,应该在部署期间添加所有DLL和其他文件。要提供最有用的信息,您应该构建并部署应用程序的调试版本。为所有错误添加断点并按下运行(F5)。这让我找到了几个OpenGL错误,希望我能够设法理解如何摆脱错误。还要暂停调试并查看内存中加载的纹理和缓冲区。我发现了一个未知的纹理可能是我的问题的原因。祝你好运调试!