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. QNetworkAccessManager crash 0xc0000409
Forum Update on Monday, May 27th 2025

QNetworkAccessManager crash 0xc0000409

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.1k Views
  • 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.
  • M Offline
    M Offline
    mourad_bilog
    wrote on last edited by mourad_bilog
    #1

    Hello everyone,
    I've a strange problem with my Qt 5.13 application that this line

    QNetworkAccessManager * m_netAccessMngr = new QNetworkAccessManager(this);
    

    crashes in release mode. In Debug mode, it works fine.
    I've included all requested dll's but it is still crashing with the following message :

    Chemin d’accès du module défaillant: C:\Qt\Qt5.13.0\5.13.0\msvc2017\bin\Qt5Core.dll
    

    Doe's anyone has encountred the same problem ? Can anyone tell me what I must to do to fix this error.
    Thanks for your help.
    Regards.

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

      Hi
      Just to be 100% sure.
      You name m_netAccessMngr suggest its a member of the class so that line would normally be
      m_netAccessMngr = new QNetworkAccessManager(this);
      as else you make a local variable and the real m_netAccessMngr (.h)
      is a dangling pointer.

      Also, it sounds you are running it from a deployment folder and not via Creator.
      Is this on the same PC as you develop or on a "clean" one ?

      Such crashes are normally due to it finding a wrong DLL version.

      1 Reply Last reply
      5
      • M Offline
        M Offline
        mourad_bilog
        wrote on last edited by
        #3

        Thanks for reply.

        Exact, m_netAccessMngr is a global variable declared in .h and it's instancied in the constructor.
        I've generated the executable and run it with the required Qt 5.13 dll's as I've done with many Qt applications.

        Such crashes are normally due to it finding a wrong DLL version
        

        I agree but I'm sure I've put the correct Qt 5.13 dll's.
        Also I've installed many VC redistribuable but the problem persists.

        jsulmJ 1 Reply Last reply
        0
        • M mourad_bilog

          Thanks for reply.

          Exact, m_netAccessMngr is a global variable declared in .h and it's instancied in the constructor.
          I've generated the executable and run it with the required Qt 5.13 dll's as I've done with many Qt applications.

          Such crashes are normally due to it finding a wrong DLL version
          

          I agree but I'm sure I've put the correct Qt 5.13 dll's.
          Also I've installed many VC redistribuable but the problem persists.

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

          @mourad_bilog said in QNetworkAccessManager crash 0xc0000409:

          and it's instancied in the constructor.

          In that case you're code is wrong as @mrjj pointed out!
          It should be:

          m_netAccessMngr = new QNetworkAccessManager(this);
          

          else you're declaring a local variable with same name and don't initialise the global one.

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

          1 Reply Last reply
          4

          • Login

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