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. The application was unable to start correctly (0xc0000142)
Qt 6.11 is out! See what's new in the release blog

The application was unable to start correctly (0xc0000142)

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 10.1k 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.
  • 2 Offline
    2 Offline
    2beers
    wrote on last edited by
    #1

    Strange thing is that until today I didn't get this error. I also have to mention that I get this error if I compile with msvc2013 (both 32 or 64) , but not with MinGW. However for my project I need to be able to compile with msvc2013.

    This error is not related to my source code, because I tried other Qt apps, like a simple window app , even those examples that come with Qt leading to the same result.

    When I compile (debug or release) using Qt creator 3.3.0 I receive the following error :
    The application was unable to start correctly (0xc0000142)
    !http://i.imgur.com/48MHSK4.png(error)!

    The weird thing is that actually the application window opens in the background, if I click OK the windows closes and then the project build a new window without the error.

    I can work with this error, but it's annoying and I'm curious what's causing this error.
    I'm using Windows 7 SP1

    Thanks

    1 Reply Last reply
    0
    • hskoglundH Online
      hskoglundH Online
      hskoglund
      wrote on last edited by
      #2

      Hi, 0xc0000142 is STATUS_DLL_INIT_FAILED, i.e. some DLL couldn't be loaded, to see which one, you can use "Dependency Walker":http://www.dependencywalker.com/
      Start it, open your Qt App, and then start profiling your Qt App with F7 key. The trace might show which DLL gives that error.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rondog
        wrote on last edited by
        #3

        You might be missing the Visual Studio runtime libraries for 2013 on the computer you are running.

        "Visual C++ Redistributable Packages for Visual Studio 2013 ":http://www.microsoft.com/en-ca/download/details.aspx?id=40784

        1 Reply Last reply
        0
        • 2 Offline
          2 Offline
          2beers
          wrote on last edited by
          #4

          [quote author="hskoglund" date="1422393558"]Hi, 0xc0000142 is STATUS_DLL_INIT_FAILED, i.e. some DLL couldn't be loaded, to see which one, you can use "Dependency Walker":http://www.dependencywalker.com/
          Start it, open your Qt App, and then start profiling your Qt App with F7 key. The trace might show which DLL gives that error.
          [/quote]

          The error I get is when I try to compile the source code using Qt Creator.
          Somehow tries to compile 2 times. First time it gives me this error, but still compiles the app, after I click ok closes the app and re-compiles again , this time without error.
          If I start the app separately (double click the exe), everything works ok.

          [quote author="Rondog" date="1422394233"]You might be missing the Visual Studio runtime libraries for 2013 on the computer you are running.

          "Visual C++ Redistributable Packages for Visual Studio 2013 ":http://www.microsoft.com/en-ca/download/details.aspx?id=40784

          [/quote]

          Thanks I had redistributable packages for 2012, I've installed those for 2013 but I still get this error.

          1 Reply Last reply
          0
          • 2 Offline
            2 Offline
            2beers
            wrote on last edited by
            #5

            Could this be a Qt error? I have the latest version 5.4 and I realized that this error occur only when I'm using
            @QApplication app(argc, argv);@
            If I try to compile one of this qt quick example everything works ok:
            @QtQuickControlsApplication app(argc, argv);@

            1 Reply Last reply
            0
            • hskoglundH Online
              hskoglundH Online
              hskoglund
              wrote on last edited by
              #6

              I see, the error occurs not in your app but when building/compiling it in Qt Creator. And only for Widgets-flavored Qt apps (i.e. with a QApplication in their main.cpp).

              If you do a Build/Clean All in Qt Creator and start your app again (to force a rebuild) and look in Qt Creator's Compile Output window (you can switch to it with ALT+4) and then do the same for a Quick Controls app, are there any differences?

              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