Bug 71179

Summary: Java VM launch should be deferred at the extension starting, not at menu registration
Product: LibreOffice Reporter: Jean-Baptiste Faure <jbfaure>
Component: LibreofficeAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: arnaud.versini, sbergman
Version: 4.2.0.0.alpha0+ Master   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: backtrace to track JVM starter

Description Jean-Baptiste Faure 2013-11-03 08:58:06 UTC
Created attachment 88549 [details]
backtrace to track JVM starter

Java extensions like Wiki-Publisher modifies the file menu in Writer by adding the sub-entry "To MediaWiki" in the Send entry.
It seems that the update of this menu at the starting of Writer (even with an empty document) starts a Java VM. This JVM remains started even if we never use the Wiki-Publisher extension.

I suggest that the JVM for Wiki-Publisher extension should be started only when the user explicitly uses this extension.
A workaround could be to remove Wiki-Publisher extension from the default installation. 

I attached a backtrace to locate when and where JNI_CreateJavaVM is called.

Best regards. JBF
Comment 1 Stephan Bergmann 2013-11-04 11:02:15 UTC
Note that this early instantiation of the JVM is due to Unity-integration--specific GtkSalFrame::EnsureDbusMenuSynced (frame 24).  Another platform where Wiki Publisher causes early instantiation of the JVM is Mac OS X, see <http://lists.freedesktop.org/archives/libreoffice/2013-October/056991.html> "Why typing in Writer instantiates the JVM on Mac OS X."
Comment 2 Jean-Baptiste Faure 2013-12-08 08:58:05 UTC
According to comment #1, I think we can say that this bug is confirmed.

Best regards. JBF

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.