Qt World Summit: Register Today!

QFileDialog crashes after few seconds

  • I am making app to increase productivity in our company. It reads the whole .csv file and puts its contents to a table in .pdf format. I am using QT as GUI library and PoDoFo as .pdf library.

    The thing is, after I let user select .csv file to get data from and path to save generated .pdf, the program crashes in a two minutes or so. It varies from case to case. I was able to "track" the issue down to the QFileDialog.

    It doesn't matter if I created it on the stack, or dynamically still the same thing happens. From the moment you press "Choose" in the GUI, which opens up file dialog, program will crash in something around a two minutes giving this in Visual Studio Community 2017.

    enter image description herealt text
    I was able to create minimalistic code, to reproduce the error. I am using Windows 7 Pro, Microsoft Visual Studio Community 2017, compiling 32-bit debug

    .h,.cpp,.ui files: https://www.dropbox.com/sh/cf057p4lnumesol/AAD39zDJnrxGChXAuE7y27Kra?dl=0

    Any help would be appreciated, I've spent 5 days of my free time trying to figure this out. Thanks

    EDIT: I understand that the "Frame not in module" means that visual studio doesn't have debugging symbols for the part of code where crash occurred, since I did not built qt myself, that makes sense.

    EDIT2: I am using QT Visual Studio Tools addon version 2.3.2 Qt version is 5.12.1

  • Lifetime Qt Champion


    IIRC, you can download the debug symbols separately for Windows.

    I don't have a Windows machine at hand but do you have the same result if you use the getOpenFileName static method ?

  • @SGaist Yes I do, it is a bug 100% and I have .pdbs but I still get the window saying not in module

  • Not sure if this is related, but I had an issue where if I gave a path to the FileDialog it would grind away for a few seconds because it was somehow interpreting it as a network path. To fix this I gave it a path that had a prefix of "file://". To accomplish this I did this:


    The original path came from cell_info->progDir(). Somehow that path was a regular windows specific path. Once I wrapped it in the fromLocalFile call it produced what I needed for all platforms I was using it with.

    Again, I have no idea if this is related to your issue, but it sounds fishy like it is grinding away in the background on something. If this is not related feel free to ignore my comment.

Log in to reply