You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2014/04/18 13:48:03 UTC

[Issue 124170] MacOSX 64 CRASH Java awt thread

https://issues.apache.org/ooo/show_bug.cgi?id=124170

--- Comment #16 from rony@apache.org ---
Looked a little bit closer at the BeanShell macro to test the scripting
environment and it turns out that it can execute in "headless" mode as it is
not instantiating anything related to awt.

However, the following simple BeanShell macro exhibits exactly the reported
behaviour:

--------------------- cut here ---------------------
JOptionPane.showMessageDialog(null, "Testing awt-support, BeanShellScript is
done!");

return 0
--------------------- cut here ---------------------

After saving the above BeanShell macro, one can run it successfully from the
editor, as the editor is running on a separate Java thread and invocation uses
SwingUtilities.invokeLater(), such that the invocation is carried out on the
Java awt thread. Interestingly, if running scripts from the editor, then
afterwards running scripts directly via "Tools -> Macros -> Run Macro ..." may
run as well (however, sometimes they cause hangs).

Hence it is important to quit AOO before running the above macro via "Tools ->
Macros -> Run Macro ...", such that on the next start Java is at its "initial",
well defined state. Then you will get the error popup informing the user about
not being able to execute the program because of the AWT problem. 

Repeating "Run Macro ..." again may yield the popup window, however the user
interface hangs such that one must do a "Force Quit" of AOO. As if the Java
environment is out of order somehow (obviously linked to event handling on
MacOSX).

---

Some solutions (in other contexts) are hinted in
<http://stackoverflow.com/questions/14661249/java-jni-creating-a-swing-window-using-jni-from-c>,
which points to
<http://stackoverflow.com/questions/8750690/osx-javavm-awt-swing-and-possibly-a-deadlock/14859179>. 

Maybe they hint at feasible resolutions that do not incur "too much work" for
MacOSX? 
;)

-- 
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.