c++ - 需要建议来查找 qt c++ 应用程序中的崩溃问题

标签 c++ qt

我的 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("Hello\r\n".length());
  }
}

太看到你关于“Hello\r\n”长度为 5 的假设是不正确的。

关于c++ - 需要建议来查找 qt c++ 应用程序中的崩溃问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58371111/

相关文章:

c++ - Visual Studio : how to control specific configuration parameters on student PCs?

c++ - Qt + VTK + Cmake

c++ - 当子进程不刷新其标准输出时如何从子进程读取标准输出?

c++ - Ofstream 拒绝带参数的输入

c++ - QTcpSocket 和多个客户端(信号问题)

c++ - CMake 和 Qt5 : Using different components of Qt5 in different subdirectories

python - 使用 Django 减去 Web 服务器

c++ - 如何使用 qDebug 打印字符串文字和 QString?

c++ - 删除目录的功能仅在调试完成后将其删除 C++

C++ 在对象指针数组上使用选择排序算法