| Summary: | [3.7.x] GLCanvas maintenance fix causes NullPointerException when changing parent on Mac | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Steven Darnell <darnells> | ||||
| Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | gheorghe, remy.suen, Silenio_Quarti | ||||
| Version: | 4.2 | Flags: | john.arthorne:
pmc_approved+
gheorghe: review+ |
||||
| Target Milestone: | 3.7.2 | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Steven Darnell
Created attachment 210089 [details]
Modified code snippet to reproduce bug (contains JOGL dependency)
Snippet creates two shells and a GLCanvas, the changes the parent of the canvas from the first to the second shell. Comment in code indicates what triggers the exception.
@Silenio I am CC'ing you because you were instrumental to the GLCanvas fast view fix on Mac (Bug 343331). I apologize if this is out of line. Fixed in master (3.8) http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=934aa196b8c3a5a2b8cbbdf32ca385793f69de82 John/Bogdan, please could approve/review this patch for 3.7.2? This is a regression in 3.7.2, it must be fixed. The NullPointer happens because during the callback #viewWillMoveToWindow, NSView.window() returns null. The fix is to use the window stored in the shell of the GLCanvas. |