On Mon, Mar 09, 2020 at 08:34:45PM +0000, Stuart Henderson wrote:
> On 2020/03/09 20:21, Solene Rapenne wrote:
> > The software editors/sigil hangs when I use File>Open file dialog, this
> > looks like the exact same issue I reported in calibre
> > https://marc.info/?l=openbsd-ports&m=158201980905357&w=2
> > 
> > Using "Save as" file dialog works as expected though.
> > 
> > I have no crash output because it hangs, only this messages from Gtk
> > 
> > I'm using OpenBSD -current amd64, updated with today's snapshot and 
> > packages up
> > to date.
> > 
> > solene@t480 ~ $ sigil
> > Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to 
> > '/tmp/runtime-solene'
> > Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to 
> > '/tmp/runtime-solene'
> > 
> > (sigil:51536): Gtk-CRITICAL **: 20:18:50.059: Error building template class 
> > 'GtkDialog' for an instance of type 'GtkDialog': .:2:367 Invalid object 
> > type 'GtkHeaderBar'
> > (sigil:51536): Gtk-CRITICAL **: 20:18:50.059: 
> > _gtk_container_get_border_width_set: assertion 'GTK_IS_CONTAINER 
> > (container)' failed
> > (sigil:51536): Gtk-CRITICAL **: 20:18:50.059: 
> > gtk_container_set_border_width: assertion 'GTK_IS_CONTAINER (container)' 
> > failed
> > (sigil:51536): Gtk-CRITICAL **: 20:18:50.059: 
> > _gtk_container_set_border_width_set: assertion 'GTK_IS_CONTAINER 
> > (container)' failed
> 
> hmm, why is this Qt software using Gtk?

Hah, very good, someone else seeing this... i'm seeing the exact same
issue with QGIS (had reported it upstream in
https://issues.qgis.org/issues/17825, thinking it was a qgis issue), and
similar things were reported with Qt5 apps on the list
(https://marc.info/?l=openbsd-ports&m=156398700316410&w=2 ,
https://marc.info/?l=openbsd-ports&m=155105154015694&w=2).

>From that point, the only option is to kill the app, as even if you can
close the dialog, the Qt5 window is unresponsive.

In that case it uses Gtk3 because i *think* it has something to do with desktop
integration wrt themes, where Qt apps try to use a 'Gtk3' platformtheme for
proper integration with gtk-based desktops (i use xfce everywhere)

at the time i ported qt5ct to be able to change the theme used by qt5
apps to prevent it to default to the Gtk3 theme but that's only sliding
the issue under the carpet and not actually fixing anything.

I started digging into qtbase and got a local debug patch (below) but
that didnt help understanding the issue.. more eyes on this would definitely be
welcome as this has been bugging me for 2+ yrs :)

Landry

[07:22] c64:/usr/ports/x11/qt5/ $cat 
qtbase/patches/patch-src_plugins_platformthemes_gtk3_qgtk3dialoghelpers_cpp
$OpenBSD$

Index: src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
--- src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp.orig
+++ src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
@@ -238,6 +238,9 @@ void QGtk3ColorDialogHelper::applyOptions()
 
 QGtk3FileDialogHelper::QGtk3FileDialogHelper()
 {
+    qDebug("Registering headerbar type");
+    g_type_ensure(GTK_TYPE_HEADER_BAR);
+    qDebug("Creating gtk3 file chooser");
     d.reset(new QGtk3Dialog(gtk_file_chooser_dialog_new("", 0,
                                                         
GTK_FILE_CHOOSER_ACTION_OPEN,
                                                         
qUtf8Printable(QGtk3Theme::defaultStandardButtonText(QPlatformDialogHelper::Cancel)),
 GTK_RESPONSE_CANCEL,


Reply via email to