equalsraf / neovim-qt

Neovim client library and GUI, in Qt5.
https://github.com/equalsraf/neovim-qt/wiki
ISC License
1.85k stars 171 forks source link

GLib-GIO-CRITICAL #1088

Closed dam9000 closed 11 months ago

dam9000 commented 11 months ago

Getting a lot of errors / warnings when starting nvim-qt:

/usr/bin/nvim-qt -- --clean

QSocketNotifier: Can only be used with threads started with QThread

(nvim-qt:7689): GLib-GIO-CRITICAL **: 10:08:06.620: GFileInfo created without standard::icon

(nvim-qt:7689): GLib-GIO-CRITICAL **: 10:08:06.620: file ../gio/gfileinfo.c: line 1766 (g_file_info_get_icon): should not be reached

(nvim-qt:7689): GLib-GIO-CRITICAL **: 10:08:06.621: GFileInfo created without standard::icon

(nvim-qt:7689): GLib-GIO-CRITICAL **: 10:08:06.621: file ../gio/gfileinfo.c: line 1766 (g_file_info_get_icon): should not be reached

(nvim-qt:7689): GLib-GIO-CRITICAL **: 10:08:06.621: GFileInfo created without standard::icon

(nvim-qt:7689): GLib-GIO-CRITICAL **: 10:08:06.621: file ../gio/gfileinfo.c: line 1766 (g_file_info_get_icon): should not be reached

Ignoring messages, nvim-qt works normally.

This started happening when upgrading from Fedora 38 to 39.

Using G_DEBUG=fatal-criticals I can get a stack trace of the error:

(gdb) run --nofork -- --clean
Starting program: /usr/bin/nvim-qt --nofork -- --clean
...
(nvim-qt:8170): GLib-GIO-CRITICAL **: 10:15:25.320: GFileInfo created without standard::icon

Thread 1 "nvim-qt" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff2ec5015 "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, 
    args=args@entry=0x7fffffffcd00) at ../glib/gmessages.c:1423
1423              g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));                                               
(gdb) where
#0  g_logv (log_domain=0x7ffff2ec5015 "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, 
    args=args@entry=0x7fffffffcd00) at ../glib/gmessages.c:1423
#1  0x00007ffff5318463 in g_log (log_domain=log_domain@entry=0x7ffff2ec5015 "GLib-GIO", 
    log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, 
    format=format@entry=0x7ffff2ed0910 "GFileInfo created without standard::icon") at ../glib/gmessages.c:1461
#2  0x00007ffff2de1c3d in g_file_info_get_icon (info=<optimized out>) at ../gio/gfileinfo.c:1766
#3  0x00007fffe478af31 in QGtk3Interface::fileIcon (this=0x555555bd21e0, fileInfo=...) at qgtk3interface.cpp:693
#4  0x00007fffe47969fd in QGtk3Storage::fileIcon (this=<optimized out>, fileInfo=...) at qgtk3storage.cpp:249
#5  0x00007fffe479bb88 in QGtk3Theme::fileIcon (this=<optimized out>, fileInfo=..., iconOptions=...)
    at /usr/include/c++/13/bits/unique_ptr.h:199
#6  0x00007ffff7cd04ec in QFileIconProviderPrivate::getIcon (fi=..., this=0x555555c26030)
    at itemviews/qfileiconprovider.cpp:236
#7  QFileIconProvider::icon (this=<optimized out>, info=...) at itemviews/qfileiconprovider.cpp:247
#8  0x00007ffff7bfa79f in QFileInfoGatherer::getInfo (this=this@entry=0x555555a74ca0, fileInfo=...)
    at dialogs/qfileinfogatherer.cpp:332
#9  0x00007ffff7bf1971 in QFileSystemModelPrivate::node (this=this@entry=0x555555a74c10, path=..., 
    fetch=fetch@entry=true) at dialogs/qfilesystemmodel.cpp:481
#10 0x00007ffff7bf2a6f in QFileSystemModelPrivate::index (column=0, path=..., this=0x555555a74c10)
    at dialogs/qfilesystemmodel_p.h:230
#11 QFileSystemModel::setRootPath (this=this@entry=0x555555c296f0, newPath=...) at dialogs/qfilesystemmodel.cpp:1524
#12 0x000055555563de76 in NeovimQt::TreeView::handleDirectoryChanged (this=0x555555c296c0, args=...)
    at /usr/src/debug/neovim-qt-0.2.18-1.fc39.x86_64/src/gui/treeview.cpp:91
#13 0x00007ffff6ce8821 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd350, r=<optimized out>, this=0x555555d5ac70)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#14 doActivate<false> (sender=0x555555b7ab80, signal_index=4, argv=0x7fffffffd350) at kernel/qobject.cpp:3925
#15 0x00007ffff6ce3747 in QMetaObject::activate (sender=<optimized out>, m=<optimized out>, 
    local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffd350) at kernel/qobject.cpp:3985
#16 0x000055555564b420 in NeovimQt::NeovimApi0::neovimNotification (this=<optimized out>, _t1=..., _t2=...)
    at /usr/src/debug/neovim-qt-0.2.18-1.fc39.x86_64/redhat-linux-build/src/neovim-qt_autogen/3NMJRBZ332/moc_neovimapi0.cpp:2747
#17 0x00007ffff6ce8821 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd470, r=<optimized out>, this=0x555555b7ac00)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate<false> (sender=0x555555a11200, signal_index=4, argv=0x7fffffffd470) at kernel/qobject.cpp:3925
#19 0x00007ffff6ce3747 in QMetaObject::activate (sender=sender@entry=0x555555a11200, m=<optimized out>, 
    local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffd470) at kernel/qobject.cpp:3985
#20 0x000055555580a241 in NeovimQt::MsgpackIODevice::notification (_t2=..., _t1=..., this=0x555555a11200)
    at /usr/src/debug/neovim-qt-0.2.18-1.fc39.x86_64/redhat-linux-build/src/neovim-qt_autogen/EWIEGA46WW/moc_msgpackiodevice.cpp:276
#21 NeovimQt::MsgpackIODevice::dispatchNotification (this=0x555555a11200, nt=...)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /usr/src/debug/neovim-qt-0.2.18-1.fc39.x86_64/src/msgpackiodevice.cpp:409
#22 0x000055555580a762 in NeovimQt::MsgpackIODevice::dataAvailable (this=0x555555a11200)
    at /usr/src/debug/neovim-qt-0.2.18-1.fc39.x86_64/src/msgpackiodevice.cpp:180
#23 0x00007ffff6ce8821 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd5a0, r=<optimized out>, this=0x555555b02e80)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#24 doActivate<false> (sender=0x555555b287c0, signal_index=3, argv=0x7fffffffd5a0) at kernel/qobject.cpp:3925
#25 0x00007ffff6ce3747 in QMetaObject::activate (sender=sender@entry=0x555555b287c0, 
    m=m@entry=0x7ffff6f63be0 <QIODevice::staticMetaObject>, local_signal_index=local_signal_index@entry=0, 
    argv=argv@entry=0x0) at kernel/qobject.cpp:3985
#26 0x00007ffff6bff5e4 in QIODevice::readyRead (this=this@entry=0x555555b287c0) at .moc/moc_qiodevice.cpp:190
#27 0x00007ffff6c3c8df in QProcessPrivate::tryReadFromChannel (this=0x555555a69e70, channel=0x555555a69f80)
    at io/qprocess.cpp:1068
#28 0x00007ffff6c3cd04 in QProcessPrivate::_q_canReadStandardError (this=<optimized out>) at io/qprocess.cpp:1092
#29 QProcess::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffd770)
    at .moc/moc_qprocess.cpp:210
#30 0x00007ffff6ce89a8 in doActivate<false> (sender=0x555555b02f00, signal_index=3, argv=0x7fffffffd770)
    at kernel/qobject.cpp:3937
#31 0x00007ffff6ce3747 in QMetaObject::activate (sender=sender@entry=0x555555b02f00, 
    m=m@entry=0x7ffff6f67420 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, 
    argv=argv@entry=0x7fffffffd770) at kernel/qobject.cpp:3985
#32 0x00007ffff6ceb22d in QSocketNotifier::activated (this=this@entry=0x555555b02f00, _t1=..., _t2=<optimized out>, 
    _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#33 0x00007ffff6ceba9b in QSocketNotifier::event (this=0x555555b02f00, e=<optimized out>)
    at kernel/qsocketnotifier.cpp:302
#34 0x00007ffff79aeb75 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555555b02f00, 
    e=0x7fffffffd880) at kernel/qapplication.cpp:3640
#35 0x00007ffff6cb4548 in QCoreApplication::notifyInternal2 (receiver=0x555555b02f00, event=0x7fffffffd880)
    at kernel/qcoreapplication.cpp:1064
#36 0x00007ffff6cb4762 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>)
    at kernel/qcoreapplication.cpp:1462
#37 0x00007ffff6d0750f in socketNotifierSourceDispatch (source=0x555555a6f060) at kernel/qeventdispatcher_glib.cpp:107
#38 0x00007ffff5312e5c in g_main_dispatch (context=0x7fffe0000ec0) at ../glib/gmain.c:3476
#39 g_main_context_dispatch_unlocked (context=0x7fffe0000ec0) at ../glib/gmain.c:4284
#40 0x00007ffff536ddd8 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffe0000ec0, 
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#41 0x00007ffff5310ad3 in g_main_context_iteration (context=0x7fffe0000ec0, may_block=1) at ../glib/gmain.c:4414
#42 0x00007ffff6d06a89 in QEventDispatcherGlib::processEvents (this=0x555555a6ecc0, flags=...)
    at kernel/qeventdispatcher_glib.cpp:423
#43 0x00007ffff6cb2f0b in QEventLoop::exec (this=this@entry=0x7fffffffdb20, flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#44 0x00007ffff6cbb19b in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#45 0x00007ffff7160edd in QGuiApplication::exec () at kernel/qguiapplication.cpp:1863
#46 0x00007ffff79aeae9 in QApplication::exec () at kernel/qapplication.cpp:2832
#47 0x00005555556224df in ui_main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/neovim-qt-0.2.18-1.fc39.x86_64/src/gui/main.cpp:40
#48 0x00007ffff644614a in __libc_start_call_main (main=main@entry=0x555555617600 <main(int, char**)>, 
    argc=argc@entry=4, argv=argv@entry=0x7fffffffdcf8) at ../sysdeps/nptl/libc_start_call_main.h:58
#49 0x00007ffff644620b in __libc_start_main_impl (main=0x555555617600 <main(int, char**)>, argc=4, 
    argv=0x7fffffffdcf8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffdce8) at ../csu/libc-start.c:360
#50 0x0000555555617ae5 in _start ()

So it appears it is caused by NeovimQt::TreeView::handleDirectoryChanged

Although I'm not sure if it's perhaps the fault of QGtk3Theme::fileIcon and not neovim-qt.

dam9000 commented 11 months ago

It appears it's the fault of QGtk3Theme, using this work-around makes the GLib-GIO-CRITICAL errors go away:

QT_QPA_PLATFORMTHEME=gnome nvim-qt

However, the error:

QSocketNotifier: Can only be used with threads started with QThread

still remains.

In addition the option --geometry is not working, it always opens a very small window of size around 200x140

Not sure what is the proper place to report these errors.

dam9000 commented 11 months ago

Switching from wayland to Xorg fixes both issues:

So I guess it's not an issue with neovim-qt but with upstream libs.

dam9000 commented 11 months ago

closing.