Bug 277202 - Cocoa download does not fail gracefully on Mac OS 10.4.11
Summary: Cocoa download does not fail gracefully on Mac OS 10.4.11
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 RC2   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2009-05-20 15:36 EDT by Chris Goldthorpe CLA
Modified: 2009-05-22 15:19 EDT (History)
5 users (show)

See Also:
Silenio_Quarti: review+
tjwatson: review+


Attachments
initial patch (1.68 KB, patch)
2009-05-21 12:03 EDT, Andrew Niefer CLA
no flags Details | Diff
updated patch (1.70 KB, patch)
2009-05-21 16:22 EDT, Andrew Niefer CLA
no flags Details | Diff
binaries (25.60 KB, application/octet-stream)
2009-05-21 16:23 EDT, Andrew Niefer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Goldthorpe CLA 2009-05-20 15:36:55 EDT
I just downloaded eclipse-SDK-I20090519-2000-macosx-carbon.tar.gz to a Mac OS 10.4.11 system and it would not start - I did not even see a splash screen. 

I notice that the reference platform in the 3.5 project plan is Mac OS 10.5, but the documentation on some of the download pages suggest that we still support 10.4. The following paragraph is from the Cocoa download page http://download.eclipse.org/eclipse/downloads/drops/I20090519-2000/download.php?dropFile=eclipse-SDK-I20090519-2000-macosx-cocoa.tar.gz

"The Cocoa implementation of Eclipse 3.5 requires Mac OS X 10.5 (Leopard) or
higher, and Java 1.4.2 to Java 1.5.x.  Mac OS X 10.4 (Tiger) users can use the
Carbon implementation of Eclipse 3.5 instead."

If 10.4.x is no longer supported we need to fix the documenation to make this clear.
Comment 1 Chris Goldthorpe CLA 2009-05-20 15:59:22 EDT
I realize that I had downloaded a cocoa version. Still it should fail more gracefully so I'll leave the bug open and change the title.
Comment 2 Andrew Niefer CLA 2009-05-20 16:43:53 EDT
There is a problem on 10.4 for carbon, I raised bug 277216 since this is now about cocoa.
Comment 3 Andrew Niefer CLA 2009-05-21 11:05:46 EDT
The launcher on the mac currently contains a system version check
if (systemVersion < 0x1020) {
  displayMessage(getOfficialName(), "Eclipse requires Jaguar (Mac OS X >= 10.2)");
  return 0;
}

 
The suggestion is to change this for cocoa to say we require 10.5
Comment 4 Steve Northover CLA 2009-05-21 11:10:30 EDT
I would leave the carbon test alone and add a cocoa test, then fix the carbon test for 3.6.
Comment 5 Andrew Niefer CLA 2009-05-21 12:03:39 EDT
Created attachment 136670 [details]
initial patch

Untested patch written from windows.

1) Need to verify the constant for 10.5, I used 0x1050 based on the 0x1020 from 10.2.

2) This also adds 10.4 as the deployment target, otherwise, I would not expect the launcher to even start

The message is 
This application is based on Cocoa and requires Mac OS X 10.5 (Leopard) or greater.

We can't refer to Eclipse because the launcher is used for all eclipse based products.  Similarly, we don't know java vm requirements.
Comment 6 Andrew Niefer CLA 2009-05-21 16:22:13 EDT
Created attachment 136720 [details]
updated patch

This early in the launch process, getOfficialName() returns null because the variables have not been initialized yet.

Instead, we just use "Error" as the title.
Comment 7 Andrew Niefer CLA 2009-05-21 16:23:28 EDT
Created attachment 136721 [details]
binaries

Recompiled binaries.

Note that if we don't target 10.4, then the launcher just completely fails on Tiger with a "Bus error".
Comment 8 Thomas Watson CLA 2009-05-21 16:53:25 EDT
My concern is changing the target to 10.4 this late in the cycle for a bug that does not affect our target platform for Cocoa (10.5).  The fix seems simple but I am not sure how much targeting 10.4 actually affects the binary and the possibility of introducing some subtle bug that we have not encountered yet.  Steve or Silenio, is this any cause for alarm or am I simply over paranoid?

I would not call this bug critical so we better be sure there is no risk if we really want to fix it in 3.5.
Comment 9 Andrew Niefer CLA 2009-05-21 17:02:18 EDT
There is a note here: http://developer.apple.com/technotes/tn2002/tn2064.html
about MACOSX_DEPLOYMENT_TARGET.  This changes the linking to be "weak linking".  This allows us to start on older targets even if we use newer API (up until the point we try to actually use that new API).  Because this is a link-time thing, I believe the swt libraries would load or not depending on their own linking independent of the launcher.

Comment 10 Steve Northover CLA 2009-05-21 17:15:15 EDT
I think we are fine with this change.  If we have affected the binary by specifying 10.4 and running on 10.5, we will find out pretty fast.

BTW, what is:

-}
\ No newline at end of file
+}


in the patch?
Comment 11 Andrew Niefer CLA 2009-05-21 17:21:51 EDT
(In reply to comment #10)
> BTW, what is:
> 
> -}
> \ No newline at end of file
> +}
> 
> 
> in the patch?
> 

It looks like I added an extra newline at the end of the file.
Comment 12 Thomas Watson CLA 2009-05-21 17:32:06 EDT
OK, assuming Silenio is fine with this fix going in then I +1.
Comment 13 Andrew Niefer CLA 2009-05-21 18:05:39 EDT
done
Comment 14 Chris Goldthorpe CLA 2009-05-22 15:19:17 EDT
Verified in I20090521-2000.