Qt creator ошибка при запуске приложения 0xc000005

This topic has been deleted. Only users with topic management privileges can see it.

  • Hello everybody,
    I’m having a hard time installing Qt Creator on windows 7 x64

    I’ve tried the offline installer, online installer:
    qt-creator-opensource-windows-x86_64-6.0.0.exe
    qt-unified-windows-x86-4.2.0-online.exe

    Both give me an immediate error:
    «The application was unable to start correctly (0xc0000005).
    Click OK to close the application»

    Any ideas what might be the issue?

    TIA!

  • @Mojofarmer QtCreator 6 is based on Qt6 which does not support Windows 7 anymore.
    You will have to stay with QtCreator 5.
    Or, better, upgrade to a more recent Windows version, as Windows 7 reached end of life quite some time ago already.

  • Thanks a lot jslum!

    I’ll give Qt5 a try first, not too excited about having to upgrade my OS right now….

    Downloading qt-everywhere-src-5.15.2.zip from:
    https://download.qt.io/archive/qt/5.15/5.15.2/ should get me up and running just like qt-creator-opensource-windows-x86_64-6.0.0.exe would have, right?

  • @Mojofarmer Use the Qt online installer to install Qt and QtCreator offline installer from https://download.qt.io/official_releases/qtcreator/5.0/5.0.3/ to install QtCreator 5.

  • @jsulm Thanks a lot for your help jslum!

  • FWIW I’ve made a relevant FR asking for Win7 support in the online installer (essentially, asking to add QtCreator 5 back to the available component repos) at https://bugreports.qt.io/browse/QTBUG-100421.

    Also, if anybody’s looking, a full directory of older Creator versions can be found at https://download.qt.io/official_releases/qtcreator/ (there doesn’t seem to be a direct link to past versions on the main website).

    I had success with @jsulm’s suggestion; using the latest online installer (you can install the Qt5 toolchains with it still) and then separately installing Qt Creator 5 alongside it (in a different directory). It does leave the non-working Qt Creator 6 installed but it mostly doesn’t hurt anything, just takes up some extra drive space.

  • Thank you. I also got it working.

  • Just downloaded Qtcreator 8.1 from: https://download.qt.io/official_releases/qtcreator/8.0/8.0.1/
    the installation went fine but it fails at start:

    I installed an older version 8.0 but it shows the same error. I am on Windows 7 64-bit.

    asked Sep 30, 2022 at 20:23

    DaveJol2's user avatar

    1

    QT 6 does not support Windows7.

    answered Oct 25, 2022 at 14:58

    user20331622's user avatar

    1

    This is very interesting crash and I think it should be considered as Qt bug. This problem arise only under very special circumstances. But one after another.

    You will identify this problem when your application stopped/exited immediately after the start without any visible error message. It looks like the application isn’t executed at all. When you check application log (Computer -> manage -> Event viewer -> Windows logs -> Application), you will see Error logs:

    Windows applications logs

    The most interesting part of this log is crash location: ntdll.dll

    Faulting application name: Skipper.exe, version: 3.0.1.1120, time stamp: 0x53e9c8d7
    Faulting module name: ntdll.dll, version: 6.1.7601.18247, time stamp: 0x521ea8e7
    Exception code: 0xc0000005
    Fault offset: 0x0002e3be
    Faulting process id: 0x1c88
    Faulting application start time: 0x01cfb606553e594b
    Faulting application path: T:S2Skipper.exe
    Faulting module path: C:WindowsSysWOW64ntdll.dll
    Report Id: 98cc8228-21f9-11e4-ab5d-005056c00008
    

    At first sight it seems like some problem inside the windows. But the opposite is true, the problem (as almost always) is inside your app ;-).

    As the next step, you can try to debug this executable via Visual Studio to see what happens inside. Simply open executable as project together with .pdb files and execute it. Now you can see that application is correctly executed but crashes as soon as it touches Qt library. The location of crash is inside ntdll.dll in RtlHeapFree() function.

    Debuging crash in VisualStudio 2013

    So the problem is inside the Qt, right? Almost true, but not for the 100%. When I tried to run this application on computers of my colleagues, everything works ok. So why the application doesn’t work on my computer too?

    Resolution

    The problem is in new Qt5 plugin system. Besides the common Qt5*.dll files which are loaded immediately after the application start, Qt5 is also loading plugins/platform-plugins dynamically when the application is executed. To locate this plugins, Qt5 uses following method to identify directories where to search for plugins:

    QStringList QCoreApplication::libraryPaths()
    

    For some strange reason this library returns as first directory path where Qt5 libraries were compiled and after that location based on the executable. So if your Qt5 path is C:Qt5, this will be the first path where all plugins are searched for, no matter if the correct version of plugin is located in APPplugins or APPplatforms. I think this is serious bug in Qt5.

    Where is the problem?

    And here we’re getting to the core of the whole problem.

    If application is compiled on computer with one compiler and used on second  computer which contains the same path to which original computer has installed Qt, the application will load all plugins from your folder instead of itself folder.

    In case your computer will contain different version of Qt, different compiler or different platform, application loads incorrect libraries and crashes. Completely, silently and without easy way to determine what’s wrong.

    Solution?

    The solution is simple, but it isn’t achievable from outside of the Qt library. It would be necessary to Qt as first tried to load libraries from application directory. And only if no plugins were found in application directory, the application would try to search for plugins in Qt directory.

    Qt change solution

    The simplest way how to fix this issue inside the Qt library would be to rename/update appendApplicationPathToLibraryPaths  function to prependApplicationPathToLibraryPaths and change

    void QCoreApplicationPrivate::prependApplicationPathToLibraryPaths()
    {
    #ifndef QT_NO_LIBRARY
        QStringList *app_libpaths = coreappdata()->app_libpaths;
        if (!app_libpaths)
            coreappdata()->app_libpaths = app_libpaths = new QStringList;
        QString app_location = QCoreApplication::applicationFilePath();
        app_location.truncate(app_location.lastIndexOf(QLatin1Char('/')));
    #ifdef Q_OS_WINRT
        if (app_location.isEmpty())
            app_location.append(QLatin1Char('/'));
    #endif
        app_location = QDir(app_location).canonicalPath();
        if (QFile::exists(app_location) && !app_libpaths->contains(app_location))
            //CHANGE THIS ROW: app_libpaths->append(app_location);
            //TO FOLLOWING
            app_libpaths->prepend(app_location);
    #endif
    }
    

    InApp solution

    Unfortunately it isn’t possible to simply change this behavior from your app. All of these operations happen directly in QCoreApplication constructor so if you try to change it after, it’s too late.

    The temporary solution before this problem will be resolved is to reinitialize library paths before QCoreApplication is initialized. It’s necessary to clean libray paths, compute new paths and re-initialize QCoreApplication::libraryPaths before QCoreApplication object is initialized. This can be done in main.cpp of your application before you will create QApplication/QCoreApplication object.

      QString executable = argv[0];
      QString executablePath = executable.mid(0,executable.lastIndexOf("\"));
      QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath);
      QCoreApplication::removeLibraryPath(installPathPlugins);
      QCoreApplication::addLibraryPath(installPathPlugins);
      QCoreApplication::addLibraryPath(executablePath);
    

    It’s not a nice solution, but it works. I tried  to report this issue also to bugreports.QtProject, so maybe in later version this will be fixed.


    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    1

    25.09.2017, 14:14. Показов 6000. Ответов 15


    Студворк — интернет-сервис помощи студентам

    Здравствуйте. Собрал приложение Qt, закинул все недостающие dll,qt.conf итд. У меня на пк все работает хорошо, но на других машинах программа крашится при запуске. ошибка 0xc0000005.
    Я использовал MinGw.
    Подскажите пожалуйста — в чем может быть проблема?
    Спасибо!



    0



    184 / 176 / 57

    Регистрация: 25.09.2014

    Сообщений: 828

    25.09.2017, 18:03

    2

    Все, что угодно. Либо выводи в программе какой-то лог, либо пиши его в файл, либо там запускай IDE и программу в дебаг-режиме для проверки.



    1



    зомбяк

    1581 / 1215 / 345

    Регистрация: 14.05.2017

    Сообщений: 3,939

    25.09.2017, 18:40

    3

    либо отладчиком памяти ищи место, где программа обращается по неинициализированному адресу



    1



    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    25.09.2017, 20:12

     [ТС]

    4

    Мне кажется, что я не совсем корректно объяснил в чем суть моей проблемы — я написал программу в Qt. Через IDE Qt программа работает идеально, но ее цель — работать на пк, не имеющем установленной среды разработки Qt. Я собрал свой проект динамически и скопировал в траекторию сборки (release) недостающие dll. Таким образом программа запускается через .exe на моем пк и все работает. Но если я ту же самую папку с exe и dll копирую на второй пк, где нет Qt — то при запуске вылетает ошибка.



    0



    3434 / 2813 / 1249

    Регистрация: 29.01.2016

    Сообщений: 9,426

    25.09.2017, 21:15

    5

    Цитата
    Сообщение от Ofdeath
    Посмотреть сообщение

    У меня на пк все работает хорошо, но на других машинах программа крашится

    Чем отличаются другие машины от твоего ПК (кроме отсутствия Qt)?



    1



    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    25.09.2017, 21:18

     [ТС]

    6

    Абсолютно ни чем(по моему мнению). на моем ноутбуке установлена та же самая винда, что и на моем компе (она на триале сейчас). даже пакеты Visual C++ Redistributable установлены одинаковые.



    0



    3434 / 2813 / 1249

    Регистрация: 29.01.2016

    Сообщений: 9,426

    25.09.2017, 21:20

    7

    Цитата
    Сообщение от Ofdeath
    Посмотреть сообщение

    Через IDE Qt программа работает идеально

    Это не гарантирует, что в ней нет ошибок. Есть такое понятие — UB.

    Добавлено через 2 минуты

    Цитата
    Сообщение от Ofdeath
    Посмотреть сообщение

    даже пакеты Visual C++ Redistributable установлены одинаковые.

    Это здесь при чём? Ты же mingw собирал прогу?



    1



    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    25.09.2017, 21:23

     [ТС]

    8

    Да, собирал через mingw. я это просто к тому, что мои 2 компа, не считая железа — практически двойники.
    Мне просто кажется, что тут дело не в ошибке, а в том, что я какую-то dll не добавил (хотя все dll, которые программа в явном виде требовала в виде ошибок — добавлены)



    0



    3434 / 2813 / 1249

    Регистрация: 29.01.2016

    Сообщений: 9,426

    25.09.2017, 21:25

    9

    Цитата
    Сообщение от Ofdeath
    Посмотреть сообщение

    на моем ноутбуке установлена та же самая винда, что и на моем компе

    Какая?

    Добавлено через 1 минуту
    Выложи папку, которую пробуешь. Версия Qt какая?



    1



    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    25.09.2017, 21:42

     [ТС]

    10

    ОС — windows 7 домашняя расширенная.
    Qt

    Кликните здесь для просмотра всего текста

    Qt Creator 4.4.0
    Основан на Qt 5.9.1 (MSVC 2015, 32 бита)

    Собрано Sep 4 2017 в 04:09:56

    Ревизия 60b8712a42

    © 2008-2017 The Qt Company Ltd. Все права защищены.

    The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

    Ниже приложу и результат сборки(release) и сам проект(QtCustomPlos).



    0



    3434 / 2813 / 1249

    Регистрация: 29.01.2016

    Сообщений: 9,426

    25.09.2017, 21:45

    11

    Цитата
    Сообщение от Ofdeath
    Посмотреть сообщение

    Qt

    Это qt creator. Qt тоже 5.9.1?



    1



    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    25.09.2017, 22:08

     [ТС]

    12

    А как проверить? У меня что-то не получается найти…

    Добавлено через 3 минуты
    скорее всего да, 5.9.1.
    По крайней мере не считая папки QtCreator несколько раз нашел подобные директории:
    C:HOMEQtDocsQt-5.9.1



    0



    3434 / 2813 / 1249

    Регистрация: 29.01.2016

    Сообщений: 9,426

    25.09.2017, 23:31

    13

    Почитай:
    Запуск программы на другом компьютере не удается

    Добавлено через 4 минуты
    Причина может быть не в этом, но вижу, что, по описанию, папка platforms должна быть в папке plugins, у тебя не так.



    1



    19 / 17 / 6

    Регистрация: 09.01.2014

    Сообщений: 338

    26.09.2017, 01:05

     [ТС]

    14

    К сожалению, я брал эти dll из правильных каталогов и решение автора мне не поможет, но вскрылось еще кое что интересно:
    если я папку с экзешником запишу на флешку — он будет работать, но если я выну и снова вставлю флешку — то он работать перестанет ( с той же ошибкой, что и на ноуте). Фигня какая-то…
    П.С положение папки platforms вообще никак не влияет пока что. (хотя в мануале, по которому я изначально все делал, тоже сказали иметь директорию строго /plugins/platforms)

    Добавлено через 1 час 12 минут
    На данный момент я в абсолютном тупике…
    Сейчас решил попробовать по совету с зарубежного форума закинуть в папку с exe все dll из папки bin (из mingw).
    Программа сразу начала везде запускаться и я, соответственно, начал удалять по 1 dll чтобы свести их к минимальному количеству. И как вы думаете — какие dll остались в папке? Правильный ответ — ровно те, что я и закидывал по одному, основываясь на dependency walker. По сути вообще ничего не поменялось, но прога стала работать. Я вообще ума ни приложу — что за фигня…



    0



    34 / 36 / 17

    Регистрация: 16.04.2017

    Сообщений: 478

    Записей в блоге: 4

    26.09.2017, 14:26

    15

    Для корректного переброса не достаточно просто перенести dll.
    Используй windeployqt.
    Он соберёт всё,что нужно.



    0



    3434 / 2813 / 1249

    Регистрация: 29.01.2016

    Сообщений: 9,426

    27.09.2017, 06:14

    16

    Цитата
    Сообщение от Ofdeath
    Посмотреть сообщение

    Я вообще ума ни приложу — что за фигня…

    Всё-таки, у тебя .dll (qt-овские) не оттуда взяты. Меняю qt-овские .dll (в папке release: Qt5Core.dll, Qt5Gui.dll, Qt5PrintSupport.dll, Qt5Widgets.dll) на .dll из папки Qt5.9.15.9.1mingw53_32bin и программа запускается. Только папка platforms отдельно должна лежать, а не в папке plugins (как пишут). У тебя qt-овские .dll, скорее всего, взяты из папке bin qt creator (хотя — не факт, там другая ошибка при этом возникает). Ты qt creator отдельно ставил (В пакете с Qt 5.9.1 идёт qt creator 4.3.1, а у тебя 4.4.0)?



    0



    This topic has been deleted. Only users with topic management privileges can see it.

  • Hello,

    I am working on a GUI multi platform application with qt4.7.4, the structure of my application is decomposed as below:

    — mainapp (app)
    — model ==> (LIB)
    — view ==> (LIB)
    — controller==> (LIB)
    — qwt ==> (LIB)

    The program work and run normally on linux , but now i am trying to port it on Windows 7 (on windows i am using qt4.7.4 too with mingw),

    **when i try to build it on windows , there is no problem **, but when i try to run it i have the following message

    The program has unexpectedly finished.

    and when i try to debug it i have the following error

    During startup program exited with code 0xc0000005

    i don’t know why i am having that problem only in windows ?

    Do have any idea , is that related to qwt dll or any other dll ,do i have to add the dll to path system on windows ?

    Any suggestion for solving this problem is welcome !

  • if you use extra DLLs, try put them in build folder for test.
    If you run it from creator and uses no extra dlls its something else.

  • Hello mrjj,
    Thank’s for your reply,

    Actually i am running the application from qt creator, and the only extra dll that i use is qwt , i tried to put qwt.dll on the build folder but i still have the same problem, do you have any other suggestion?

    There is one intersting thing that i noticed , it’s that when i tried to build an old version of the project before using qwt and i can run it without any problem , i suppose then that the problem is from the dll of qwt but i don’t now how to detect it?

    Regards!

  • @mostefa
    ok. So it does sound like the dll.
    you could try with http://www.dependencywalker.com/
    and see if it list qwt as missing.
    (Run tool on your .exe in build folder)
    In that case put DLL somewhere in PATH
    and see if that helps.

    This dll , did you compile it your self?
    If possible , you could get qwt and compile a new DLL.
    Sometimes name mangling can give issues if program and DLL uses different compilers.

  • @mrjj

    Thank’s for your fast reply, indeed i am compiling my dll myself inside my project with the same compiler used for the whole project,

    But,when i use dependencywalker i can see (error opening file, invalid path) for the following dll:

    IEHIMS.DLL
    GPSVC.DLL
    DCOMP.DLL
    API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-L1-1-0.DLL
    API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
    API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL

    and i am thinking that the problem is related to x64 arch for my windows 7
    you can look here:

    http://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems

    but for the moment i don’t know how to solve it !

    don’t you have any idea?

  • @mostefa
    Hmm. I think you are right.
    Seems to be related to Visual studio «redistributable package.»
    But seems it can both be caused by having it installed and also not having it installed.
    You could try to install the correct version for your compiler.
    Should be part of VS install but some say its not.
    Did you try all in that thread?

  • @mrjj

    For the moment i didn’t try all what the thread suggest, because i don’t understand one thing ,

    If the problem is really from visual , so why any other application work fine without any problem? :s

  • @mostefa
    Yeah that is the odd part indeed. If it was from missing DLLs or something like that, it should also affect
    other apps.

    You could try to make program run from build folder and see that way if just sort of like
    Creator that wont work/start app with dll.

    You need to copy dlls ( d versions if debug build) from c:qtvs20XX folder to build folder.
    Also make a sub folder called platforms and copy from c:qtVS20xxplatforms folder

    Last time I had the following ( for Release build)

    29-06-2015 12:26 10.032.128 Qt5Guid.dll
    13-10-2015 21:56 4.617.728 Qt5Core.dll
    29-06-2015 12:25 4.862.976 Qt5Gui.dll
    29-06-2015 12:33 4.418.560 Qt5Widgets.dll
    15-10-2015 18:56 68.096 myplot.exe
    05-10-2013 02:38 455.328 msvcp120.dll
    21-10-2015 10:58 <DIR> platforms
    05-10-2013 02:38 970.912 msvcr120.dll

    Directory of E:testplatforms
    29-06-2015 12:36 991.232 qwindows.dll

  • The problem is solved,

    The problem was caused by the difference between Qt SDK compiler and application compiler !

    I recompiled the src of qt sdk with the compiler used to my program and now it work !
    thanx,

  • Quickshortcutmaker аккаунты гугл ошибка
  • Qt creator кодировка ошибок
  • Qsp код ошибки 105
  • Qscalp сделки ошибка заказа данных
  • Qgis vector too long ошибка