2

when using QtCreator on Windows, I go from the toolbar to Analyze -> Valgrind Memory Analyzer (External) and it opens up a dialogue where it has a drop-down where I select a kit and 3 fields:

Executable, Arguments and Working Directory.

In Executable I enter the directory of my program's .exe. However nothing happens, I see a full red loading bar at the bottom right and then nothing happens. I tried without the .exe extension, I tried different slashes in the directory, but to no avail.

All the instructions I found on internet simply state that I have to input the .exe in that field. What exactly must I input?

EDIT:

Ok now I realize Valgrind can't be used on Windows, however I can also run the project on Linux. I downloaded the Valgrind packages and I have the binary file in usr/bin as it should be.

The question remains: What exactly do I enter in Executable: ?

EDIT 2:

Entering the absolute directory doesn't seem to change that it wants some private key. I have the valgrind package and all of its dependencies installed.

EDIT 3:

Here is what I mean:

enter image description here

What do I enter at Executable: ? Entering the path to my app doesn't change things.

Community
  • 1
  • 1
ulak blade
  • 2,515
  • 5
  • 37
  • 81
  • 2
    exe required is `valgrind.exe`. The problem is that there is no valgrind port for Windows =( You might be interested in [alternatives](http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows) – Ivan Aksamentov - Drop Dec 15 '15 at 14:55
  • Also see: [Profiling and Memory Checking Tools](https://wiki.qt.io/Profiling_and_Memory_Checking_Tools). – agold Dec 15 '15 at 14:58
  • @Drop wait, .exe on Linux? My project is cross-platform and I can run it on Linux as well, however it tells me: `Analyzing memory of valgrind.exe Error: "valgrind" could not be started: No private key file given. Analyzing finished.` I think it wants the app it's going to analyze. And some private key, what is that about? – ulak blade Dec 15 '15 at 15:17
  • 1
    I thought you are trying to run analysis on Windows. And yes, on this stage it wants program. My bad. Strange that you have `.exe` on Linux though. – Ivan Aksamentov - Drop Dec 15 '15 at 15:24
  • @Drop I updated the question with new details, all that's left is to find out exactly what to input in Executable – ulak blade Dec 15 '15 at 15:27
  • 1
    In linux you can just enter `valgrind` since `/usr/bin/valgrind` is in the path (also accessible through: Options > Analyzer > Valgrind executable). – agold Dec 15 '15 at 15:33
  • @agold I added a picture, this is what it asks of me. The valgrind executable path itself is juts `valgrind` in the options. I also tried `/usr/bin/valgrind` to no avail – ulak blade Dec 15 '15 at 15:46
  • 1
    You should put the path to the compiled application, but it needs to be compiled in Debug mode, since then the executable contains meta data required by Valgrind. – agold Dec 15 '15 at 15:56
  • @agold yes, I added the absolute path, but it still gives me the `No private key file given. Analyzing finished` error. Do I need some special registration or something? Private key implies a secure connection? – ulak blade Dec 15 '15 at 15:59
  • 1
    It seems to be a [bug](https://bugs.launchpad.net/ubuntu/+source/qtcreator-plugin-ubuntu/+bug/1337424) of qtcreator-plugin-ubuntu, but it should be solved now. Have you updated your Qt (Creator)? – agold Dec 15 '15 at 16:06
  • @agold yes that fixed it!, that's the answer, thanks! – ulak blade Dec 15 '15 at 16:20
  • @agold "but it needs to be compiled in Debug mode, since then the executable contains meta data required by Valgrind”. That doesn’t make always sense, for example when debugging a release-only crash/memory corruption or when using callgrind for profiling (as one should always profile release builds) – Frank Osterfeld Dec 15 '15 at 17:05
  • @FrankOsterfeld: You are right, but to be more specific: in the debug mode Qt compiles with `-g`, which includes "debugging information so that Memcheck's error messages include exact line numbers" (see the [Valgrind Quick Start Guide](http://valgrind.org/docs/manual/quick-start.html)). – agold Dec 15 '15 at 17:24

0 Answers0