Bug 71179 - Java VM launch should be deferred at the extension starting, not at menu registration
Summary: Java VM launch should be deferred at the extension starting, not at menu regi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: macOS-UI-polish MediaWiki
  Show dependency treegraph
 
Reported: 2013-11-03 08:58 UTC by Jean-Baptiste Faure
Modified: 2023-09-21 11:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace to track JVM starter (13.07 KB, text/plain)
2013-11-03 08:58 UTC, Jean-Baptiste Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
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)