Apache OpenOffice (AOO) Bugzilla – Issue 11688
Direct use of Core Services framework cause JavaVM service problems
Last modified: 2003-03-11 17:56:30 UTC
In the OOO_STABLE_1_PORTS branch, we use 2 CoreServices functions to determine the locale. Unfortunately, directly accessing these functions causes any AWT code loaded by the JavaVM service in stoc/source/javavm to not detect certain window and mouse events. The solution is to load the CoreServices framework via osl_loadModule and invoke the 2 functions via osl_getSymbol. The required patchs to the sal and tools cvs modules are attached.
I'm not quite sure how the CF calls themselves are causing the AWT issues. I'm pretty sure that Java requires applications using the AWT to have their own NSApplication instance, and the OS automatically fires one up for each of my java apps coming off of the command line that use the AWT. OOo never gets its own NSApp instance in the X11 version (nor in the current Quartz version since there's no bundle...) so all bets are off with regards to window, mouse, and keyboard events from Java, ObjC, and Carbon calls from my experience in command-line Cocoa and Carbon hacking. Dan...any thoughts?
I have very simple patches that solve the problem. Unfortunately, there seems to be a problem posting attachments to IssueZilla right now. Once I can post attachments to this issue, I will do so. In the meantime, if anyone wants to see the patches, e-mail me and I will send them to you.
Patrick, Can you take a look at the patches in Issue 10385? http://www.openoffice.org/issues/show_bug.cgi?id=10385 Apply the last two to sal, remove CoreServices/Java framework from tools link, then test it out and see if the problem goes away. I've split the OS X specific code out into a separate dylib that then gets osl_LoadModule()'d when needed. dan
Dan, The patches in issue 10385 implement the required fix for this bug so I am closing this issue as a duplicate of issue 10385. BTW, the problem appears to happen whenever we directly link a framework that is linked with the Carbon framework (like CoreServices). Since the JavaVM framework is loaded via osl_loadModule, the Carbon framework gets loaded first if we don't use osl_loadModule CoreServices or other Carbon linked frameworks. Lastly, don't forget to add a patch for tools/bootstrp/static.mk in issue 10385 that removes the "-framework CoreServices". *** This issue has been marked as a duplicate of 10385 ***
As mentioned on the qa dev list on March 5th I will close all resolved duplicate issues. Please see this posting for details. First step in IssueZilla is unfortunately to set them to verified.
As mentioned on the qa dev list on March 5th I will close all resolved duplicate issues. Please see this posting for details.