我正在尝试在 android 的本机应用程序中调试段错误。GDB 显示以下内容:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 5200]
0xbfcc6744 in ?? ()
(gdb) bt
#0 0xbfcc6744 in ?? ()
#1 0x5cfb5458 in WWMath::unProject (x=2.1136094475592566, y=472.2994384765625, z=0, mvpMatrix=@0x0,
viewport=@0x0, result=@0x0) at jni/src/core/util/WWMath.cpp:118
#2 0x00000000 in ?? ()
是否有可能获得良好的堆栈?或者找到堆栈损坏的地方?
UPD:提到的功能参考:
bool WWMath::unProject(double x, double y, double z, const Matrix &mvpMatrix,
const Rect& viewport, Vec4& result)
并且对简单局部变量的引用作为最后一个参数传递:
Vec4 far, near;
if (!unProject(x, y, 0, tMvp, viewport, near))