Why does Valgrind show me over a 1000 errors related to Qt header files?
-
I have created my first application and the functionality is great so far, apart from that it crashes occasionally. So after settings up Qt Creator for Valgrind, I ran it and it shows me over a 1000 errors.
Here is a small excerpt of the log
What puzzles me is that these errors seem to be related to Qt libraries. I use Qt 5.15.1 because the cross-compilation guide I found the Raspberry Pi was for this version. I know it is a bit old, but could it be that it is buggy?
-
Hi,
It's not that old although you should rather use 5.15.2.
That said, you should create a suppression file so you can concentrate on your project.
Note that Qt Creator already has support for Valgrind although I do not know whether it does the suppression automatically.
-
@SGaist Thanks, unfortunately the scripts for parsing the suppression that he mentions, doesn't work.
EDIT: Well, it doesn't work on the Pi, but on my laptop it does. Will have to look into this further and create some wildcards I guess. Why isn't there an easy way to suppress Qt libararies in Qt Creator?
-
@coldspark29 said in Why does Valgrind show me over a 1000 errors related to Qt header files?:
Why isn't there an easy way to suppress Qt libararies in Qt Creator?
Because it's valgrind which spills out the errors, not QtCreator.
Every valgrind version also might complain about different stuff - who should maintain this (and why)? -
@Christian-Ehrlicher I guess that is a valid point. Pity that the suppression file doesn't work.
-
@coldspark29
One thing you should ensure you have. (Assuming you are using the Memcheck valgrind.) There is a "filter" icon just above where Creator shows valgrind's output. Make sure you have checked the box to filter out external errors (I think it is unchecked by default). Under Ubuntu at least I get 34 external errors always, this removes them so that I do not get anything spurious. Worth a try at least in your situation. -
@JonB Thanks, I will try that. But at the moment I can't even run the app, because I tried upgrading to 5.15.2.