我使用的是配备 NVIDIA GM107 GeForce GTX 750 Ti 显卡的 Core i7 PC,运行 Linux Mint 18.3。
在 Qt Creator 4.10.1 中运行空白的“Qt Widgets 应用程序”项目时,“Valgrind 内存分析器”崩溃,并显示“外部错误”消息:
286,959 bytes in 1 blocks are possibly lost in loss record 78 of 78
in calloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
1: calloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
2: /usr/lib/nvidia-384/libGL.so.384.130
3: /usr/lib/nvidia-384/libnvidia-glcore.so.384.130
4: /usr/lib/nvidia-384/libnvidia-glcore.so.384.130
5: /usr/lib/nvidia-384/libGL.so.384.130
6: /usr/lib/nvidia-384/libGL.so.384.130
7: /usr/lib/nvidia-384/libGL.so.384.130
8: call_init.part.0 in /build/glibc-LK5gWL/glibc-2.23/elf/dl-init.c:58
9: call_init in /build/glibc-LK5gWL/glibc-2.23/elf/dl-init.c:30
10: _dl_init in /build/glibc-LK5gWL/glibc-2.23/elf/dl-init.c:120
11: /lib/x86_64-linux-gnu/ld-2.23.so
这是运行日志:
19:17:40: valgrind --child-silent-after-fork=yes --xml-
socket=127.0.0.1:41595 --log-socket=127.0.0.1:37293 --xml=yes --smc-
check=stack --tool=memcheck --gen-suppressions=all --track-origins=yes
--leak-check=summary --num-callers=25 /home/daniel/Documents/QtNew/build-
TestWidgets-Desktop_Qt_5_12_5_GCC_64bit-Debug/TestWidgets
19:17:44: The program has unexpectedly finished.
19:17:44: Process exited with return value Process crashed
19:17:44: Analyzing finished.
如果我正常运行程序,即没有 Valgrind,我不会收到任何警告/错误。
更新
我将 Valgrind 从源代码升级到版本“3.15.0”,崩溃问题消失了。