gdb terminated while debugging qmake - qt

I'm debugging qmake in Qt Creator using Debug/Start Debugging/Start and Debug External Application... . It can break at the main function. I can step into the runQMake function. Then when I pressed F10 to step to the next line, gdb terminated. The messages in the debug log window when GDB terminated are:
Step next requested...
<36-exec-next
dHANDLE GDB ERROR: The process was ended forcefully.
dProcess crashed
dGDB PROCESS FINISHED, status 1, exit code -1073741819
dNOTE: INFERIOR ILL
dState changed from InferiorRunRequested(7) to InferiorRunFailed(9)
dState changed from InferiorRunFailed(9) to InferiorStopOk(11)
dState changed from InferiorStopOk(11) to InferiorShutdownRequested(13)
dCALL: SHUTDOWN INFERIOR
dRUNNING NEEDS-STOP COMMAND kill
dUNSAFE STATE FOR QUEUED COMMAND. EXECUTING IMMEDIATELY
<37kill
My compiler is Mingw, gdb version 8.1, Qt creator 5.12. Can anybody shed light on this problem? What could cause this problem? BTW, why cannot I see the first character("d") of every line of the log messages in the debug log window but the character is there when I copy and paste the messages here? Thanks!

Related

Why does sbt exit while executing tests with no errors?

I've been using SBT to run unit tests on my code, and made some changes recently that have caused the tests to start acting weird.
None of the tests that I have seen fail, but when running the tests with sbt, it just stops in the middle and closes without giving an error message. There are no failed tests in the output.
Does anyone know why this might happen, or how I could figure out what the problem is?
Thanks to the comment by #johanandren, I managed to nail it down to an exception that was being thrown by forcing sbt to fork the tests in a new process. The exception was a java.io.EOFException disguised as an sbt out of memory error -- java.lang.OutOfMemoryError: PermGen space -- and increasing it using the -XX:MaxPermSize argument in the SBT_OPTS environment variable as described in SBT runs out of memory helped fix that issue.

Release does not run. This application failed to start

My application works when it built in debug mode. But it does not run in release.
This application failed to start because it could not find or load the
Qt platform plugin "windows".
Reinstalling the application may fix this problem.
I copied dlls which the application required. I copied also qwindows.dll, qoffscreen.dll and libEGL.dll.
But libEGL.dll located in C:\qt\5.3\msvc2013\bin and `C:Qt\ToolsQtCreator\bin'. I compiled my application by msvc-11.0(2012).
--
I put platforms folder to exe directory and now application runs but crashes immediately in ntdll.dll!771e56bc()
Now my problem is similar to this one Why is ntdll.dll crashing my c++ executable?.
Can I make debug working like release but save debug mode?
--
Here is Application Verifier result for release mode. It does not happen for debug.
=======================================
VERIFIER STOP 00000006: pid 0xDF0: Corrupted heap pointer or using wrong heap.
00161000 : Heap handle used in the call.
093F8FF8 : Heap block involved in the operation.
00000004 : Size of the heap block.
06441000 : Heap where block was originally allocated.
=======================================
This verifier stop is not continuable. Process will be terminated
when you use the `go' debugger command.
=======================================
MyApp.exe has triggered a breakpoint.
AVRF: Noncontinuable verifier stop 00000006 encountered. Terminating process ...
The thread 0x1724 has exited with code -1073740767 (0xc0000421).
The program '[3568] MyApp.exe' has exited with code -1073740767 (0xc0000421).
--
Here is a top of a call stack
vrfcore.dll!6ae43466() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for vrfcore.dll]
[External Code]
qwindows.dll!0f0642cb() Unknown
qwindows.dll!0f065f8a() Unknown
qwindows.dll!0f0662bb() Unknown
Qt5Gui.dll!0f774cf3() Unknown
Qt5Gui.dll!0f774e75() Unknown
Qt5Gui.dll!0f7778d5() Unknown
But libEGL.dll located in C:\qt\5.3\msvc2013\bin and `C:Qt\ToolsQtCreator\bin'
You must not take any DLLs from C:\Qt\Tools\QtCreator\ -- these are private DLLs for Qt Creator, and they are incompatible with your application.
Only take DLLs from C:\Qt\5.3\msvc2013\bin and C:\Qt\5.3\msvc2013\plugins. Here is the required folder structure:
(source: http://qt-project.org/wiki/Deploy_an_Application_on_Windows )
This sounds like either a DLL is missing or the application expects it in a different path.
a) Use the Dependency Walker on your release build executable to check whether all DLL dependencies can be resolved.
b) Make sure that your platform plugin files are at the right location. I think they need to be in a folder called "platforms" (not absolutely sure though).
c) There is a post in the Qt forum about a similar problem. Maybe this helps you to track it down.

Meteor 0.5.0 examples not running on Windows

Fresh install of Meteor 0.5.0 on Windows Vista. I don't get the basic examples working. No success after creating the empty'ish hello app either. The shell is running as admin. Meteor recognises that I changed a source file, but then nothing. It doesn't matter where in the filesystem i try this. Always getting
Exited with code: -1073741819:
eg
C:\Users\jawford\Meteor Apps\Examples>meteor create starter3
starter3: created.
To run your new app:
cd starter3
meteor
C:\Users\jawford\Meteor Apps\Examples>cd starter3
C:\Users\jawford\Meteor Apps\Examples\starter3>meteor
[[[[[ C:\Users\jawford\Meteor Apps\Examples\starter3 ]]]]]
Running on: http://localhost:3000/
Exited with code: -1073741819
Exited with code: -1073741819
Exited with code: -1073741819
Your application is crashing. Waiting for file change.
=> Modified -- restarting.
Exited with code: -1073741819
Exited with code: -1073741819
Exited with code: -1073741819
Your application is crashing. Waiting for file change.
^CTerminate batch job (Y/N)? y
C:\Users\jawford\Meteor Apps\Examples\starter3>
If you run into this problem using Windows 8, you will need to change compatibility mode for the node executable.
Go to the folder where you installed Meteor
Open properties for bin/node.exe
Set compatibility mode for Windows 7
You should now be able to start the application as you did earlier.
This has to do with Fibers not loading correctly. You can attempt to run app/meteor/meteor.js with bin/node, both are in the Meteor directory in Program Files. This could maybe give you more details why it is crashing. It might also be handy to run the tests in the lib/node_modules/fibers folder which might point out why Fibers is misbehaving.
The exit code -1073741819 corresponds to C0000005 which indicates an access violation.
Many users find that setting compatibility mode to "Windows 7" solves that problem, but it doesn't always and there is some evidence that it also occurs on Windows 7.
Investigating a later issue on win Meteor 0.5.9, I discovered a problem with fibers on windows that may explain this issue, and I have a tentative fix.
Please see: https://github.com/TomWij/meteor/issues/66#issuecomment-15994548 for further details.

QT : Exited with saying " During startup program exited with code 127"

I Had a Qt program which was working fine in Linux . We migrated our linux from 32bit to 64 bit and while trying to run the same program again throws me a error given below
"During Startup program exited with code 127"
In the Output window I also see the following:
&"warning: GDB: Failed to set controlling terminal: Invalid
argument\n" &"Cannor exec /bin/tcsh: No such file or directory.\n"
does anyone have any idea on this error??
A Thread in QtCentre has the same problem solved.
Look at here
Hope that helps...

Qt application crashing immediately without debugging info. How do I track down the problem?

I run an Qt app I've built:
./App
Segmentation fault
I run it with strace:
strace ./App
execve("./App", ["./App"], [/* 27 vars */]) = 0
--- SIGSEGV (Segmentation fault) # 0 (0) ---
+++ killed by SIGSEGV +++
Process 868 detached
Again, no useful info.
I run it with gdb:
(gdb) run
Starting program: /root/test/App
Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
Loaded system supplied DSO at 0xffffe000
Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
Again, nothing.
I run it with valgrind:
==948== Process terminating with default action of signal 11 (SIGSEGV)
==948== Bad permissions for mapped region at address 0x0
==948== at 0x1: (within /root/test/App)
Even if I put in debugging symbols, it doesn't give any more useful info. ldd shows all libraries being linked properly.
Is there any other way I can find out what's wrong? I can't even do standard printf, cout, etc debugging. The executable doesn't even seem to start running at all.
I rebuilt with symbols, and tried the suggestion below
(gdb) break main
Breakpoint 1 at 0x45470
(gdb) run
Starting program: /root/test/App
Breakpoint 1 at 0x80045470
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
I checked for static initializers and I don't seem to have any.
Yep, I tried printf, cout, etc. It doesn't even make it into the main routine, so I'm looking for problems with static initializers in link libraries, adding them in one-by-one. I'm not getting any stack traces either.
Try running it through strace, it might give you at least some hints what happens before the program crashes. Also, does a backtrace in gdb not work?

Resources