Black rectangle instead QQuickWidget (specific usecase). OpenGL problems - opengl

we use QT version 5.6
We have c++ application on Qt Widgets. In some plugin (created with Q_PLUGIN_METADATA and Q_INTERFACES) of this application we use QML:
in some Widget we create QQuickWidget
QQuickWidget* quickWidget = new QQuickWidget(this);
make some operations with context
QQmlContext* ctxt = quickWidget->rootContext();
and set source
quickWidget->setSource(QUrl(QStringLiteral("qrc:/Resources/WebResources/main.qml")));
Sometimes we have problems with this widget displaying - black rectangle appears.
We added libEGL.dll, libGLESv2.dll, d3dcompiler_47.dll and opengl32sw.dll.
Also We try to set Qt::AA_UseSoftwareOpenGL flag for main QApplication (before QApplication construction) but this operation doesn't give results.
Stable reproducing we have on virtual mashine with Win7.
QQuickWidget on Virtual mashine appears good after adding RemoteFX 3D video adapter. But can we show QQuickWidget witout RemoteFX 3D video adapter?
after QQuickWidget creating we have in WinDBG
ModLoad: 6ee10000 6ee18000 C:\Users\admin\Desktop\Release\Win32\QtQuick.2\qtquick2plugin.dll
ModLoad: 66c50000 66cfd000 C:\Users\admin\Desktop\Release\Win32\QtQuick\Controls\qtquickcontrolsplugin.dll
ModLoad: 6ee00000 6ee08000 C:\Users\admin\Desktop\Release\Win32\QtQuick\Window.2\windowplugin.dll
ModLoad: 656a0000 65863000 C:\Windows\system32\d3d9.dll
ModLoad: 749b0000 749b9000 C:\Windows\system32\VERSION.dll
ModLoad: 6edf0000 6edf6000 C:\Windows\system32\d3d8thk.dll
ModLoad: 662f0000 663b8000 C:\Windows\system32\opengl32.dll
ModLoad: 6dc80000 6dca2000 C:\Windows\system32\GLU32.dll
ModLoad: 655b0000 65697000 C:\Windows\system32\DDRAW.dll
ModLoad: 6edd0000 6edd6000 C:\Windows\system32\DCIMAN32.dll
ModLoad: 6d7f0000 6d7f7000 C:\Users\admin\Desktop\Release\Win32\libEGL.DLL
ModLoad: 65420000 655ac000 C:\Users\admin\Desktop\Release\Win32\libGLESv2.dll
ModLoad: 650c0000 65416000 C:\Users\admin\Desktop\Release\Win32\d3dcompiler_47.dll
ModLoad: 74550000 745d3000 C:\Windows\system32\dxgi.dll
ModLoad: 66bc0000 66c43000 C:\Windows\system32\d3d11.dll
ModLoad: 75730000 7575d000 C:\Windows\system32\WINTRUST.dll
ModLoad: 64d60000 650b6000 C:\Users\admin\Desktop\Release\Win32\d3dcompiler_47.dll
ModLoad: 74550000 745d3000 C:\Windows\system32\dxgi.dll
ModLoad: 66260000 662e3000 C:\Windows\system32\d3d11.dll
ModLoad: 650c0000 65416000 C:\Users\admin\Desktop\Release\Win32\d3dcompiler_47.dll
QWindowsEGLStaticContext::create: Could not initialize EGL display: error 0x3001
QWindowsEGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available
ModLoad: 64530000 65411000 C:\Users\admin\Desktop\Release\Win32\opengl32sw.dll
ModLoad: 75a80000 75aaa000 C:\Windows\system32\imagehlp.dll
ModLoad: 6da80000 6db6b000 C:\Windows\system32\dbghelp.dll
Where problem is?

I has the same issue with QQuickWidget when:
QQuickWidget * w = new QQuickWidget(this);
w->setSource(QUrl("qrc:///main.qml"));
w->show();
Everything was OK when I compile with QtCreator, but when I run executable into another PC's (with Intel videocards), on some the app crashes, but on some another was a "black screen".
It was because of, for example, the second PC has a graphics card Intel 945. The problem was in OpenGL.
Qt Quick requires OpenGL 2.0 or greater. However, the Intel 945 only supports up to OpenGL 1.4
So... I start using QQuickView instead of QQuickWidget

Related

32 bit Qt app crashes randomly on Windows 7 x64 [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
We have an old codebase which we develop using C++ Qt framework (v4.6.3) under Windows XP SP3. The app that is built with that codebase is working free of problems under Windows XP.
Upon customer request we deployed the app to Windows 7 x64 machines. After that we came across with random crash issues in release build when we try to start the app. App consumes nearly 2GB of memory when it crashes. If we change app compatibility to Windows XP SP3, the crash problem goes away. Also crash never happens in debug mode.
We collected some logs about crash issue. Below logs are given:
1. Windows log after app crashes.
Problem signature:
Problem Event Name: APPCRASH
Application Name: kmclient3.exe
Application Version: 0.0.0.0
Application Timestamp: 55b72d4f
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.18409
Fault Module Timestamp: 53159a86
Exception Code: e06d7363
Exception Offset: 0000c42d
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1055
Additional Information 1: 9c29
Additional Information 2: 9c2952f45ffd526b51f7caf2e8b92e02
Additional Information 3: e72c
Additional Information 4: e72c8eab1d594c6991d297d4615a53d6
2.WinDbg log when we attach debugger after the app crashes.
** wait with pending attach
Symbol search path is: E:\Symbols
Executable search path is:
ModLoad: 01220000 014f7000 E:\YERLISINYAL09\YAZILIM\build\TKM_crash_test\kmclient3.exe
ModLoad: 76dd0000 76f79000 C:\Windows\SYSTEM32\ntdll.dll
ModLoad: 76fb0000 77130000 ntdll.dll
ModLoad: 00000000`748f0000 00000000`7492f000 C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`74890000 00000000`748ec000 C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`74880000 00000000`74888000 C:\Windows\SYSTEM32\wow64cpu.dll
ModLoad: 00000000`769f0000 00000000`76b00000 KERNEL32.dll
ModLoad: 00000000`74c30000 00000000`74c77000 KERNELBASE.dll
ModLoad: 00000000`596e0000 00000000`5971e000 UMEngx86.dll
ModLoad: 00000000`67000000 00000000`67211000 QtCore4.dll
ModLoad: 00000000`74ad0000 00000000`74bd0000 USER32.dll
ModLoad: 00000000`75310000 00000000`753a0000 GDI32.dll
ModLoad: 00000000`75100000 00000000`7510a000 LPK.dll
ModLoad: 00000000`75a60000 00000000`75afd000 USP10.dll
ModLoad: 00000000`76920000 00000000`769cc000 msvcrt.dll
ModLoad: 00000000`74c90000 00000000`74d30000 ADVAPI32.dll
ModLoad: 00000000`76760000 00000000`76779000 SECHOST.dll
ModLoad: 00000000`75220000 00000000`75310000 RPCRT4.dll
ModLoad: 00000000`74950000 00000000`749b0000 SspiCli.dll
ModLoad: 00000000`74940000 00000000`7494c000 CRYPTBASE.dll
ModLoad: 00000000`754c0000 00000000`7561c000 ole32.dll
ModLoad: 00000000`757b0000 00000000`757e5000 WS2_32.dll
ModLoad: 00000000`74c80000 00000000`74c86000 NSI.dll
ModLoad: 00000000`5a5a0000 00000000`5a62e000 MSVCP90.dll
ModLoad: 00000000`737f0000 00000000`73893000 MSVCR90.dll
ModLoad: 00000000`65000000 00000000`657a7000 QtGui4.dll
ModLoad: 00000000`749b0000 00000000`74a2b000 COMDLG32.dll
ModLoad: 00000000`757f0000 00000000`75847000 SHLWAPI.dll
ModLoad: 00000000`5ce00000 00000000`5ce84000 COMCTL32.dll
ModLoad: 00000000`75b00000 00000000`7674a000 SHELL32.dll
ModLoad: 00000000`76b10000 00000000`76b9f000 OLEAUT32.dll
ModLoad: 00000000`74bd0000 00000000`74c30000 IMM32.dll
ModLoad: 00000000`75120000 00000000`751ec000 MSCTF.dll
ModLoad: 00000000`5a560000 00000000`5a592000 WINMM.dll
ModLoad: 00000000`74810000 00000000`74861000 WINSPOOL.DRV
ModLoad: 00000000`61000000 00000000`61055000 QtXml4.dll
ModLoad: 00000000`66000000 00000000`66045000 QtSvg4.dll
ModLoad: 00000000`64000000 00000000`640ea000 QtNetwork4.dll
ModLoad: 00000000`62000000 00000000`62031000 QtSql4.dll
ModLoad: 00000000`70c40000 00000000`70cc0000 UxTheme.dll
ModLoad: 00000000`70c20000 00000000`70c33000 dwmapi.dll
ModLoad: 00000000`753a0000 00000000`75423000 CLBCatQ.DLL
ModLoad: 00000000`59540000 00000000`5969d000 inkobj.dll
ModLoad: 00000000`72110000 00000000`72124000 ATL.DLL
ModLoad: 00000000`00e90000 00000000`01020000 gdiplus.dll
ModLoad: 00000000`732c0000 00000000`732d6000 CRYPTSP.dll
ModLoad: 00000000`73270000 00000000`732ab000 RSAENH.dll
ModLoad: 00000000`72f30000 00000000`72f3e000 RpcRtRemote.dll
ModLoad: 00000000`59530000 00000000`5953d000 TpcPS.DLL
ModLoad: 00000000`10000000 00000000`10011000 qsqlmysql4.dll
ModLoad: 00000000`550e0000 00000000`55677000 libmysql.dll
ModLoad: 00000000`735f0000 00000000`735f8000 Secur32.dll
ModLoad: 00000000`72f90000 00000000`72fa0000 nlaapi.dll
ModLoad: 00000000`72f60000 00000000`72f70000 NAPINSP.dll
ModLoad: 00000000`72f40000 00000000`72f52000 PNRPNSP.dll
ModLoad: 00000000`734c0000 00000000`734fc000 MSWSOCK.dll
ModLoad: 00000000`72ee0000 00000000`72f24000 DNSAPI.dll
ModLoad: 00000000`72ed0000 00000000`72ed8000 WINRNR.dll
ModLoad: 00000000`6de50000 00000000`6de56000 rasadhlp.dll
ModLoad: 00000000`734b0000 00000000`734b5000 WSHTCPIP.dll
Break-in sent, waiting 30 seconds...
WARNING: Break-in timed out, suspending.
This is usually caused by another thread holding the loader lock
(1a2c.106c): Wake debugger - code 80000007 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for KERNELBASE.dll -
KERNELBASE!RaiseException+0x58:
74c3c42d c9 leave
0:000:x86> g
** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SYSTEM32\ntdll.dll -
ntdll!NtWaitForWorkViaWorkerFactory+0xa:
00000000`76e22bba c3 ret
0:004> g
^ No runnable debuggees error in 'g'
3.WinDbg log when we open crash dump.
Loading Dump File [C:\Users\onur.ozcelik.BILISIM\Desktop\kmclient3.DMP]
User Mini Dump File with Full Memory: Only application data is available
Symbol search path is: E:\Symbols
Executable search path is:
Windows 7 Version 7601 (Service Pack 1) MP (12 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Tue Jul 28 10:46:30.000 2015 (GMT+3)
System Uptime: 0 days 2:42:56.184
Process Uptime: 0 days 0:02:46.000
........................................................
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
eax=00000002 ebx=0000000b ecx=00000000 edx=00000000 esi=00000002 edi=00407c58
eip=76fd1f46 esp=036ffac4 ebp=036ffc24 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!NtWaitForWorkViaWorkerFactory+0x12:
76fd1f46 83c404 add esp,4
0:000> g
^ No runnable debuggees error in 'g'
What causes the crash issue?
Any ideas or suggestions?
This simply means there is a bug in your program. Without seeing the code its hard to tell where. I would suggest using cout or printf or qDebug() to detect the last line upto where the code runs well. This will give you the area where error is occurring. This is how I resolved my bug in multi thread program. I would also suggest you to read this.

CDB crashes in Qt project

The riddle I am going to present to you just blowing my mind.
There is a project written on Qt 4.8.2, compiled by MSVC 2010 compiler, 32-bit application. It uses lapack linear algebra library and also some networking to download and present Google maps to the user. I'm not the author of the code: the author gave me source code as well as compiled application and my task is to adapt it to my purposes.
The application doesn't run on my Windows 7 Ultimate x64 system. More specifically, it runs but then hangs up showing no GUI, consuming 25% of CPU (i.e. one core) and the only way I can kill it is through Task Manager.
When I compile it in Qt Creator with MSVC2010 compiler and run under CDB - it crashes; the debugger's listing is presented below.
What is more - the application runs smmothly on my colleagues' computers as well as in the same Win7 system in the Virtual box. In client system the application runs but in the host system it hangs up! Re-installing the Win7 system didn't help: on the completely new system the situation repeated exactly.
Simple test application (doing nothing - just showing up a simple window) is being compiled and runs smoothly. The problem is only with that 'problem' application.
sStarting debugger 'CdbEngine' for ABI 'x86-windows-msvc2010-pe-32bit'...
dStart parameters: 'ZModel' mode: 1
dABI: x86-windows-msvc2010-pe-32bit
dExecutable: D:\trunk\build-Debug\ZModel.exe
dDirectory: D:\trunk\build-Debug
dDebugger: D:\Tools\WinDDK\Debuggers\cdb.exe
dProject: D:\trunk\src (built: D:\trunk\src)
dQt: d:\Tools\QtSDK\Desktop\Qt\4.8.1\msvc2010
dQML server: 127.0.0.1:3768
dSysroot:
dDebug Source Loaction:
dSymbol file:
dDumper libraries: d:\Tools\QtSDK\Desktop\Qt\4.8.1\msvc2010\\qtc-debugging-helper\ D:\Tools\QtSDK\QtCreator\qtc-debugging-helper\258168559\ C:\Users\DAN\AppData\Local\Nokia\QtCreator\qtc-debugging-helper\258168559\
d
dDebugger settings:
dUseAlternatingRowColours: false (default: false)
dFontSizeFollowsEditor: false (default: false)
dUseMessageBoxForSignals: true (default: true)
dAutoQuit: false (default: false)
dLogTimeStamps: false (default: false)
dVerboseLog: false (default: false)
dCloseBuffersOnExit: false (default: false)
dSwitchModeOnExit: false (default: false)
dUseDebuggingHelper: true (default: true)
dUseCodeModel: true (default: true)
dShowThreadNames: false (default: false)
dUseToolTips: false (default: false)
dUseToolTipsInLocalsView: false (default: false)
dUseToolTipsInBreakpointsView: false (default: false)
dUseAddressInBreakpointsView: false (default: false)
dUseAddressInStackView: false (default: false)
dRegisterForPostMortem: false (default: false)
dLoadGdbInit: true (default: true)
dScriptFile: (default: )
dWatchdogTimeout: 20 (default: 20)
dAutoEnrichParameters: false (default: false)
dTargetAsync: false (default: false)
dMaximalStackDepth: 20 (default: 20)
dAlwaysAdjustStackColumnWidths: false (default: false)
dShowStandardNamespace: true (default: true)
dShowQtNamespace: true (default: true)
dSortStructMembers: true (default: true)
dAutoDerefPointers: true (default: true)
dAlwaysAdjustLocalsColumnWidths: false (default: false)
dListSourceFiles: false (default: false)
dSkipKnownFrames: false (default: false)
dEnableReverseDebugging: false (default: false)
dAllPluginBreakpoints: true (default: true)
dSelectedPluginBreakpoints: false (default: false)
dAdjustBreakpointLocations: true (default: true)
dAlwaysAdjustBreakpointsColumnWidths: false (default: false)
dNoPluginBreakpoints: false (default: false)
dSelectedPluginBreakpointsPattern: .* (default: .*)
dBreakOnThrow: false (default: false)
dBreakOnCatch: false (default: false)
dBreakOnWarning: false (default: false)
dBreakOnFatal: false (default: false)
dAlwaysAdjustRegistersColumnWidths: false (default: false)
dAlwaysAdjustSnapshotsColumnWidths: false (default: false)
dAlwaysAdjustThreadsColumnWidths: false (default: false)
dAlwaysAdjustModulesColumnWidths: false (default: false)
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
dQUEUE: SETUP ENGINE
dCALL: SETUP ENGINE
Launching D:\Tools\WinDDK\Debuggers\cdb.exe -aqtcreatorcdbext.dll -lines -G -c .idle_cmd !qtcreatorcdbext.idle -y symsrv*symsrv.dll*C:\Users\DAN\AppData\Local\Temp\symbolcache*http://msdl.microsoft.com/download/symbols D:\trunk\build-Debug\ZModel.exe
using D:\Tools\QtSDK\QtCreator\lib\qtcreatorcdbext64\qtcreatorcdbext.dll of 22.07.2014 18:43:57.
D:\Tools\WinDDK\Debuggers\cdb.exe running as 4444
Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: D:\trunk\build-Debug\ZModel.exe
Symbol search path is: symsrv*symsrv.dll*C:\Users\DAN\AppData\Local\Temp\symbolcache*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00000000`012c0000 00000000`01c74000 ZModel.exe
ModLoad: 00000000`77410000 00000000`775bb000 ntdll.dll
ModLoad: 00000000`775f0000 00000000`77770000 ntdll32.dll
ModLoad: 00000000`73d90000 00000000`73dcf000 C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`73d30000 00000000`73d8c000 C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`73d20000 00000000`73d28000 C:\Windows\SYSTEM32\wow64cpu.dll
(130c.1300): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00000000`774c1220 cc int 3
cdb: Reading initial command '.idle_cmd !qtcreatorcdbext.idle'
Execute when idle: !qtcreatorcdbext.idle
0:000>
<l+t
<l+s
dNOTE: ENGINE SETUP OK
dState changed from EngineSetupRequested(1) to EngineSetupOk(3).
dQUEUE: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4).
dQUEUE: SETUP INFERIOR
dCALL: SETUP INFERIOR
<sxn 0x4000001f
<.asm source_line
<!qtcreatorcdbext.pid -t 0
Source options are 1:
1/t - Step/trace by source line
Source options are 5:
1/t - Step/trace by source line
4/s - List source code at prompt
Assembly options: source_line
Qt Creator CDB extension version 0.11 (Qt 5 support) 64 bit built Oct 11 2011.
dTaking notice of pid 4876
dNOTE: INFERIOR SETUP OK
dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6).
dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
dQUEUE: RUN ENGINE
dCALL: RUN ENGINE
<sxe eh
<sxe ct
<sxe et
<g
dNOTE: ENGINE RUN AND INFERIOR RUN OK
dState changed from EngineRunRequested(7) to InferiorRunOk(11).
ModLoad: 00000000`771f0000 00000000`7730f000 WOW64_IMAGE_SECTION
ModLoad: 00000000`75880000 00000000`75980000 WOW64_IMAGE_SECTION
ModLoad: 00000000`771f0000 00000000`7730f000 NOT_AN_IMAGE
ModLoad: 00000000`77310000 00000000`7740a000 NOT_AN_IMAGE
ModLoad: 00000000`75880000 00000000`75980000 C:\Windows\syswow64\kernel32.dll
ModLoad: 00000000`75450000 00000000`75496000 C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 00000000`6f250000 00000000`6f2c9000 D:\trunk\build-Debug\Solver.dll
ModLoad: 00000000`68e50000 00000000`690c6000 D:\trunk\build-Debug\QtCore4.dll
ModLoad: 00000000`75600000 00000000`75700000 C:\Windows\syswow64\USER32.dll
ModLoad: 00000000`77130000 00000000`771c0000 C:\Windows\syswow64\GDI32.dll
ModLoad: 00000000`75370000 00000000`7537a000 C:\Windows\syswow64\LPK.dll
ModLoad: 00000000`760f0000 00000000`7618d000 C:\Windows\syswow64\USP10.dll
ModLoad: 00000000`75550000 00000000`755fc000 C:\Windows\syswow64\msvcrt.dll
ModLoad: 00000000`76f30000 00000000`76fd0000 C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 00000000`75340000 00000000`75359000 C:\Windows\SysWOW64\sechost.dll
ModLoad: 00000000`75700000 00000000`757f0000 C:\Windows\syswow64\RPCRT4.dll
ModLoad: 00000000`75160000 00000000`751c0000 C:\Windows\syswow64\SspiCli.dll
ModLoad: 00000000`75150000 00000000`7515c000 C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 00000000`76fd0000 00000000`7712c000 C:\Windows\syswow64\ole32.dll
ModLoad: 00000000`75ec0000 00000000`75ef5000 C:\Windows\syswow64\WS2_32.dll
ModLoad: 00000000`75360000 00000000`75366000 C:\Windows\syswow64\NSI.dll
ModLoad: 00000000`6f1e0000 00000000`6f249000 C:\Windows\SysWOW64\MSVCP100.dll
ModLoad: 00000000`74e30000 00000000`74eef000 C:\Windows\SysWOW64\MSVCR100.dll
ModLoad: 00000000`10000000 00000000`10580000 D:\trunk\build-Debug\lapack_win32_MT.dll
ModLoad: 00000000`00390000 00000000`00453000 D:\trunk\build-Debug\blas_win32_MT.dll
ModLoad: 00000000`76210000 00000000`7623a000 C:\Windows\syswow64\imagehlp.dll
ModLoad: 00000000`70e80000 00000000`72d3f000 D:\trunk\build-Debug\QtWebKitd4.dll
ModLoad: 00000000`68a00000 00000000`68e49000 D:\trunk\build-Debug\QtCored4.dll
ModLoad: 00000000`6f120000 00000000`6f1d7000 C:\Windows\SysWOW64\MSVCP100D.dll
ModLoad: 00000000`691d0000 00000000`69343000 D:\trunk\build-Debug\MSVCR100D.dll
(130c.1300): Unknown exception - code c0000139 (first chance)
s
sException at 0x77671b12, code: 0xc0000139: DLL entry point not found, flags=0x1 (execution cannot be continued) in ntdll32!LdrpSnapThunk
sProcess exited (3221225785)
eProcess crashed
eCDB crashed
dNOTE: ENGINE SPONTANEOUS SHUTDOWN
dState changed BY FORCE from InferiorRunOk(11) to EngineShutdownOk(22).
dState changed from EngineShutdownOk(22) to DebuggerFinished(23).
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.
What could be done about this? How can I make application work? I've run out of ideas.
Because the Win7 system is clean - there are no Qt dlls in the Windows/System32 folder - nothing to delete.
0xc0000139: DLL entry point not found - double-check that all needed dlls are there and of the proper kind *debug/release, 32/64 bit, whatever)

Can't debug in qt-creator, cdb crashes 0xC0000135

When I run debug in debug mode in Qt-Creator it simply says
Debugging started. Debugging finished.
The debug output is huge but here's the important part:
dNOTE: ENGINE RUN AND INFERIOR RUN OK
sRunning.
dState changed from EngineRunRequested(7) to InferiorRunOk(11) [master]
ModLoad: 00000000`76e40000 00000000`76f5f000 WOW64_IMAGE_SECTION
ModLoad: 00000000`74fb0000 00000000`750c0000 WOW64_IMAGE_SECTION
ModLoad: 00000000`76e40000 00000000`76f5f000 NOT_AN_IMAGE
ModLoad: 00000000`76f60000 00000000`7705a000 NOT_AN_IMAGE
ModLoad: 00000000`74fb0000 00000000`750c0000 C:\Windows\syswow64\kernel32.dll
ModLoad: 00000000`758d0000 00000000`75917000 C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 00000000`647e0000 00000000`64f4c000 C:\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin\Qt5Widgetsd.dll
ModLoad: 00000000`755f0000 00000000`75680000 C:\Windows\syswow64\GDI32.dll
ModLoad: 00000000`74e70000 00000000`74f70000 C:\Windows\syswow64\USER32.dll
ModLoad: 00000000`75280000 00000000`75320000 C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 00000000`75930000 00000000`759dc000 C:\Windows\syswow64\msvcrt.dll
ModLoad: 00000000`76e20000 00000000`76e39000 C:\Windows\SysWOW64\sechost.dll
ModLoad: 00000000`75320000 00000000`75410000 C:\Windows\syswow64\RPCRT4.dll
ModLoad: 00000000`74c90000 00000000`74cf0000 C:\Windows\syswow64\SspiCli.dll
ModLoad: 00000000`74c80000 00000000`74c8c000 C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 00000000`758b0000 00000000`758ba000 C:\Windows\syswow64\LPK.dll
ModLoad: 00000000`74dd0000 00000000`74e6d000 C:\Windows\syswow64\USP10.dll
ModLoad: 00000000`75e70000 00000000`76aba000 C:\Windows\syswow64\SHELL32.dll
ModLoad: 00000000`750c0000 00000000`75117000 C:\Windows\syswow64\SHLWAPI.dll
ModLoad: 00000000`0f7b0000 00000000`0fd12000 C:\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin\Qt5Guid.dll
ModLoad: 00000000`50e70000 00000000`50f38000 C:\Windows\SysWOW64\OPENGL32.dll
ModLoad: 00000000`53480000 00000000`534a2000 C:\Windows\SysWOW64\GLU32.dll
ModLoad: 00000000`50b10000 00000000`50bf7000 C:\Windows\SysWOW64\DDRAW.dll
ModLoad: 00000000`53cb0000 00000000`53cb6000 C:\Windows\SysWOW64\DCIMAN32.dll
ModLoad: 00000000`76bf0000 00000000`76d8d000 C:\Windows\syswow64\SETUPAPI.dll
ModLoad: 00000000`74d60000 00000000`74d87000 C:\Windows\syswow64\CFGMGR32.dll
ModLoad: 00000000`75de0000 00000000`75e6f000 C:\Windows\syswow64\OLEAUT32.dll
ModLoad: 00000000`75410000 00000000`7556c000 C:\Windows\syswow64\ole32.dll
ModLoad: 00000000`74d90000 00000000`74da2000 C:\Windows\syswow64\DEVOBJ.dll
ModLoad: 00000000`6dc70000 00000000`6dc83000 C:\Windows\SysWOW64\dwmapi.dll
ModLoad: 00000000`66ac0000 00000000`67197000 C:\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin\Qt5Cored.dll
ModLoad: 00000000`74f70000 00000000`74fa5000 C:\Windows\syswow64\WS2_32.dll
ModLoad: 00000000`74db0000 00000000`74db6000 C:\Windows\syswow64\NSI.dll
ModLoad: 00000000`4a900000 00000000`4aa49000 C:\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin\icuin49.dll
ModLoad: 00000000`00340000 00000000`00447000 C:\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin\icuuc49.dll
ModLoad: 00000000`00760000 00000000`01882000 C:\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin\icudt49.dll
ModLoad: 00000000`61ff0000 00000000`620af000 C:\Windows\SysWOW64\MSVCR100.dll
ModLoad: 00000000`00510000 00000000`00579000 C:\Windows\SysWOW64\MSVCP100.dll
sProcess exited (3221225781)
eERROR: Process crashed
eERROR: CDB crashed
dNOTE: ENGINE SPONTANEOUS SHUTDOWN
dState changed BY FORCE from InferiorRunOk(11) to EngineShutdownOk(22) [master]
dState changed from EngineShutdownOk(22) to DebuggerFinished(23) [master]
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.
I am using Windows 7, QT-5.02 compiled for OpenGL, MSVC2010, QT-Creator 2.7.0, Windows SDK 7.1, VS2010. The problem exists regardless of which version of the VC++ Compiler I use (9.0 vs 10.0) .
I have already tried reinstalling Windows SDK, all the VC++ redistributables, QT, and QT-Creator.
The problem persists no matter what project I use, even a simple hello world with no QT calls.
Does anyone know what's going on?
Can you run your application without the debugger - in other words, does it always crash?
Did you check all of your dependencies for your application? (dependency walker & redistributables)
I'm asking because there's a similar post with your error code that indicates your issue may be dealing with missing DLLs not found in the directory or %PATH%.
I just setup my CDB in windows 7 from scratch and had no problems.
I fixed this by adding ICU to the path (which for me was \dev\icu4c-51_2-Win64-msvc10\icu\bin64).
I got the same log and same error. I resolved it by copying the 2 files from C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\Debug_NonRedist\x86\Microsoft.VC100.DebugCRT to the path where the exe can access(in my scenario, I'm compiling 32bit app on 64bit machine, and I copied to the folder where QCore5d.dll is).

Qt application: Failed to load platform plugin "windows". Available platforms are:

I've compiled Qt 5.0.0 with msvc2010 because I need opengl with configure string
configure -prefix %CD%\qtbase -opensource -nomake -nomake examples -nomake demo -opengl desktop -platform win32-msvc2010
Now I can start Qt application from QtCreator only. I've put application in WinDBG it's output below
CommandLine: D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\WellReader_0_1.exe
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00120000 00132000 image00120000
ModLoad: 77900000 77a3d000 ntdll.dll
ModLoad: 774b0000 77584000 C:\Windows\system32\kernel32.dll
ModLoad: 75b60000 75baa000 C:\Windows\system32\KERNELBASE.dll
ModLoad: 59d30000 59df8000 C:\Windows\system32\OPENGL32.dll
ModLoad: 77020000 770cc000 C:\Windows\system32\msvcrt.dll
ModLoad: 775f0000 77690000 C:\Windows\system32\ADVAPI32.dll
ModLoad: 77b10000 77b29000 C:\Windows\SYSTEM32\sechost.dll
ModLoad: 77a50000 77af2000 C:\Windows\system32\RPCRT4.dll
ModLoad: 76340000 7638e000 C:\Windows\system32\GDI32.dll
ModLoad: 76070000 76139000 C:\Windows\system32\USER32.dll
ModLoad: 77a40000 77a4a000 C:\Windows\system32\LPK.dll
ModLoad: 77690000 7772d000 C:\Windows\system32\USP10.dll
ModLoad: 71a30000 71a52000 C:\Windows\system32\GLU32.dll
ModLoad: 71500000 715e7000 C:\Windows\system32\DDRAW.dll
ModLoad: 71620000 71626000 C:\Windows\system32\DCIMAN32.dll
ModLoad: 75d70000 75f0d000 C:\Windows\system32\SETUPAPI.dll
ModLoad: 75d20000 75d47000 C:\Windows\system32\CFGMGR32.dll
ModLoad: 770d0000 7715f000 C:\Windows\system32\OLEAUT32.dll
ModLoad: 75f10000 7606c000 C:\Windows\system32\ole32.dll
ModLoad: 75be0000 75bf2000 C:\Windows\system32\DEVOBJ.dll
ModLoad: 743d0000 743e3000 C:\Windows\system32\dwmapi.dll
ModLoad: 5a1f0000 5a23b000 D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5OpenGL.dll
ModLoad: 59910000 59d22000 D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5Widgets.dll
ModLoad: 763d0000 7701a000 C:\Windows\system32\SHELL32.dll
ModLoad: 77590000 775e7000 C:\Windows\system32\SHLWAPI.dll
ModLoad: 59650000 59910000 D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5Gui.dll
ModLoad: 59250000 5964c000 D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5Core.dll
ModLoad: 76390000 763c5000 C:\Windows\system32\WS2_32.dll
ModLoad: 77360000 77366000 C:\Windows\system32\NSI.dll
ModLoad: 687b0000 68819000 C:\Windows\system32\MSVCP100.dll
ModLoad: 67930000 679ef000 C:\Windows\system32\MSVCR100.dll
(116c.16cc): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
eax=00000000 ebx=00000000 ecx=0030f8d4 edx=779470f4 esi=fffffffe edi=00000000
eip=779a058e esp=0030f8f0 ebp=0030f91c iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
ntdll!LdrVerifyImageMatchesChecksum+0x633:
779a058e cc int 3
0:000> g
ModLoad: 75d50000 75d6f000 C:\Windows\system32\IMM32.DLL
ModLoad: 77830000 778fc000 C:\Windows\system32\MSCTF.dll
ModLoad: 75a10000 75a45000 C:\Windows\system32\nvinit.dll
ModLoad: 75940000 7594c000 C:\Windows\system32\cryptbase.dll
Failed to load platform plugin "windows". Available platforms are:
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\kernel32.dll -
eax=00000000 ebx=00000001 ecx=0030fa38 edx=00000020 esi=779d7380 edi=779d7340
eip=779470f4 esp=0030fa88 ebp=0030faa4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
ntdll!KiFastSystemCallRet:
779470f4 c3 ret
0:000> g
^ No runnable debuggees error in 'g'
Where I can take plugin "windows"? Or should I recompile Qt with another configure options? Please advice
I haven't looked at Qt 5.0 yet, but if they have plugin platforms now, you have to make sure your app can find them at runtime. Apparently QtCreator sets up PATH properly, so all the plugins are there, no need to rebuild Qt.
Find the plugins folder, copy necessary plugins into your install folder (make sure to keep the structure, so "plugins/imageformats/.../bla.dll", etc), create qt.conf file and set plugins path to be ".". Drop qt.conf file into your install folder as well.

Secugen fingerprint reader using Qt

I am trying to create an app using the SecuGen FDX SDK on Qt. I am hving issues capturing an image from the reader. I can access all the functions in the dll without problem, except form the ones involving capturing an image. When I debug the code under Qt creator I get the following:
ModLoad: 00e60000 00f06000 registrationPlatform.exe
ModLoad: 77580000 776bc000 ntdll.dll
ModLoad: 769f0000 76ac4000 C:\Windows\system32\kernel32.dll
ModLoad: 75920000 7596a000 C:\Windows\system32\KERNELBASE.dll
ModLoad: 10000000 1001f000 D:\software\registrationPlatform-build-desktop-Qt_4_8_3-msvc__qmake__Debug\debug\SGFPLIB.DLL
ModLoad: 74bd0000 74bd9000 C:\Windows\system32\VERSION.dll
ModLoad: 76810000 768bc000 C:\Windows\system32\msvcrt.dll
ModLoad: 76ec0000 76f89000 C:\Windows\system32\USER32.dll
ModLoad: 77050000 7709e000 C:\Windows\system32\GDI32.dll
ModLoad: 776d0000 776da000 C:\Windows\system32\LPK.dll
ModLoad: 77710000 777ad000 C:\Windows\system32\USP10.dll
ModLoad: 554d0000 5631e000 D:\software\registrationPlatform-build-desktop-Qt_4_8_3-msvc__qmake__Debug\debug\QtGuid4.dll
ModLoad: 76ad0000 76b4b000 C:\Windows\system32\COMDLG32.dll
ModLoad: 76ff0000 77047000 C:\Windows\system32\SHLWAPI.dll
ModLoad: 74660000 747fe000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\COMCTL32.dll
ModLoad: 75b10000 76759000 C:\Windows\system32\SHELL32.dll
ModLoad: 76910000 7699f000 C:\Windows\system32\OLEAUT32.dll
ModLoad: 76d20000 76e7c000 C:\Windows\system32\ole32.dll
ModLoad: 770a0000 77141000 C:\Windows\system32\RPCRT4.dll
ModLoad: 776e0000 776ff000 C:\Windows\system32\IMM32.dll
ModLoad: 76c50000 76d1c000 C:\Windows\system32\MSCTF.dll
ModLoad: 71870000 718a2000 C:\Windows\system32\WINMM.dll
ModLoad: 6f500000 6f551000 C:\Windows\system32\WINSPOOL.DRV
ModLoad: 76770000 76810000 C:\Windows\system32\ADVAPI32.dll
ModLoad: 768f0000 76909000 C:\Windows\SYSTEM32\sechost.dll
ModLoad: 569f0000 56e40000 D:\software\registrationPlatform-build-desktop-Qt_4_8_3-msvc__qmake__Debug\debug\QtCored4.dll
ModLoad: 76e80000 76eb5000 C:\Windows\system32\WS2_32.dll
ModLoad: 77700000 77706000 C:\Windows\system32\NSI.dll
ModLoad: 66580000 6664b000 C:\Windows\system32\MSVCP110D.dll
ModLoad: 56850000 569eb000 C:\Windows\system32\MSVCR110D.dll
(758.15c): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=001af55c edx=775c64f4 esi=fffffffe edi=00000000
eip=7761e60e esp=001af578 ebp=001af5a4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
ntdll!LdrpDoDebuggerBreak+0x2c:
7761e60e cc int 3
cdb: Reading initial command '.idle_cmd !qtcreatorcdbext.idle'
Execute when idle: !qtcreatorcdbext.idle
0:000>
<l+t
<l+s
dNOTE: ENGINE SETUP OK
dState changed from EngineSetupRequested(1) to EngineSetupOk(3) [master]
dQUEUE: SETUP INFERIOR
dState changed from EngineSetupOk(3) to InferiorSetupRequested(4) [master]
dQUEUE: SETUP INFERIOR
dCALL: SETUP INFERIOR
<sxn 0x4000001f
<.asm source_line
<!qtcreatorcdbext.pid -t 0
Source options are 1:
1/t - Step/trace by source line
Source options are 5:
1/t - Step/trace by source line
4/s - List source code at prompt
Assembly options: source_line
Qt Creator CDB extension version 0.11 (Qt 5 support) 32 bit built Aug 9 2012.
dTaking notice of pid 1880
dNOTE: INFERIOR SETUP OK
dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6) [master]
dState changed from InferiorSetupOk(6) to EngineRunRequested(7) [master]
dQUEUE: RUN ENGINE
dCALL: RUN ENGINE
<g
dNOTE: ENGINE RUN AND INFERIOR RUN OK
sRunning.
dState changed from EngineRunRequested(7) to InferiorRunOk(11) [master]
ModLoad: 75640000 7568b000 C:\Windows\system32\apphelp.dll
ModLoad: 565f0000 56849000 C:\Windows\AppPatch\AcXtrnal.DLL
FTH: (1880): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. ***
ModLoad: 744b0000 744f0000 C:\Windows\system32\uxtheme.dll
ModLoad: 741b0000 741c3000 C:\Windows\system32\dwmapi.dll
ModLoad: 755d0000 755dc000 C:\Windows\system32\CRYPTBASE.dll
("D:/development/Qt/4.8.3-msvc/plugins", "D:/software/registrationPlatform-build-desktop-Qt_4_8_3-msvc__qmake__Debug/debug")
ModLoad: 00940000 00a30000 D:\software\registrationPlatform-build-desktop-Qt_4_8_3-msvc__qmake__Debug\debug\Sgfu03m.dll
ModLoad: 6dc90000 6dca1000 C:\Windows\system32\winbio.dll
ModLoad: 75750000 7586c000 C:\Windows\system32\CRYPT32.dll
ModLoad: 75740000 7574c000 C:\Windows\system32\MSASN1.dll
ModLoad: 6da50000 6da81000 C:\Windows\system32\credui.dll
ModLoad: 00270000 00290000 D:\software\registrationPlatform-build-desktop-Qt_4_8_3-msvc__qmake__Debug\debug\sgfpaMX.dll
ModLoad: 750d0000 750e6000 C:\Windows\system32\CRYPTSP.dll
ModLoad: 74ef0000 74f2b000 C:\Windows\system32\rsaenh.dll
ModLoad: 756c0000 756ce000 C:\Windows\system32\RpcRtRemote.dll
ModLoad: 75890000 75914000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16385_none_ebf82fc36c758ad5\comctl32.dll
HEAP[registrationPlatform.exe]:
Heap block at 003D3628 modified at 003D3655 past requested size of 25
(758.15c): Break instruction exception - code 80000003 (first chance)
s
sException at 0x77644684, code: 0x80000003: breakpoint, flags=0x0 in ntdll!RtlpBreakPointHeap
eax=003d3628 ebx=003d3655 ecx=775a07ed edx=001ac329 esi=003d3628 edi=00000025
eip=77644684 esp=001ac570 ebp=001ac570 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202
ntdll!RtlpBreakPointHeap+0x23:
77644684 cc int 3
sInterrupted.
dNOTE: INFERIOR SPONTANEOUS STOP
sStopped.
dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master]
<!qtcreatorcdbext.locals -t 1 -D -c -W 9
The specific part of the code causing the issue is the following:
BYTE *buffer = new BYTE(device_info.ImageHeight*device_info.ImageWidth);
DWORD timeout = 10000;
DWORD quality = 30;
if(SGFPM_GetImageEx(g_Fpm, buffer, timeout, NULL, quality) == SGFDX_ERROR_NONE)
{
//draw image
}
delete buffer;
Change your new and delete to use [ ] instead of ( ). You are actually allocating only one byte and initializing its value to the number of bytes you want. SGFPM_GetImageEx tries to write the image to unallocated memory and crashes.
BYTE *buffer = new BYTE[device_info.ImageHeight*device_info.ImageWidth];
...
delete[] buffer;