需要有关在qt c ++应用程序中使用崩溃问题的建议



我的Qt C++应用程序随机崩溃。我生成其崩溃日志并得到以下详细信息。

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./LaserModule_Debug...done.
warning: core file may not match specified executable file.
[New LWP 10616]
[New LWP 10624]
[New LWP 10625]
[New LWP 10626]
[New LWP 10631]
Core was generated by `/home/user/AA/Application'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x76576ade in ?? ()
[Current thread is 1 (LWP 10616)]
(gdb) 

我正在运行qt c ++应用程序并使用调试符号对其进行编译

CONFIG += c++14 debug link_pkgconfig

我从内核中获取了核心文件,并使用包含 GDB 符号的二进制文件运行此核心文件。

我的二进制文件包含 GDB 符号,但我无法从 gdb 日志中获得任何正确的点。

所以我认为我的应用程序使用任何共享库,并且该共享库中存在实际问题。

我下一步要找到这次崩溃是什么?

尝试运行以下代码:

class Scratch {
public static void main(String[] args) {
System.out.println("Hellorn".length());
}
}

另请参阅您对"Hello\r"长度为 5 的假设是不正确的。

最新更新