Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360950 - When open the preference page of valgrind on windows host, the whole eclipse will hang.
Summary: When open the preference page of valgrind on windows host, the whole eclipse ...
Status: RESOLVED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: Valgrind (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 0.9.0   Edit
Assignee: Jeff Johnston CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-14 08:02 EDT by Ryan Xu CLA
Modified: 2012-01-24 14:21 EST (History)
4 users (show)

See Also:


Attachments
patch (1.18 KB, patch)
2011-10-14 08:20 EDT, Ryan Xu CLA
jjohnstn: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Xu CLA 2011-10-14 08:02:19 EDT
Build Identifier: 20110615-0604

For the remote launch case , we may deploy the valgrind plugin on the none-unix like operation system like window. But on these host ,there is no "which" command is available.

The ValgrindPlugin will try to initial the default preference store with the valgrind path, and it will use the "which" command to find it. This action will cause the eclipse hangs.

Reproducible: Always

Steps to Reproduce:
1.install the valgrind plugin on windows host.
2.open Window -> Preferences ->valgrind
3.The eclipse hang and no response.
Comment 1 Ryan Xu CLA 2011-10-14 08:20:24 EDT
Created attachment 205188 [details]
patch
Comment 2 Martin Oberhuber CLA 2011-10-14 11:22:51 EDT
Comment on attachment 205188 [details]
patch

Ryan, can you please add a legal statement here on bugzilla certifying that you wrote the patch yourself, contribute under the EPL and have the right to do so.

See my legal message on bug 360085 comment 7 as a template.

Without such a message by today, the Linuxtools team cannot integrate your patch into 0.9.0.
Comment 3 Martin Oberhuber CLA 2011-10-14 11:35:46 EDT
CQ:WIND00311696

I think the problem is severe because regardless of whether an end user actually plans to use valgrind or not, just by opening the Preference page all of Eclipse hangs which may cause loss of data and thus qualifies for a "critical" issue.

I'm not sure if the attached patch is the best way addressing this (I'd personally avoid running the "which" command at all and use CDT's

   org.eclipse.cdt.utils.PathUtil#findProgramLocation(String)

instead, which works on all Platforms without executing an external tool. And 
valgrind.core (which hosts ValgrindCommand) has a dependency onto org.eclipse.cdt.utils package already.
Comment 4 Andrew Overholt CLA 2011-10-16 15:32:27 EDT
1. Is the Valgrind feature available on win32?
2. Francois, did this get into the IP log you submitted?
Comment 5 Francois Chouinard CLA 2011-10-16 20:50:33 EDT
(In reply to comment #4)
> 1. Is the Valgrind feature available on win32?
> 2. Francois, did this get into the IP log you submitted?

It's not in the IP log but it hasn't been submitted it yet (issue with the tool).
Comment 6 Ryan Xu CLA 2011-10-17 03:47:25 EDT
Legal Message: I, Ryan Xu, declare that I developed attached code
from scratch, without referencing any 3rd party materials except material
licensed under the EPL. {I am authorized by my employer to make this
contribution under the EPL.}
Comment 7 Martin Oberhuber CLA 2011-10-17 06:09:36 EDT
(In reply to comment #4)
> 1. Is the Valgrind feature available on win32?

Today, the "org.eclipse.linuxtools.valgrind" feature.xml has this:
      os="linux,macosx"
So it's not possible to install it on Windows using p2.

But respective plugins don't have any host restriction, they can be installed on Windows using the dropins mechanism, and and they do actually work fine on Windows. 

So looking at upcoming "remote valgrind" scenarios, I think this should be addressed; but I'm going to change the severity from "critical" to enhancement given that win32 apparently isn't a supported platform today.
Comment 8 Andrew Overholt CLA 2011-10-17 09:15:42 EDT
Jeff, please get this applied today.

Francois, please wait to submit the IP log until Jeff has done this.

Thanks to all.
Comment 9 Jeff Johnston CLA 2011-10-17 12:52:55 EDT
Comment on attachment 205188 [details]
patch

Less than 250 lines.
Comment 10 Jeff Johnston CLA 2011-10-17 12:53:19 EDT
Patch applied.
Comment 11 Martin Oberhuber CLA 2012-01-24 05:52:58 EST
Target milestone was empty, but AFAIK this went into 0.9.0
Comment 12 Andrew Overholt CLA 2012-01-24 09:36:50 EST
This was committed in 0de31589c9c85cebfed0bff2a2b89a15d1106838.

In the future, Jeff, please put the SHA-1 of the commit when you close bugs with contributions.  Thanks.
Comment 13 Jeff Johnston CLA 2012-01-24 14:21:53 EST
(In reply to comment #12)
> This was committed in 0de31589c9c85cebfed0bff2a2b89a15d1106838.
> 
> In the future, Jeff, please put the SHA-1 of the commit when you close bugs
> with contributions.  Thanks.

Will do.