PDA

View Full Version : QFileDialog crashes with MSVC 64bit



beneR-89
2nd October 2015, 15:31
Hello everyone,

I have a problem with using the QFileDialog class. When I want to open such a dialog my program crashes.



QString filename = QFileDialog::getOpenFileName(this, "Choose a file", "", "oi.xml (*.oi.xml)"); //static call



QFileDialog dlg;
dlg.exec(); //instance call


The crash also occurs when I run Qt's "findfiles" example (I started findfiles.exe within Qt Creator and I clicked the "Browse"-Button).

The crash only appears in release mode (regardless of running the program from within Qt Creator or directly), not in debug mode and only when I use the compiler "Microsoft Visual C++ Compiler 12.0 (x86_amd64)". When I use "Microsoft Visual C++ Compiler 12.0 (x86_amd64)" or "MinGW 4.9.2 32bit" everything is fine. In my program I have to use that compiler because of an external library that only runs on Windows systems and includes "windows.h".

For those who know CloudCompare: I have installed the 64bit version of CloudCompare and I have the same problems there (as far as I know CloudCompare also uses Qt). On another machine where Qt is not installed the problem does not occur.

Has anyone got any idea what could cause the problem ?

Thanks in advance.

beneR-89
3rd October 2015, 10:28
some further information...

The windows event viewer tells me the following:
application name: findfiles.exe
fault module name: ntdll.dll
exception code: 0xc0000005
exception offset: 0x0000000000050e91
faulting process id: 0x131c
faulting application start time: 0x01d0fd16001dee58
faulting application path: C:\Qt\Examples\Qt-5.5\widgets\dialogs\build-findfiles-Desktop_Qt_5_5_0_MSVC2013_64bit-Release\release\findfiles.exe
faulting module path: C:\Windows\SYSTEM32\ntdll.dll
report id: 406ce35b-6909-11e5-a890-80000ba6eac7

for clearness (because I made a copy&paste error in the start post):
The crash only appears when using the compiler "Microsoft Visual C++ Compiler 12.0 (x86_amd64)" in release mode. When I use the compilers "Microsoft Visual C++ Compiler 12.0 (x86)" or "MinGW 4.9.2 32bit" (in release or debug mode) everything is fine.