Libreoffice python scripting: crash on importing Gtk

Bug #1374993 reported by Gabor Karsay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Running libreoffice 1:4.2.6.3-0ubuntu1 on trusty.

I put a script in ~/.config/libreoffice/4/user/Scripts/python which imports Gtk, and on importing it freezes libreoffice with this traceback:

gabor@mycomputer:~$ loffice
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: cannot register existing type 'GtkWidget'
  g_type = info.get_g_type()
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: cannot add class private field to invalid type '<invalid>'
  g_type = info.get_g_type()
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: cannot add private field to invalid (non-instantiatable) type '<invalid>'
  g_type = info.get_g_type()
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
  g_type = info.get_g_type()
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: cannot register existing type 'GtkBuildable'
  g_type = info.get_g_type()
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
  g_type = info.get_g_type()
/usr/lib/python3/dist-packages/gi/module.py:178: Warning: g_once_init_leave: assertion 'result != 0' failed
  g_type = info.get_g_type()

Steps to reproduce:
Put this minimal script in ~/.config/libreoffice/4/user/Scripts/python :

# -*- coding: utf-8 -*-

from gi.repository import Gtk

def HelloWorld():
 dialog = Gtk.MessageDialog(None, buttons=(Gtk.STOCK_OK, Gtk.ResponseType.OK), message_format="Hello World!")
 dialog.run()
 dialog.destroy()

Run it from Writer - Extras - Macros - Run macros (not sure about the english names, LANGUAGE=C libreoffice doesn't change the language)

Result: Libreoffice freezes, doesn't react anymore.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libreoffice (Ubuntu) because there has been no activity for 60 days.]

Changed in libreoffice (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.