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 ---    
Severity: normal CC: arnaud.versini, dennisroczek, sberg.fun
Priority: medium    
Version: 4.2.0.0.alpha0+ Master   
Hardware: All   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 42082, 108472    
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
Comment 3 QA Administrators 2015-04-19 03:20:06 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2016-09-20 09:24:32 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2022-09-03 03:39:41 UTC Comment hidden (obsolete)
Comment 6 Jean-Baptiste Faure 2022-09-06 16:44:44 UTC
According to comment #1 this bug concerns Ubuntu with Unity integration. As I do not have Unity anymore, I can't test if the bug is still alive. Under Ubuntu + Gnome, as expected, I do not see the same problem.

Best regards. JBF
Comment 7 Dennis Roczek 2023-09-21 11:54:46 UTC Comment hidden (no-value)