Bug 313319 - [draw2d, macosx] BidiProcessor needs validation of Carbon reference causing possible Cocoa issues
Summary: [draw2d, macosx] BidiProcessor needs validation of Carbon reference causing p...
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 3.6.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6.2 (Helios SR2)   Edit
Assignee: Alexander Nyßen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 141105
  Show dependency tree
 
Reported: 2010-05-18 06:09 EDT by Justin Dolezy CLA
Modified: 2010-12-16 17:48 EST (History)
3 users (show)

See Also:


Attachments
Patch for correct Mac OS X detection (1.05 KB, patch)
2010-05-20 03:30 EDT, Justin Dolezy CLA
ahunter.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Dolezy CLA 2010-05-18 06:09:53 EDT
Build Identifier: I20100312-1448

BidiProcessor does a Mac OS X check in the following code:

> /*
>  * $TODO Workaround for Carbon.  AWT DLL cannot start properly on carbon.
>  * Waiting for bug 82104
>  */
> private static final boolean isMacOS = SWT.getPlatform().equals("carbon"); //$NON-NLS-1$


Not sure what the impact of this is but would seem like the Platform check is potentially wrong, given the name of the variable.

Reproducible: Didn't try
Comment 1 Alex Boyko CLA 2010-05-18 09:50:30 EDT
Do you want to add || SWT.getPlatform().equals("cocoa")?
Comment 2 Justin Dolezy CLA 2010-05-20 03:30:31 EDT
Created attachment 169280 [details]
Patch for correct Mac OS X detection
Comment 3 Anthony Hunter CLA 2010-05-25 11:33:01 EDT
Looks great. Committed to HEAD for RC2.
Comment 4 Alexander Nyßen CLA 2010-12-16 16:49:42 EST
Actually, this is the cause for the failure of the draw2d test cases that are reported in bug #141105. Without the newly introduced cocoa platform check (which does not seem to be necessary), the TextFlow test cases all pass successfully on MacOSX Cocoa.

While the comment in BidiProcessor refers to bug #82104, I cannot see this has something to do with AWT DLL not loading (and I cannot observe any problems if removing the check). I would thus propose to revert the change so that on Cocoa, the behavior is as expected again.
Comment 5 Alexander Nyßen CLA 2010-12-16 17:41:42 EST
(In reply to comment #4)
> Actually, this is the cause for the failure of the draw2d test cases that are
> reported in bug #141105. Without the newly introduced cocoa platform check
> (which does not seem to be necessary), the TextFlow test cases all pass
> successfully on MacOSX Cocoa.
> 
> While the comment in BidiProcessor refers to bug #82104, I cannot see this has
> something to do with AWT DLL not loading (and I cannot observe any problems if
> removing the check). I would thus propose to revert the change so that on
> Cocoa, the behavior is as expected again.

Following the first comment in #82104 to bug #67384 (which refers to the AWT problem being mentioned), and navigating further to its related bugs, one can infer that the problem actually is limited to MacOSX Carbon and does not occur on MacOSX Cocoa.
Comment 6 Alexander Nyßen CLA 2010-12-16 17:48:10 EST
Reverted changes in cvs HEAD and 3.6 maintenance branch. Verified Draw2d Test cases successfully pass on MacOSX Cocoa again and that Text example is operational as well.
Comment 7 Alexander Nyßen CLA 2010-12-16 17:48:47 EST
(In reply to comment #6)
> Reverted changes in cvs HEAD and 3.6 maintenance branch. Verified Draw2d Test
> cases successfully pass on MacOSX Cocoa again and that Text example is
> operational as well.

While reverting, renamed variable to refer to carbon alone.