C++ 需要有关在qt c和x2B中处理碰撞问题的建议+;应用

C++ 需要有关在qt c和x2B中处理碰撞问题的建议+;应用,c++,qt,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 fr

我的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) 
我从内核中获取了核心文件,并使用包含GDB符号的二进制文件运行这个核心文件

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

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


查找此崩溃的下一步是什么?尝试运行以下代码:

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

也请参见您关于“Hello\r\n”长度为5的假设不正确。

您的假设不正确<代码>System.out.println(“Hello\r\n.length())输出
7
。完全像
printf(“%lu\n”,strlen(“Hello\r\n”))尼特:应该是
%zu
@Elliott Frisch
class Scratch {
  public static void main(String[] args) {
    System.out.println("Hello\r\n".length());
  }
}