← Back to team overview

menueditor-devel team mailing list archive

[Bug 682975] Re: Segmentation Fault

 

Here is a fix to catch the warning and the long series of asserts in gtk

a simple check of 
window.get_screen() is not None

before 
window.show()
in bin/menueditor

also does the trick, but shows an ugly trace of gtk asserts

** Patch added: "fix_682975_catch_gtk_warning.diff"
   https://bugs.launchpad.net/menueditor/+bug/682975/+attachment/1749362/+files/fix_682975_catch_gtk_warning.diff

-- 
Segmentation Fault
https://bugs.launchpad.net/bugs/682975
You received this bug notification because you are a member of Edubuntu
Menu Editor development team, which is the registrant for Edubuntu Menu
Editor.

Status in Edubuntu menu editor: New

Bug description:
Segmentation Fault when launching bin/menueditor and X is unavailable

$ DISPLAY=no_thanks bin/menueditor

/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
bin/menueditor:369: Warning: invalid (NULL) pointer instance
  builder.add_from_file(ui_filename)
bin/menueditor:369: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
  builder.add_from_file(ui_filename)
bin/menueditor:369: GtkWarning: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  builder.add_from_file(ui_filename)
bin/menueditor:369: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
  builder.add_from_file(ui_filename)
bin/menueditor:369: Warning: value "TRUE" of type `gboolean' is invalid or out of range for property `visible' of type `gboolean'
  builder.add_from_file(ui_filename)
/home/vince/src/menueditor/menueditor/MenuTreeModel.py:105: GtkWarning: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  self.icon_theme = gtk.icon_theme_get_default ()
bin/menueditor:105: GtkWarning: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  self.tvMenu.append_column(column)
bin/menueditor:105: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
  self.tvMenu.append_column(column)
bin/menueditor:119: GtkWarning: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  self.tvMenu.append_column(column)
bin/menueditor:119: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
  self.tvMenu.append_column(column)
bin/menueditor:388: GtkWarning: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
  window.show()
bin/menueditor:388: GtkWarning: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_context_set_font_description: assertion `context != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_context_set_base_dir: assertion `context != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_context_set_language: assertion `context != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_new: assertion `context != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_text: assertion `layout != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_attributes: assertion `layout != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_alignment: assertion `layout != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_width: assertion `layout != NULL' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_get_extents: assertion `layout != NULL' failed
  window.show()
bin/menueditor:388: GtkWarning: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
  window.show()
bin/menueditor:388: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_get_pixel_extents: assertion `PANGO_IS_LAYOUT (layout)' failed
  window.show()
bin/menueditor:388: Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed
  window.show()
bin/menueditor:388: PangoWarning: pango_layout_set_wrap: assertion `PANGO_IS_LAYOUT (layout)' failed
  window.show()
bin/menueditor:388: GtkWarning: gtk_widget_size_allocate(): attempt to allocate widget with width -1050547 and height 4595
  window.show()
bin/menueditor:388: GtkWarning: gtk_widget_size_allocate(): attempt to allocate widget with width -1050560 and height 4625
  window.show()
bin/menueditor:388: GtkWarning: gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed
  window.show()
bin/menueditor:388: GtkWarning: gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed
  window.show()
bin/menueditor:388: GtkWarning: gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
  window.show()
bin/menueditor:388: GtkWarning: gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed
  window.show()
[1]    5937 segmentation fault  DISPLAY=no_thanks bin/menueditor





References