PDA

View Full Version : exited with code -1073741511



john_god
3rd December 2009, 01:17
I've upgraded to Qt 4.6, my app was compiling ok, but now crashes in release mode. In debug mode works. It shows "exited with code -1073741511". I try qt labs for a error code list, but didnt find it so I'm asking here. Does any one knows where to get it, or what this error is about ? Using Vista btw.

schnitzel
3rd December 2009, 06:25
is it possible you are not including a lib in release mode?

I have seen this when I forget to copy a dll into debug/release folder for testing.

Try running depends to see if it is related to a dll that can't be found, otherwise start commenting out code until you narrow it down.

john_god
4th December 2009, 05:10
It is a dll problem, it was looking for dll's in the system wich are from older versions, but it still crashes with dlls from current version. Very strange

schnitzel
4th December 2009, 16:28
have you tried deploying the app?

when you run an app debug vs. release, it will sometimes change the timing. Also check if objects get created on the stack vs. heap. I often make that mistake and things go out of scope before they get used. Timing can then make this kind of bug difficult to narrow down.

litter your code with debug prints and use debugView to see them in release mode (if you are on windows).

john_god
6th December 2009, 11:14
I put debug prints with qmessagebox::about(). It crashes in the main function even before entering the mainloop. I run it from explorer, it shows a message error related with invalid entry point in qtcore4.dll. This is usually if we're linking with the wrong version of the library. the problem is I disable qt path and already tried all 3 qtcore4.dll wich comes with qt, in the same file.exe directory. The problem persist, I was think it could a corrupted dll, but other project I have run fine in release. Perhaps I'll try reinstall qt, cause I running out of ideas.

schnitzel
6th December 2009, 20:41
try deploying your app (on a pc without Qt SDK installed) because then you can put all dll's into one folder and you know exactly which ones are being used.

john_god
6th December 2009, 22:52
I can do that, but dont know if it will help. Has in windows I believe that the fle.exe first search the currente directory for dll's, if it doesnt find it search in sistem dir or the path. I deleted Qt dir from path and qt dll's from system dir. The program complaigns of not having the dll's, them I copy the dlls to the current dir, and it says cannot find the entry point in some weird function. So I my opinion it's the same test has deploying it in another machine.
I just run it on linux and works fine in release and debug mode :confused:

schnitzel
7th December 2009, 05:08
Before you try to reinstall....
why don't you try to comment most of your code out especially whatever is in the constructor.
I would still suggest to use debug print otherwise you are depending on gui init.
Also, I have no idea on what other libraries your app depends on.

good luck

john_god
12th December 2009, 22:14
I just use opengl besides the basic gui dll's like qtcore.dll,... I created a empty project wich has the same problem so its not the code I think. Thanks for all the help schnitzel. I will reinstall qt but I'm work overloaded right now wich is preventing me from spending proper time to solve this issue

Zero_G
3rd April 2010, 22:12
John_God, I'm having exactly the same issue... I just installed the new 4.6 version and I cannot run any example from the Qt Demo window, nor from the Qt Creator in Release mode! :(
I checked out the PATH environment variable, but it already contains "C:\Qt\2010.02.1\qt\bin", I'm looking for other references to wrong Qt DLLs...

john_god
4th April 2010, 00:22
I solved this issue check this thread (http://www.qtcentre.org/threads/26604-Runtime-problem-in-Release-mode/page2) . Let me know if this helped :)

Zero_G
4th April 2010, 11:04
WOW, it worked, it was exactly that problem!! Now I can compile and run in Release mode and launch examples from Qt Demo interface.
Man, I owe you a beer... ;)

However, it's really strange that a so easily reproducible issue it is so scarcely documented in the Qt help... your fix should go into the FAQ section!

john_god
4th April 2010, 19:35
Glad it helped.:)


However, it's really strange that a so easily reproducible issue it is so scarcely documented in the Qt help..

In my opinion this more of a windows issue.
In early releases of my program Math Graphica (see my signature) I made the "mistake" of deploying
Qt dll's to windows system dir. No more of that, now I deploy in program file program directory.
No wonder they call it dll hell...:cool:

Chandra
7th November 2010, 09:01
I encountered the error -1073741511 after reinstalled Qt4 and Visual Studio 2010. Before reinstalling this error had never come up, and even after reinstalled the compiled program itself worked fine if it had QtCore4.dll and QtGui4.dll in the same folder with the compiled program.

After struggling, I solved this problem.

Qt remembers old settings. I just renamed the folder which contains the settings. Then Qt created new settings and now works fine.

The name of the folder is
C:\users\<USERNAME>\AppData\Roaming\Nokia for Vista
C:\Documents and Settings\<USERNAME>\Application Data\Nokia for XP

Just rename or delete this folder.:)

n0_0ne
28th December 2010, 16:58
I now got the same problem... this stupid Error -1073741511, which doesn't help finding the problem at all.

I was able to compile my programs with Qt Creator a few months ago, now I'm not even able to compile a tiny test program with an empty mainwindow, created by Qt Creator itself.

I have no idea what to do anymore, since I did everything which solved the problem for other users here. I deleted all the Qt-dlls in the windows/system directory, checked the environment-path for the right order and forced Qt Creator to renew its settings. Nothing helps...

The exact error message:
D:/Entwicklung/Qt/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/My Dropbox/Projects/QtCreator/test-build-desktop'
d:/Entwicklung/Qt/qt/bin/uic.exe ../test/mainwindow.ui -o ui_mainwindow.h
mingw32-make[1]: Leaving directory `D:/My Dropbox/Projects/QtCreator/test-build-desktop'
mingw32-make: Leaving directory `D:/My Dropbox/Projects/QtCreator/test-build-desktop'
mingw32-make[1]: *** [ui_mainwindow.h] Error -1073741511
mingw32-make: *** [debug] Error 2

It looks like the compiling step of the .ui file isn't working, since there is no ui_mainwindow.h after the error occured.

Does anyone know, where the problem could be?

squidge
28th December 2010, 18:13
From your error code, I would say that UIC isn't finding the correct version of Qt on the system, or some other DLL that it depends on. It *IS* finding a DLL, but not the one its expecting (eg. It may be finding a DLL compiled using GCC rather than Visual Studio, for example).

Check your PATH environment variable, and any variables starting with QT, such as QTDIR.

Delete any old object code or setting files.

The actual error message is "ENTRYPOINT_NOT_FOUND".

n0_0ne
28th December 2010, 19:18
I'm using gcc instead of VS. I'm not sure, which type of dlls the official SDK ships, since I already compiled some of my programs using Qt and gcc on this machine. So it should be the right ones.

I checked my PATH and other variables, I've only got one SDK of Qt installed, and everything is pointing to it. There shouldn't be any other dlls anymore. As I already said: It worked a few months ago.

Does anyone know, how to find out, which compiler was used to build a dll?

EDIT: ok, I searched for QtCore4.dll and actually it existed a few times on the system. Unfortunately MatLab, CodeAnalyst (by AMD) and MiKTeX all delivered their own dll files and they wrote themselves into the system PATH.

Perhaps the system PATH variable is being searched before the user PATH variable. I now copied all the directories from my user to the system variable and in front of all the other directories. *Now* everything should be correct, but it still isn't working :/

n0_0ne
29th December 2010, 15:05
BTW, what exactly is the build environment in Qt Creator, I can change the PATH variable for example. Is this some kind of local settings, one can have for different projects?

I just tested the uic.exe directly from the command line, and it worked?!

I really don't know, why it isn't working in Qt Creator... what does Qt Creator do different?

squidge
29th December 2010, 16:27
When you install Qt, you are installing two different version of the Qt DLLs. QtCreator and friends requires one version, whilst applications you build use another version.

CD to the directory of UIC and run it from there to see if it works.

n0_0ne
29th December 2010, 18:21
CD to the directory of UIC and run it from there to see if it works.

That's what I meant by saying, I tested it directly from the command line. It worked, but when it's done automatically by Qt Creator, it fails.
I still don't understand why... I opened uic.exe in Qt/qt/bin with DependencyWalker, to see what dlls it is using. It doesn't rely on many dlls.

KERNEL32.dll, MSVCRT.dll, USER32.dll in system32; LIBGCC_S_DW2-1.dll in Qt/qt/bin (where uic.exe is, too), and LIBSTDC++-6.dll from my MinGW directory.

The systems PATH variable looks like the following:

%SystemRoot%;
%SystemRoot%\System32;
D:\Entwicklung\Qt\qt\bin;
D:\Entwicklung\MinGW\bin;
D:\Entwicklung\Qt\bin;
D:\Entwicklung\MinGW\msys\1.0\bin;
...
...
...

My users PATH variable is empty and I didn't change anything in Qt's project build environment.

So, if uic.exe is working with the dlls, I've written above why doesn't it in Qt Creator? Since I adjusted the PATH to search in the correct directories first, Qt Creator should use the same dlls, as when it's called directly...

squidge
29th December 2010, 19:24
To check your PATH variable is correct, CD to the root of any drive and try it from there. If it does, it should work from within Qt Creator also. Maybe it finds an incompatible version of LIBGCC.

n0_0ne
29th December 2010, 22:00
I can compile files with uic at the command line, from every directory :/ Something must be wrong with Qt Creator...

n0_0ne
1st January 2011, 17:56
I'm working with NetBeans now. Its Qt-Project is also able to automatically compile the ui files etc. I liked the single .pro file to include libraries etc. more than NetBeans project settings to do the same job, but since Qt Creator isn't working, it's still a nice alternative.

Vavinyan
13th June 2011, 15:18
"exited with code -1073741819" this code about realizing not correct destructors. If there is one or more objects created in the constructor or in another function and in the 3-th function objects are deleted incorrectly sequence then this code are occured