Bug 132029 - download-size and install-size are not used/collected correctly by the update wizard
Summary: download-size and install-size are not used/collected correctly by the update...
Status: RESOLVED 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 2000
: P3 normal (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Platform-Update-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 73097 136907 137715 138116 138225 138228 138548 138592 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-15 16:00 EST by Doug MacDonald CLA
Modified: 2006-07-19 14:22 EDT (History)
16 users (show)

See Also:


Attachments
update core patch for download size and install size (2.76 KB, patch)
2006-03-15 16:02 EST, Doug MacDonald CLA
no flags Details | Diff
update ui patch for download-size and install-size (1.87 KB, patch)
2006-03-15 16:02 EST, Doug MacDonald CLA
no flags Details | Diff
Fix for systems where we cannot get available space (1.04 KB, patch)
2006-04-18 15:49 EDT, Doug MacDonald CLA
no flags Details | Diff
Eclipse crash on Update/Install (31.37 KB, text/plain)
2006-04-27 04:14 EDT, Gregor Rosenauer CLA
no flags Details
Java crash log of Eclipse crashing on start (18.90 KB, text/plain)
2006-04-27 14:53 EDT, Gregor Rosenauer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doug MacDonald CLA 2006-03-15 16:00:15 EST
There are 3 issues:

1. The install size that is gathered by the update wizard's TargetPage does not recursively get the size of child features. Currently only the parent feature and its child features are accounted for in the size. I have created a patch for this issue. The fix accounts for children's children. Changes made to SiteFile.getInstallSizeFor(IFeature). Now if there is a feature who's heirarchy is the following, the correct size info will be collected:
   Feature1 includes Feature2
      Feature2 includes Faeture3
         Feature3 includes Feature4
            etc.

2. The download size information for feature's plugins and non-plugin data is not used anywhere. I have created a patch for this issue. The patch first fixes how the download size is retrieved in SiteFile.getDownloadSizeFor(IFeature) (changes based on changes made to SiteFile.getInstallSizeFor(IFeature)). The patch then uses the download size information in the update wizard's TargetPage. The page now adds together the download size and the install size in order to create the "required" size. Since all plugins and non-plugin data are downloaded before being installed, the download size should be incorporated into the "required" size: required = downloadSize + installSize.

3. The update wizard's TargetPage allows the user to continue even if the "require" size is greater than the "available" size. I have created a patch for this issue. The patch tests the see if the "required" size if greater than the "available" size. If it is greater, the page is set to be "not complete". There is a TODO in the code that says we need to add/set an error message telling the user what the issue is (not enough disk space).

I will attach the patch info soon.
Comment 1 Doug MacDonald CLA 2006-03-15 16:02:23 EST
Created attachment 36364 [details]
update core patch for download size and install size
Comment 2 Doug MacDonald CLA 2006-03-15 16:02:52 EST
Created attachment 36365 [details]
update ui patch for download-size and install-size
Comment 3 Branko Tripkovic CLA 2006-04-11 12:41:23 EDT
committed
Comment 4 Philippe Ombredanne CLA 2006-04-15 20:10:42 EDT
Please re-open and check bug 136907
Comment 5 Dejan Glozic CLA 2006-04-16 14:19:12 EDT
Doug, you must account for platforms like Mac where we don't have native code for computing avaiable disk space (-1 returned).
Comment 6 Jeff McAffer CLA 2006-04-17 22:20:24 EDT
Just for fun, when pack200 versions of JARs are availalbe they will be way smaller than the JAR sizes reported in the feature files.
Comment 7 Doug MacDonald CLA 2006-04-18 15:49:02 EDT
Created attachment 38848 [details]
Fix for systems where we cannot get available space

I have coded a patch, but I do not have an environment to test it in. The patch is very simple:

//if the available space was retireved from the OS and the required space is greater that the available space, do not let the user continue
if(available != LocalSystemInfo.SIZE_UNKNOWN && required > available){
Comment 8 Dejan Glozic CLA 2006-04-18 15:57:52 EDT
This looks good at first glance.
Comment 9 Philippe Ombredanne CLA 2006-04-18 17:03:42 EDT
I tested the patch on 32RC1 on a powerbook g4 12" running MacOSX 10.4.6.
The patch solves the problem 
:-)
Thanks
Comment 10 Dejan Glozic CLA 2006-04-18 21:08:41 EDT
*** Bug 136907 has been marked as a duplicate of this bug. ***
Comment 11 Dejan Glozic CLA 2006-04-18 21:18:02 EDT
Thanks - released.
Comment 12 Dejan Glozic CLA 2006-04-20 09:59:28 EDT
*** Bug 137715 has been marked as a duplicate of this bug. ***
Comment 13 Dejan Glozic CLA 2006-04-21 15:36:25 EDT
*** Bug 73097 has been marked as a duplicate of this bug. ***
Comment 14 Dejan Glozic CLA 2006-04-22 21:41:10 EDT
*** Bug 138116 has been marked as a duplicate of this bug. ***
Comment 15 Dejan Glozic CLA 2006-04-24 13:33:17 EDT
*** Bug 138225 has been marked as a duplicate of this bug. ***
Comment 16 Dejan Glozic CLA 2006-04-24 13:55:12 EDT
*** Bug 138228 has been marked as a duplicate of this bug. ***
Comment 17 Dejan Glozic CLA 2006-04-24 17:12:59 EDT
*** Bug 138266 has been marked as a duplicate of this bug. ***
Comment 18 Dejan Glozic CLA 2006-04-26 08:13:52 EDT
*** Bug 138548 has been marked as a duplicate of this bug. ***
Comment 19 Dejan Glozic CLA 2006-04-26 08:20:28 EDT
*** Bug 138592 has been marked as a duplicate of this bug. ***
Comment 20 Gregor Rosenauer CLA 2006-04-27 04:12:49 EDT
I don't know if it is really related to this bug or rather the fix, but now, using the latest nightly (need that fix!) from 2006-04-26, Update crashes if I invoke it from the menu:

2006-04-27 09:29:38.166 eclipse[3264] *** -[NSCFType length]: selector not recognized [self = 0x307150]
2006-04-27 09:29:38.166 eclipse[3264] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSCFType length]: selector not recognized [self = 0x307150]
Apr 27 09:29:46 grexmac crashdump[3267]: java crashed

Will attach a crash log.
Comment 21 Gregor Rosenauer CLA 2006-04-27 04:14:15 EDT
Created attachment 39636 [details]
Eclipse crash on Update/Install
Comment 22 Dejan Glozic CLA 2006-04-27 08:32:22 EDT
Steve, another 'interesting' crash that seems like it is coming from SWT land.
Comment 23 Steve Northover CLA 2006-04-27 11:32:34 EDT
The stack looks a bit funny.  Has the application got to it's event loop?  The bottom of the stack doesn't contain the Mac calls that readAndDispatch() makes.  Is the crash coming from application code that is calling Control.setCursor() before a event loop is running?
Comment 24 Steve Northover CLA 2006-04-27 11:33:18 EDT
Does the crash happen every time?
Comment 25 Gregor Rosenauer CLA 2006-04-27 12:47:19 EDT
yes, every time, right after invoking the menu and before the dialog even comes up. I see the "beachball of death" spinning for a while before I get the JVM-crash. Error number differed however. Trying now with RC2 (not 2a)...
Comment 26 Silenio Quarti CLA 2006-04-27 14:15:55 EDT
I was not able to reproduce this crash on Mac/Intel 10.4.6 or Mac/ppc 10.4.6 running this build (I20060427-0800) and this VM

ssq% java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-110)
Java HotSpot(TM) Client VM (build 1.5.0_06-61, mixed mode, sharing)
Comment 27 Gregor Rosenauer CLA 2006-04-27 14:45:42 EDT
Using 3.2rc1 (I wrote rc2 above, which is not yet out..), Eclipse crashes right on startup:

Apr 27 19:08:47 grexmac /usr/bin/java: An unexpected Java error has been detected by HotSpot Virtual Machine.
Apr 27 19:08:47 grexmac /usr/bin/java: If this error is reproducible, please report it with the following information: 
Apr 27 19:08:47 grexmac /usr/bin/java:   1. Provide the steps to reproduce, a test case, and any relevant information 
Apr 27 19:08:47 grexmac /usr/bin/java:   2. The corresponding JavaNativeCrash_pid<num>.crash.log (Java state) 
Apr 27 19:08:47 grexmac /usr/bin/java:   3. The corresponding <name>.crash.log (native state; generated by CrashReporter) 
Apr 27 19:08:47 grexmac /usr/bin/java:   4. This data: 
Apr 27 19:08:47 grexmac /usr/bin/java:        Java VM: Java HotSpot(TM) Client VM (1.5.0_06-57 mixed mode)
Apr 27 19:08:47 grexmac /usr/bin/java:        Bus Error (0xa) at pc=0xfffeff20
Apr 27 19:08:47 grexmac /usr/bin/java:        Process ID: 3418, Current Thread: 25184768
Apr 27 19:08:47 grexmac /usr/bin/java: File report at: http://bugreport.apple.com/
Apr 27 19:08:47 grexmac /usr/bin/java: An error report file has been written to:
Apr 27 19:08:47 grexmac /usr/bin/java:   /Users/grexe/Library/Logs/Java/JavaNativeCrash_pid3418.crash.log
Apr 27 19:08:51 grexmac crashdump[3423]: java crashed
Apr 27 19:08:58 grexmac crashdump[3423]: crash report written to: /Users/grexe/Library/Logs/CrashReporter/java.crash.log

This indicates that my Java-installation is corrupt for some reason, or am I mistaken? Maybe I should apply the 4.6 combo update again?
(I have problems with Java applets in browsers, too)

If this is true, I'm sorry for the confusion. Will attach the Eclipse-log and keep you updated.
Comment 28 Gregor Rosenauer CLA 2006-04-27 14:53:39 EDT
Created attachment 39706 [details]
Java crash log of Eclipse crashing on start
Comment 29 Ian Young CLA 2006-04-28 12:41:15 EDT
It looks like the Mac free space issue means that I can't install a number of plugins under 3.2RC1: oXygen and Subclipse for example.

Is there a workround for this, or do people with Macs have to revert to 3.2M6 until 3.2RC2 comes out?
Comment 30 Dejan Glozic CLA 2006-04-28 15:59:25 EDT
RC2 is supposed to be built sometime today - can't you hold on for just a bit longer?
Comment 31 Ian Young CLA 2006-04-28 17:29:07 EDT
Thanks Dejan, I hadn't realised we were that close to RC2.  You're right, that does make the problem go away...
Comment 32 Tommy_Shen CLA 2006-07-07 05:46:53 EDT
hi all.
   I also get this issue. does it fix in Version: 3.2.0(Build id: M20060629-1905)?
Comment 33 Ryan CLA 2006-07-14 10:48:22 EDT
This is still occuring using Eclipse 3.2 final and Microsoft Vista Beta 2 (32bit).  Is there a workaround?
Comment 34 Martin CLA 2006-07-19 10:34:11 EDT
bug is still in Eclipse 3.2, Win 2003
Comment 35 Branko Tripkovic CLA 2006-07-19 14:22:49 EDT
we do not officially support neither 2003 or  xp-64 or vista. However, we are aware of the problems and there are bugs (bug 142815) open for this OSes. Fix was committed for 2003 which should also fix xp-64. We are hoping that it does fix vista too, however we can not be sure. So people that want to help, can download our newest nightly build and try it (it should be also in yesterdays integration build). Thank you all.