0

I am using a Core i7 PC with NVIDIA GM107 GeForce GTX 750 Ti video card running Linux Mint 18.3.

"Valgrind Memory Analyzer" crashes when running a blank "Qt Widgets Application" project in Qt Creator 4.10.1 with the "external error" message:

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

Here's the run log:

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.

I don't get any warning / error if I run the program normally i.e. without Valgrind.

Update

I upgraded Valgrind from source to version "3.15.0" and the crash problem went away.

6
  • 1
    Seems to me like it's not Valgrind crashing, but your app. And yes, there are a lot of cases when a program runs normally without Valgrind but crashes with it. Commented Oct 28, 2019 at 11:40
  • Oh, but how can I investigate the problem when there's no other warning / error to go by? Commented Oct 28, 2019 at 11:44
  • 1
    I'm not well versed with QtCreator, but you can run Valgrind manually : valgrind -vvv --tool=memcheck /home/daniel/Documents/QtNew/build- TestWidgets-Desktop_Qt_5_12_5_GCC_64bit-Debug/TestWidgets . More information cand be found here : valgrind.org/docs/manual/manual-core.html Commented Oct 28, 2019 at 13:09
  • I ran Valgrind in a terminal window and updated my question. Commented Oct 28, 2019 at 13:26
  • Not an expert in Qt development either, but I say recompile your code with debug symbols, run it through gdb and that, with the output you just posted, might make sense. Remember that Valgrind is used to find memory faults in programs (not only, but mainly), and it doesn't make for a debugger substitute. Commented Oct 28, 2019 at 13:34

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.