drawing icon indicating copy to clipboard operation
drawing copied to clipboard

GtkFontChooser's critical exceptions have to be handled by the app??

Open maoschanz opened this issue 3 years ago • 1 comments

Description

/app/share/drawing/drawing/tool_text.py:58: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
  dialog.set_level(Gtk.FontChooserLevel.FAMILY)

(com.github.maoschanz.drawing:2): Pango-CRITICAL **: 14:49:52.426: pango_font_face_describe: assertion 'PANGO_IS_FONT_FACE (face)' failed

(com.github.maoschanz.drawing:2): Pango-CRITICAL **: 14:49:52.426: pango_font_face_describe: assertion 'PANGO_IS_FONT_FACE (face)' failed

(com.github.maoschanz.drawing:2): Pango-CRITICAL **: 14:49:52.946: pango_font_face_get_face_name: assertion 'PANGO_IS_FONT_FACE (face)' failed

(com.github.maoschanz.drawing:2): Pango-CRITICAL **: 14:49:52.946: pango_font_face_describe: assertion 'PANGO_IS_FONT_FACE (face)' failed
/usr/lib/python3.9/site-packages/gi/overrides/Gtk.py:585: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
  return Gtk.Dialog.run(self, *args, **kwargs)

(com.github.maoschanz.drawing:2): Pango-CRITICAL **: 14:49:52.946: pango_font_face_describe: assertion 'PANGO_IS_FONT_FACE (face)' failed

(com.github.maoschanz.drawing:2): Pango-CRITICAL **: 14:49:52.946: pango_font_face_describe: assertion 'PANGO_IS_FONT_FACE (face)' failed
**
Gtk:ERROR:../gtk/gtkfontchooserwidget.c:2539:gtk_font_chooser_widget_merge_font_desc: assertion failed: (font_desc != NULL)
Bail out! Gtk:ERROR:../gtk/gtkfontchooserwidget.c:2539:gtk_font_chooser_widget_merge_font_desc: assertion failed: (font_desc != NULL)

Steps to reproduce the bug

  1. install some free memesque "akira" font
  2. try to use it
  3. crash

System

  • Device (desktop computer/tablet/phone/...):
  • OS: ubuntu 21.something
  • Desktop environment: gnome shell
  • Package format: fltpak
  • App version: 0.8.5

maoschanz avatar Jan 26 '22 13:01 maoschanz

https://stackoverflow.com/a/40988730

move all my calls to Gtk to functions and, in the second thread, change all those calls with Gdk.threads_add_idle(priority, function, data), where priority should be GLib.PRIORITY_DEFAULT_IDLE and function must be the function containing all calls to Gtk. data it's an optional argument. It shall contain all additional data that you would like to pass to function

edit: doesn't work

maoschanz avatar Jan 27 '22 16:01 maoschanz

still valid but probably a GTK issue that will disappear with GTK4 (i hope? if it doesn't i will not do anything else anyway)

maoschanz avatar Feb 03 '23 14:02 maoschanz