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. QLibrary.load freezes application

QLibrary.load freezes application

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 945 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.
  • T Offline
    T Offline
    themts
    wrote on last edited by themts
    #1

    Hey guys,

    I have a problem with one of my applications.
    I'm loading a dll with QLibrary. While I'm in my debug-configuration everything is fine, but as soon as I'm on release QLibrary.load never finishes.
    When I restart my application several times, suddenly it works but only 1 out of 15 trials...

    Any idea what could be the reason for it?
    I'm using the same dll in several applications without problems.

    CU
    mts

    OS: windows 64bit
    Qt: 5.8.0

    jsulmJ 1 Reply Last reply
    0
    • T themts

      Hey guys,

      I have a problem with one of my applications.
      I'm loading a dll with QLibrary. While I'm in my debug-configuration everything is fine, but as soon as I'm on release QLibrary.load never finishes.
      When I restart my application several times, suddenly it works but only 1 out of 15 trials...

      Any idea what could be the reason for it?
      I'm using the same dll in several applications without problems.

      CU
      mts

      OS: windows 64bit
      Qt: 5.8.0

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @themts Can you show the code where you load the lib?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        themts
        wrote on last edited by themts
        #3
        bool LoadAHEDnetLib(QString pathAHEDnetLib = "") {
            QFile file(pathAHEDnetLib);
            if ((pathAHEDnetLib == "") || (!file.exists())){
                _ahedLib = new QLibrary("libAHEDnet.dll");
            } else
                _ahedLib = new QLibrary(pathAHEDnetLib);
        
            qDebug() << "Load AHEDnet.dll";   
            if ((_ahedLib == NULL) || !_ahedLib->load())  <<<THIS IS THE LINE WHERE IT FREEZES
                return false;     <<<< THIS LINE IS NEVER REACHED
            qDebug() << "Load AHEDnet.dll DONE";  <<<< THIS LINE IS NEVER REACHED
        
        ...
        }
        

        Quite simple...
        It's not returning failed or anything, it's just dead-locked.

        jsulmJ 1 Reply Last reply
        0
        • T themts
          bool LoadAHEDnetLib(QString pathAHEDnetLib = "") {
              QFile file(pathAHEDnetLib);
              if ((pathAHEDnetLib == "") || (!file.exists())){
                  _ahedLib = new QLibrary("libAHEDnet.dll");
              } else
                  _ahedLib = new QLibrary(pathAHEDnetLib);
          
              qDebug() << "Load AHEDnet.dll";   
              if ((_ahedLib == NULL) || !_ahedLib->load())  <<<THIS IS THE LINE WHERE IT FREEZES
                  return false;     <<<< THIS LINE IS NEVER REACHED
              qDebug() << "Load AHEDnet.dll DONE";  <<<< THIS LINE IS NEVER REACHED
          
          ...
          }
          

          Quite simple...
          It's not returning failed or anything, it's just dead-locked.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @themts Did you try to load any other lib? Just to see whether it is related to one specific lib.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

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