Bug 489753 - Opening file dialog to save file in Neochat flatpak quits the app
Summary: Opening file dialog to save file in Neochat flatpak quits the app
Status: RESOLVED UPSTREAM
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: git-master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-04 20:29 UTC by Jan Rathmann
Modified: 2024-07-17 22:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: Qt 6.7.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Rathmann 2024-07-04 20:29:23 UTC
SUMMARY
If the file dialog for saving a file is opened in Neochat flatpak, the whole program quits.

STEPS TO REPRODUCE
1. Install Neochat flatpak from Flathub
2. Open a chat that contains messages with files/images attached.
3. Click on download button, or right-click, "Save as..:" on an image.

OBSERVED RESULT
File dialog window appears briefly (~0.5-2 sec.), then it disappears and NeoChat quits with console output like this:

kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.kio.core: Invalid URL: QUrl("/home/jan/Downloads")
kf.kio.widgets: Failed to check which JobView API is supported "org.freedesktop.DBus.Error.ServiceUnknown"
kf.kio.core: Invalid URL: QUrl("/home/jan/Downloads")
kf.kio.core: Invalid URL: QUrl("/")
kf.kio.core: Invalid URL: QUrl("/home")
kf.kio.core: Invalid URL: QUrl("/home/jan")
kf.kio.core: Invalid URL: QUrl("/home/jan/Downloads")
ASSERT: "!protocol.isEmpty()" in file /run/build-runtime/kio/src/core/kprotocolinfofactory.cpp, line 60

EXPECTED RESULT
File dialog lets you save the file (and Neochat keeps running ;-) ).

SOFTWARE/OS VERSIONS
Reproduced on
* Kubuntu 24.04 + self-build Plasma 6.1.2
* Kubuntu 24.04 + Plasma 5.27.11 (distro packages)
* Neon Unstable VM (Plasma 6.2-dev)

ADDITIONAL INFORMATION
@nicofee could also reproduce.
Comment 1 Nicolas Fella 2024-07-06 13:48:15 UTC
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff3ea3e83 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff3e51dce in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff3e3983f in __GI_abort () at abort.c:79
#4  0x00007ffff44c3183 in qAbort () at /run/build-runtime/qt6-qtbase/src/corelib/global/qglobal.cpp:161
#5  0x00007ffff45073b0 in qt_message_fatal<QString&> (message=..., context=<optimized out>) at /run/build-runtime/qt6-qtbase/src/corelib/global/qlogging.cpp:2003
#6  qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *)
    (msgType=msgType@entry=QtFatalMsg, context=..., msg=msg@entry=0x7ffff4892d10 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7fffffff9490)
    at /run/build-runtime/qt6-qtbase/src/corelib/global/qlogging.cpp:378
#7  0x00007ffff44c417f in QMessageLogger::fatal (this=this@entry=0x7fffffff9578, msg=msg@entry=0x7ffff4892d10 "ASSERT: \"%s\" in file %s, line %d")
    at /run/build-runtime/qt6-qtbase/src/corelib/global/qlogging.cpp:901
#8  0x00007ffff44c30d8 in qt_assert
    (assertion=assertion@entry=0x7ffff674d900 "!protocol.isEmpty()", file=file@entry=0x7ffff6749708 "/run/build-runtime/kio/src/core/kprotocolinfofactory.cpp", line=line@entry=60) at /run/build-runtime/qt6-qtbase/src/corelib/global/qassert.cpp:68
#9  0x00007ffff65fff1f in KProtocolInfoFactory::findProtocol (this=<optimized out>, protocol=..., updateCacheIfNotfound=updateCacheIfNotfound@entry=true)
    at /run/build-runtime/kio/src/core/kprotocolinfofactory.cpp:60
#10 0x00007ffff66ca256 in KProtocolInfo::proxiedBy (_protocol=...) at /run/build-runtime/kio/src/core/kprotocolinfo.cpp:291
#11 0x00007ffff66b40dd in findProtocol (url=...) at /run/build-runtime/kio/src/core/kprotocolmanager.cpp:661
#12 0x00007ffff66b433d in KProtocolManager::supportsListing (url=...) at /run/build-runtime/kio/src/core/kprotocolmanager.cpp:701
#13 0x00007ffff0296e13 in KDirOperatorPrivate::openUrl (this=0x555559f5a9f0, url=..., flags=flags@entry=...)
    at /run/build-runtime/kio/src/filewidgets/kdiroperator.cpp:968
#14 0x00007ffff029f189 in KDirOperator::setUrl (this=0x555559f5a990, _newurl=<optimized out>, clearforward=<optimized out>) at /usr/include/QtCore/qflags.h:74
#15 0x00007ffff03c1545 in KDEPlatformFileDialog::selectFile (filename=..., this=0x555558e32460)
    at /run/build-runtime/plasma-integration/qt6/src/platformtheme/kdeplatformfiledialoghelper.cpp:91
#16 KDEPlatformFileDialogHelper::selectFile (this=0x7fff380c5940, filename=...)
    at /run/build-runtime/plasma-integration/qt6/src/platformtheme/kdeplatformfiledialoghelper.cpp:415
#17 0x00007ffff06b0676 in QXdgDesktopPortalFileDialog::selectFile (this=<optimized out>, filename=...)
    at /run/build-runtime/qt6-qtbase/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp:340
#18 0x00007fffdbeb57c3 in QQuickLabsPlatformFileDialog::setCurrentFiles (this=0x555559625840, files=...)
    at /run/build-runtime/qt6-qtdeclarative/src/labs/platform/qquicklabsplatformfiledialog.cpp:215
#19 0x00007fffdbeb693b in QQuickLabsPlatformFileDialog::setCurrentFile (this=0x555559625840, file=<optimized out>) at /usr/include/QtCore/qlist.h:113
#20 0x00007fffdbeb83f2 in QQuickLabsPlatformFileDialog::qt_metacall (this=0x555559625840, _c=QMetaObject::WriteProperty, _id=3, _a=0x7fffffff99e0)
    at /run/build-runtime/qt6-qtdeclarative/src/labs/platform/qtlabsplatformplugin_autogen/include/moc_qquicklabsplatformfiledialog_p.cpp:534
#21 0x00007ffff70ffb61 in QQmlPropertyData::doMetacall<(QMetaObject::Call)2> (this=0x7fffac888f20, argv=0x7fffffff99e0, idx=<optimized out>, object=0x89a390de2c45c300)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:320
#22 QQmlPropertyData::writeProperty (this=this@entry=0x7fffac888f20, target=target@entry=0x555559625840, value=value@entry=0x7fffffff9aa8, flags=..., flags@entry=...)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:340
#23 0x00007ffff71d7a66 in QQmlPropertyPrivate::write (object=object@entry=0x555559625840, property=..., value=..., context=..., flags=..., flags@entry=...)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/qml/qqmlproperty.cpp:1575
#24 0x00007ffff704d847 in QV4::QObjectWrapper::setProperty (engine=engine@entry=0x555556303420, object=object@entry=0x555559625840, property=0x7fffac888f20, value=...)
    at /usr/include/QtCore/qflags.h:73
#25 0x00007ffff704e206 in QV4::QObjectWrapper::setQmlProperty
    (engine=engine@entry=0x555556303420, qmlContext=..., object=0x555559625840, name=<optimized out>, flags=flags@entry=..., value=...)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:465
#26 0x00007ffff704e3e6 in QV4::QObjectWrapper::virtualPut (m=0x7fffe43bf538, id=..., value=..., receiver=0x7fffe43bf538)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:837
#27 0x00007ffff702820f in QV4::Object::put (receiver=0x7fffe43bf538, v=<optimized out>, id=..., this=0x7fffe43bf538)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4object_p.h:41
#28 QV4::Object::virtualResolveLookupSetter (object=0x7fffe43bf538, engine=0x555556303420, lookup=0x55555979a450, value=<optimized out>)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4object.cpp:816
#29 0x00007ffff70ac165 in QV4::Moth::VME::interpret (frame=0x16, frame@entry=0x7fffffffa1d0, engine=0x555556303420, code=0x555555c92925 "\032\n\006\324\026\006\002")
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4vme_moth.cpp:801
#30 0x00007ffff70b2597 in QV4::Moth::VME::exec (frame=frame@entry=0x7fffffffa1d0, engine=engine@entry=0x555556303420)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4vme_moth.cpp:584
#31 0x00007ffff6ffe186 in QV4::doCall
    (self=self@entry=0x555559793be0, thisObject=<optimized out>, argv=argv@entry=0x7fffe43bf4f0, argc=argc@entry=1, context=context@entry=0x7fffc3e1df90)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4function.cpp:54
#32 0x00007ffff6ffe57a in QV4::Function::call
    (this=this@entry=0x555559793be0, thisObject=<optimized out>, argv=argv@entry=0x7fffe43bf4f0, argc=argc@entry=1, context=context@entry=0x7fffc3e1df90)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4function.cpp:79
#33 0x00007ffff6ffe78b in operator() (argc=1, argv=0x7fffe43bf4f0, thisObject=<optimized out>, __closure=<synthetic pointer>)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4function.cpp:30
#34 QV4::convertAndCall<QV4::Function::call(QObject*, void**, const QMetaType*, int, QV4::ExecutionContext*)::<lambda(const QV4::Value*, const QV4::Value*, int)> >
    (call=..., argc=1, types=0x7fffffffa478, a=0x7fffffffbf10, thisObject=0x555559726be0, engine=<optimized out>)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4jscall_p.h:173
#35 QV4::Function::call (this=0x555559793be0, thisObject=0x555559726be0, a=a@entry=0x7fffffffbf10, types=0x7fffffffa478, argc=1, context=0x7fffc3e1df90)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/jsruntime/qv4function.cpp:27
#36 0x00007ffff71871c7 in QQmlJavaScriptExpression::evaluate (this=this@entry=0x5555581e2e70, a=a@entry=0x7fffffffbf10, types=<optimized out>, argc=argc@entry=1)
    at /run/build-runtime/qt6-qtdeclarative/src/qml/qml/qqmljavascriptexpression_p.h:248
#37 0x00007ffff71055cd in QQmlBoundSignalExpression::evaluate (this=0x5555581e2e70, a=a@entry=0x7fffffffbf10) at /usr/include/QtCore/qvarlengtharray.h:85
#38 0x00007ffff7106110 in QQmlBoundSignal_callback (e=0x555558f2e5a0, a=0x7fffffffbf10) at /run/build-runtime/qt6-qtdeclarative/src/qml/qml/ftw/qqmlrefcount_p.h:72
#39 0x00007ffff71b30ac in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x7fffffffbf10) at /run/build-runtime/qt6-qtdeclarative/src/qml/qml/qqmlnotifier.cpp:70
#40 0x00007ffff45df6c0 in doActivate<false> (sender=0x555559726be0, signal_index=11, argv=0x7fffffffbf10)
    at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobject.cpp:3931
#41 0x00007ffff45d6057 in QMetaObject::activate
    (sender=sender@entry=0x555559726be0, m=m@entry=0x7ffff1c44d80 <QQuickAction::staticMetaObject>, local_signal_index=local_signal_index@entry=8, argv=argv@entry=0x7fffffffbf10) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobject.cpp:4099
#42 0x00007ffff1ae2d14 in QQuickAction::triggered (this=this@entry=0x555559726be0, _t1=<optimized out>, _t1@entry=0x5555564e6ac0)
    at /run/build-runtime/qt6-qtdeclarative/src/quicktemplates/QuickTemplates2_autogen/include/moc_qquickaction_p.cpp:488
#43 0x00007ffff1ae3e61 in QQuickActionPrivate::trigger (this=0x55555974b640, source=0x5555564e6ac0, doToggle=false)
    at /run/build-runtime/qt6-qtdeclarative/src/quicktemplates/qquickaction.cpp:526
#44 0x00007ffff1ada820 in QQuickAbstractButtonPrivate::trigger (this=this@entry=0x5555564e6ba0, doubleClick=doubleClick@entry=false)
    at /run/build-runtime/qt6-qtdeclarative/src/quicktemplates/qquickabstractbutton.cpp:355
#45 0x00007ffff1add6ea in QQuickAbstractButtonPrivate::handleRelease (this=0x5555564e6ba0, point=..., timestamp=34770540)
    at /run/build-runtime/qt6-qtdeclarative/src/quicktemplates/qquickabstractbutton.cpp:167
#46 0x00007ffff1af96a5 in QQuickControl::mouseReleaseEvent (this=<optimized out>, event=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtdeclarative/src/quicktemplates/qquickcontrol.cpp:2049
#47 0x00007ffff760c2b8 in QQuickItem::event (this=0x5555564e6ac0, ev=0x7fffffffcbd0) at /run/build-runtime/qt6-qtdeclarative/src/quick/items/qquickitem.cpp:8920
#48 0x00007ffff5b9be48 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5555564e6ac0, e=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtbase/src/widgets/kernel/qapplication.cpp:3296
#49 0x00007ffff457edf8 in QCoreApplication::notifyInternal2 (receiver=0x5555564e6ac0, event=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qcoreapplication.cpp:1121
#50 0x00007ffff457effd in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>)
    at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qcoreapplication.cpp:1539
#51 0x00007ffff779a35d in QQuickDeliveryAgentPrivate::deliverMatchingPointsToItem
    (this=this@entry=0x5555562e9510, item=item@entry=0x5555564e6ac0, isGrabber=isGrabber@entry=true, pointerEvent=pointerEvent@entry=0x7fffffffcbd0, handlersOnly=handlersOnly@entry=false) at /run/build-runtime/qt6-qtdeclarative/src/quick/util/qquickdeliveryagent.cpp:2192
#52 0x00007ffff779b1f6 in QQuickDeliveryAgentPrivate::deliverUpdatedPoints (this=this@entry=0x5555562e9510, event=event@entry=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtdeclarative/src/quick/util/qquickdeliveryagent.cpp:2024
#53 0x00007ffff779c223 in QQuickDeliveryAgentPrivate::deliverPointerEvent (this=this@entry=0x5555562e9510, event=event@entry=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtdeclarative/src/quick/util/qquickdeliveryagent.cpp:1866
#54 0x00007ffff779d6db in QQuickDeliveryAgentPrivate::handleMouseEvent (this=this@entry=0x5555562e9510, event=event@entry=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtdeclarative/src/quick/util/qquickdeliveryagent.cpp:1657
#55 0x00007ffff779f390 in QQuickDeliveryAgent::event (this=<optimized out>, ev=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtdeclarative/src/quick/util/qquickdeliveryagent.cpp:705
#56 0x00007ffff76b700b in QQuickWindow::event (this=<optimized out>, event=<optimized out>)
    at /run/build-runtime/qt6-qtdeclarative/src/quick/items/qquickwindow.cpp:1508
#57 0x00007ffff5b9be48 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5555563c44d0, e=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtbase/src/widgets/kernel/qapplication.cpp:3296
#58 0x00007ffff457edf8 in QCoreApplication::notifyInternal2 (receiver=0x5555563c44d0, event=0x7fffffffcbd0)
    at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qcoreapplication.cpp:1121
#59 0x00007ffff457f00d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>)
    at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qcoreapplication.cpp:1553
#60 0x00007ffff4fe3f6f in QGuiApplicationPrivate::processMouseEvent (e=0x7fff3801e000) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qguiapplication.cpp:2325
#61 0x00007ffff5042b4c in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1109
#62 0x00007ffff551f554 in userEventSourceDispatch (source=source@entry=0x555555f9bd40)
    at /run/build-runtime/qt6-qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#63 0x00007ffff3d2ae59 in g_main_dispatch (context=0x7fffe8000f10) at ../glib/gmain.c:3460
#64 g_main_context_dispatch (context=0x7fffe8000f10) at ../glib/gmain.c:4200
#65 0x00007ffff3d882b8 in g_main_context_iterate.isra.0 (context=context@entry=0x7fffe8000f10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/gmain.c:4276
#66 0x00007ffff3d28513 in g_main_context_iteration (context=0x7fffe8000f10, may_block=1) at ../glib/gmain.c:4343
#67 0x00007ffff486026f in QEventDispatcherGlib::processEvents (this=0x555555f89ba0, flags=...)
    at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#68 0x00007ffff458bc4b in QEventLoop::exec (this=this@entry=0x7fffffffcfa0, flags=..., flags@entry=...) at /run/build-runtime/qt6-qtbase/src/corelib/global/qflags.h:34
#69 0x00007ffff4587ead in QCoreApplication::exec () at /run/build-runtime/qt6-qtbase/src/corelib/global/qflags.h:74
#70 0x00005555556128bc in ??? ()
#71 0x00007ffff3e3b08a in __libc_start_call_main (main=main@entry=0x555555611620, argc=argc@entry=1, argv=argv@entry=0x7fffffffd348)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#72 0x00007ffff3e3b14b in __libc_start_main_impl
    (main=0x555555611620, argc=1, argv=0x7fffffffd348, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd338)
    at ../csu/libc-start.c:360
#73 0x000055555570c195 in ??? ()
Comment 2 Nicolas Fella 2024-07-06 13:56:29 UTC
QXdgDesktopPortalFileDialog::selectFile triggers the native file dialog, which then later crashes
Comment 3 Nicolas Fella 2024-07-06 17:35:53 UTC
Fixed with https://codereview.qt-project.org/c/qt/qtbase/+/574959