gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 21:41:25 28 4
gpt4 key购买 nike

我的 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com