Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354111

Summary: Valgrind Preference Page makes other pages unusable when in error state
Product: [Tools] Linux Tools Reporter: Martin Oberhuber <mober.at+eclipse>
Component: ValgrindAssignee: Elliott Baron <ebaron>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: overholt, wbprio
Version: 0.8.0   
Target Milestone: 0.8.1   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Martin Oberhuber CLA 2011-08-08 04:57:29 EDT
Build ID: Valgrind 0.7.0.201106060936 (==Indigo ==Linuxtools 0.8.0)
Host: Fedora 13 x86_64

When I look at the Valgrind Preference Page without valgrind installed, the "Location of Valgrind binary" box is empty. Now bring up any other Preference page - no error is displayed. But when I now try to change a setting (eg on the General page, switch on the Heap Status display) an Error Dialog is shown making it impossible to press OK (see attached).

This is a severe issue because as an end user, I have no idea that the error is due to the Valgrind page which isn't displayed at the moment. It's also severe for us since we need to be able to ship a product with the valgrind plugins installed, and end users must be able to use that product even when valgrind is not installed on the host.

Steps to Reproduce even if valgrind is installed on the host:
1. Bring up the Valgrind Preference Page
2. Clear the "Path to Valgrind" Field
3. Switch to the "General" Preference page _without pressing apply_
4. Change any Preference eg Heap Status
5. Press OK
--> Error message is shown from Valgrind page

I think the problem is that the Valgrind Preference page doesn't implement the Apply logic properly.
Comment 1 Elliott Baron CLA 2011-08-08 17:07:00 EDT
I have fixed the error handling in the preference page so it matches the behaviour of other pages. If an invalid path is given, an error message is set in the dialog and will not navigate away from the page until fixed.

To allow for the use case where Valgrind is not installed, I have added an option to disable Valgrind integration in the preference page. If Valgrind is not installed in your path, this option should be selected by default. This will disregard any value in the location text field, and will inform the user that Valgrind has been disabled if they try to launch with Valgrind.
Comment 2 Andrew Overholt CLA 2011-08-08 17:19:59 EDT
Should we consider this for 0.8.1, Elliott?
Comment 3 Elliott Baron CLA 2011-08-08 17:59:21 EDT
Yes, it's been ported over to the 0.8 branch already.