Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 149300 - Unable to install new plugins on Vista Beta 2
Summary: Unable to install new plugins on Vista Beta 2
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: 3.2.2   Edit
Assignee: Branko Tripkovic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 158064 160974 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-30 09:26 EDT by Jan S. Rellermeyer CLA
Modified: 2007-01-15 13:20 EST (History)
12 users (show)

See Also:


Attachments
Fix (7.29 KB, patch)
2006-11-30 13:45 EST, John Arthorne CLA
no flags Details | Diff
New DLL (36.00 KB, application/octet-stream)
2006-11-30 13:46 EST, John Arthorne CLA
no flags Details
New update plugin (44.77 KB, application/octet-stream)
2006-11-30 13:52 EST, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan S. Rellermeyer CLA 2006-06-30 09:26:14 EDT
Eclipse 3.2 lets me select new plugins to install, but then reports 0 kB free disk space (although there is plenty of it) and does not let me finish the installation. 
Strangely, when the new plugin's size is reported as unknown, it also shows 0kB but lets me finish anyway.
Comment 1 Brian Smith CLA 2006-07-05 10:57:36 EDT
I believe I've raised a duplicate of this under bug 149610, though that is for Windows x64.
Comment 2 Branko Tripkovic CLA 2006-08-08 22:37:36 EDT
we do not support vista with this release. We have no copies of vista to play with and test, but if you have one and you are willing to help us check the patch for bug 142815 (this is for 2003) and see if you can create patch along those lines. Also, did you check new nightly builds? They have that patch applied already.
Comment 3 Chris Aniszczyk CLA 2006-11-08 14:41:51 EST
what's ETA on this one?
Comment 4 Chris Aniszczyk CLA 2006-11-08 14:42:38 EST
*** Bug 158064 has been marked as a duplicate of this bug. ***
Comment 5 Jim Robbins CLA 2006-11-30 10:05:05 EST
Will this be fixed in 3.2.2?
Comment 6 John Arthorne CLA 2006-11-30 13:45:02 EST
Created attachment 54811 [details]
Fix

Here is a recommended fix.  Previously, the code would only work if it recognized the Windows version number.  This was done originally to handle Windows 95 or older, which we no longer support.  The problem is, it requires updating for every new windows release.

This patch removes that test entirely, so the win32 function is always called.  This has the same result: UNKNOWN will be returned if the function failed, but we won't have to keep updating this code for every new windows release.

I have also included in the patch the make/setup files I used to compile it.  Feel free to include these or not, but I wanted to put them in the patch so I would have a record of them.
Comment 7 John Arthorne CLA 2006-11-30 13:46:02 EST
Created attachment 54812 [details]
New DLL

Here is the new update.dll built on the patch in the previous comment.
Comment 8 John Arthorne CLA 2006-11-30 13:49:17 EST
Branko/Dejan: please consider for 3.2.2 and 3.3.  Without this fix there will be problems running update on Vista.
Comment 9 John Arthorne CLA 2006-11-30 13:52:50 EST
Created attachment 54813 [details]
New update plugin

For Vista users on the CC list: here is a new version of the org.eclipse.update.core.win32 plugin that contains this fix.  I have tested on Vista and Win2K, but verification/testing from others would be appreciated.
Comment 10 Chris Aniszczyk CLA 2006-11-30 13:59:12 EST
Hey John, if I recall, there was an issue in update ui if the file size was still unknown, it wouldn't be possible to install features. Am I crazy? Anyone know this off the top of their head before I start digging?
Comment 11 John Arthorne CLA 2006-11-30 14:05:15 EST
zx: I don't know, I didn't look at update UI.  The attached fix just stops it from returning "UNKNOWN" when it encounters an operating system version it doesn't recognize. Instead, it just calls the win32 function, and if the function fails then it returns UNKNOWN.  With this fix, it should never return UNKNOWN on Vista. 

It seems like there is room for improvement at the UI level too - if the disk space is UNKNOWN, it feels like it should not prevent the user from proceeding.  Feel free to dig...
Comment 12 Dejan Glozic CLA 2006-11-30 14:11:30 EST
(In reply to comment #6)
> Windows 95 or older, which we no longer support.  The problem is, it requires
> updating for every new windows release.
> This patch removes that test entirely, so the win32 function is always called. 
> This has the same result: UNKNOWN will be returned if the function failed

John, if I understand you correctly, you have REMOVED the useful function with the bathwater. On Windows 2000/XP, the DLL will correctly compute the available space. With your patch, we will not be able to see the available space on any version of Windows?

Is there a way to have a future-proof fix that does not affect the current function? We do have Vista machines now and I would much rather see this DLL return the actual available space rather than give up and return UNKNOWN.
Comment 13 John Arthorne CLA 2006-11-30 14:29:33 EST
Sorry, I guess I didn't explain it very well.

The old code was:

if (this is a version of windows I know about) {
   Call GetDiskFreeSpaceEx
   return disk free size
} else {
   return UNKNOWN;
}

The new code is:

Call GetDiskFreeSpaceEx
if (success)
   return disk free size
else
   return UNKNOWN

This will return the free disk space for all versions of Windows, unless GetDiskFreeSpaceEx fails.  I.e., this solution is future proof. I have tested on Win2K and Vista and it returns the correct free disk space on both.  

It looks like the original intent of the code was to guard against failure on Windows 95, but since we no longer support Windows 95 it is no longer necessary.
Comment 14 Dejan Glozic CLA 2006-11-30 14:37:21 EST
Ah... Sorry for doubting you :-). I agree this is the way to go. Branko, can you release John's patch?
Comment 15 DJ Houghton CLA 2006-11-30 16:28:35 EST
*** Bug 160974 has been marked as a duplicate of this bug. ***
Comment 16 DJ Houghton CLA 2006-12-06 13:32:33 EST
Adding McQ to CC as PMC representative for approval for fix into 3.2 maintenance stream.
Comment 17 Mike Wilson CLA 2006-12-06 13:51:38 EST
+1.
Comment 18 John Arthorne CLA 2006-12-13 13:36:31 EST
Increasing severity - Vista support is very important for 3.2.2.
Comment 19 Dejan Glozic CLA 2006-12-13 17:52:23 EST
There is some confusion here regarding Vista. I have just downloaded 3.2.2 build that does not contain this patch and was able to install Callisto features on our Vista machine. We can still release this for other Windows dialects but Vista is covered as-is.

I am lowering severity because I can install on Vista.
Comment 20 Dejan Glozic CLA 2006-12-13 18:47:31 EST
Branko, this patch is ready to go for 3.2.2 - please release.
Comment 21 Dejan Glozic CLA 2006-12-13 19:02:29 EST
Also include in HEAD and version/release for 3.3 M4.
Comment 22 John Arthorne CLA 2006-12-14 11:47:09 EST
To clarify the failing Vista case: If the feature has required space of "Unknown" you are allowed to continue with the installation. This is the case for most Callisto components.  However, if the feature has a known non-zero required space, you cannot install it on Vista (or at least it doesn't work for me).  For example, see the subclipse update site:

http://subclipse.tigris.org/update_1.0.x/
Comment 23 Dejan Glozic CLA 2006-12-14 14:27:47 EST
Sorry, returning the severity to 'critical'.

We have released this into M4 today and will be releasing into 3.2.2 soon.
Comment 24 Branko Tripkovic CLA 2006-12-14 14:38:07 EST
released in both 3.2.x and 3.3
Comment 25 John Arthorne CLA 2007-01-15 13:20:55 EST
Verified in M20070112-1200, Vista Enterprise