Error -1073741819
-
-
Is that your code or Qt code?
I guess it's Qt code? If so, please go backwards in the call stack, starting from the function where it crashed, up to the last function that was still in your code. That would be the place to have a look...
(That's because, most likely, the problem is not in the Qt code where it finally crashed, but in your code that passed wrong/invalid arguments to some Qt function or that tried to call a method on an uninitialized Qt object)
-
[quote author="dwsld" date="1363506638"]I can`t even debug it.[/quote]
Why ???
--
[quote author="dwsld" date="1363506638"]Yes it is Qt code.[/quote]
As said before, just because it crashed in Qt code, this does not necessarily mean the reason for the crash is in Qt code too. Actually, it is more likely that the reason for the crash is in your own code.
For example, if you call a Qt function that takes a pointer to an object of some type, but you pass a NULL pointer (maybe accidentally), then the app will crash in the Qt function - at the place where it tries to dereference the pointer you have passed. So it did crash in Qt code. But the problem that caused the crash, obviously, is in not the Qt code! It is in your code. You never should have passed a NULL pointer where a pointer to an object was required. There are of course many more examples how you can make Qt code crash by using it wrongly...
--
[quote author="dwsld" date="1363506638"]I think that i have not configure the Qt right .Is there a step by step method?[/quote]
What exactly do you mean with "not configure the Qt right"?
Did you build Qt yourself or do you use the pr-compiled Qt libraries?
Think you didn't even mention which platform you are on...
-
Windows 7.I have downloaded this:http://releases.qt-project.org/qt5/5.0.1/qt-windows-opensource-5.0.1-mingw47_32-x86-offline.exe
-
So you did not configure + build Qt yourself, but just use the pre-compiled DLL's, right?
If so, I don't see how you could have configured is wrongly, as you never did (or needed to) configure it.
BTW: Did you read all of my above post(s), especially the part about the stack trace ???
-
[quote author="dwsld" date="1363518510"]How to get the stack trace?[/quote]
That depends on the IDE/Debugger you use, of course.
But if you run a Debug build, inside a Debugger, and then a "crash" occurs, the Debugger will usually trigger a break and then show you where it crashed, including a complete stack trace...
--
Should look like this:
http://i.imgur.com/YNSYMVi.jpgFrom the call stack in this very simple example we can see that it crashed in the fclose() function, from C++ runtime library. But if we go up in the stack trace (only one step in this example), we see that the call came from someFunction() in my own code. And that's exactly where we'll find the actual reason for the crash...
-
-
[quote author="dwsld" date="1363522510"]http://postimage.org/image/lypykxatz/[/quote]
So what happens in the "main_win.cpp" at line 131, which I guess is the only code of yours? -
Okay, let's call it the "application" code then. As opposed to the Qt "library" code. Better ???
If so, would you be so kind and show us the "problematic" application code, i.e. the last line/call in the application code that is executed, before it goes into the Qt library code and eventually crashes there?
-
Crash before the reaching the "main" function? That would indicate there is something seriously wrong with your build environment, probably not related to Qt all. But very hard to diagnose from here...
BTW: Are you really 100% sure that, after you "deleted everything", you re-compiled the program, it successfully compiled (i.e. a new EXE file has been created) and you executed the new EXE file?
--
Also, what you describe now, is inconsistent with the stack trace you posted earlier, because there it obviously did reach the WinMain function. It even executed some code in "main_win.cpp", before it crashed...
-
Hard to diagnose from here. But I would suggest: Create a very simple "hello world" program from the scratch. Do not add any Qt specific code or includes at all. Just keep it as simple as possible. If even that doesn't work, then I'd completely un-install the build environment and setup a new "clean" build environment...
-
Well the problem is in rasterwindow.h
because when I compile this:
@#include <iostream>using namespace std;
int main(int argc, char **argv)
{cout << "aa";
return 0;
}
@
there is no problem but when i compile this :
@
#include <iostream>
#include <rasterwindow.h>
using namespace std;
int main(int argc, char **argv)
{cout << "aa";
return 0;
}@
The error occurs. -
Well, "rasterwindow.h" is not a standard Qt library header file, I think.
It's probably a file from one of the various Qt example programs. If so, and if including that file alone triggers your problem, you should look into that file and see what it actually is doing. Then, try to strip it down until you have found what exactly causes the problem.
Once again: If you encounter crashes, the stack trace probably is your best tool to get answers...