Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog crashes after few seconds

QFileDialog crashes after few seconds

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Geeva
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • G Offline
        G Offline
        Geeva
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • fcarneyF Offline
          fcarneyF Offline
          fcarney
          wrote on last edited by
          #4

          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:

          QUrl().fromLocalFile(cell_info->progDir()).toString()
          

          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.

          C++ is a perfectly valid school of magic.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved