Qt application crashes immediately without debugging information. How to identify a problem?

I run the Qt application that I created:

./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 information.

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 ?? ()

Nothing again.

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 insert debugging symbols, it does not provide more useful information. ldd shows that all libraries are linked correctly.

Is there any other way to find out what happened? I can't even do standard debugging of printf, cout, etc. The executable does not even start at all.

I rebuilt with symbols and tried the sentence 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 one.

, printf, cout .. , , . .

+3
1

strace, , . , backtrace gdb?

0

Source: https://habr.com/ru/post/1722173/


All Articles