<AWT Dev>  Review request for 8005465: [macosx] Evaluate if checking for the -XstartOnFirstThread is still needed in awt.m
anthony.petrov at oracle.com
Tue Jan 15 08:27:01 PST 2013
I've split the setUpAWTAppKit() to setUpAWTAppKit() and
setUpAppKitThreadName() (and also a separate call to
NSSetUncaughtExceptionHandler() in the very beginning of -starter:.) If
you examine the logic in starter: carefully, you may notice that all the
required operations are performed just as before based on the current
mode of execution.
In particular, in the headless mode we want to only set the AppKit
thread name and only if we're not running in the "swt compatible mode".
We don't use observers in the headless mode. Also, the uncaught
exception handler is always set unconditionally.
On 1/15/2013 20:11, Artem Ananiev wrote:
> Hi, Anthony,
> after the fix, setUpAWTAppKit() is not called in headless mode, while it
> was before. Could it be a problem?
> On 1/15/2013 7:54 PM, Anthony Petrov wrote:
>> After discussing this fix off-line, we decided to start off with a
>> minimal version of the fix that enables FX and AWT to run in headful
>> mode, and be able to be initialized in any order. The new fix for
>> http://bugs.sun.com/view_bug.do?bug_id=8005465 is at:
>> There's some cleanup of the initialization procedure of AWT that makes
>> it easier to follow. The most essential change is that AWT no longer
>> throws an exception if it's started on the main thread and the
>> -XstartOnMainThread hasn't been specified when running the app. This is
>> to allow one to initialize the AWT from the AppKit thread (which is the
>> FX User Thread on the Mac).
>> There are still a few issues remain (specifically, 8006320 and 8006326),
>> but they may require more time to investigate, and we need to back-port
>> this fix to a 7 update release as soon as possible.
>> The fix has been tested with FX for the desired use-case, as well as
>> with SWT (thanks Petr!). No problems found.
>> best regards,
More information about the awt-dev