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

Bug 353523

Summary: SWT_AWT broken on Mac OS X Leopard (10.5.8)
Product: [Eclipse Project] Platform Reporter: Patrick Talbot <ptalbot>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: VERIFIED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: critical    
Priority: P3 CC: chrriis, lshanmug, ptalbot, remy.suen
Version: 4.1Flags: Silenio_Quarti: review+
Target Milestone: 3.7.1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Simple test case
none
Output of the terminal session during the test, with StackTrace
none
patch none

Description Patrick Talbot CLA 2011-08-01 15:57:37 EDT
Build Identifier: 3.7 final

NPE at org.eclipse.swt.widgets.Shell.createHandle(Shell.java:735)

Using the simple test case attached, there is a NPE each time one tries to create a new Shell, see the terminal output attached with stackTrace.

OS is Mac OS X 10.5.8
I've tried with:
- Java 6 1.6.0_26 - 64-bit
- Java 5 1.5.0_30 - 64-bit
- Java 5 1.5_0_30 - 32-bit

All with the same result.
Some users reported the same issue with Java 6 1.6.0_24 - always on Leopard 10.5.8

The same code runs fine in Snow Leopard 10.6.8

This is a critical issue for us since it basically breaks Leopard compatibility.

Thanks for having a look.

Reproducible: Always

Steps to Reproduce:
1. Run the sample code attached
2. NPE happends at line 32 - caused by Shell.createHandle(Shell.java:735)
Comment 1 Patrick Talbot CLA 2011-08-01 15:58:15 EDT
Created attachment 200668 [details]
Simple test case
Comment 2 Patrick Talbot CLA 2011-08-01 15:58:50 EDT
Created attachment 200669 [details]
Output of the terminal session during the test, with StackTrace
Comment 3 Lakshmi P Shanmugam CLA 2011-08-03 06:47:14 EDT
Null check is missing
Comment 4 Lakshmi P Shanmugam CLA 2011-08-03 07:11:37 EDT
Created attachment 200795 [details]
patch

Added null check and removed OS.HIWindowFindAtLocation() since we are not using it now.
Comment 5 Lakshmi P Shanmugam CLA 2011-08-05 04:35:58 EDT
Thanks Silenio!
Fixed in 3.7.1.
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R3_7_maintenance&id=8fbd6f7b609d8d48b2b8f9d0d4bc600048b376cb

Will release patch to 3.8 after M1.
Comment 7 Lakshmi P Shanmugam CLA 2011-09-13 08:03:19 EDT
Verified in I20110912-2126