Summary: | Properties dialog crashes in QWidgetLineControl::internalSetText() with .desktop file that has an equals sign in the Exec key's value | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Dmitrii Odintcov <dmitrii.odintcov> |
Component: | Properties dialog | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alve, archbert, boa_bravura_0r, bradlee.sargent, chotaotao1qaz2wsx, colin, dandyoctavian, david.alejandro.rubio, emrecansuster, eyndjl, idontfeelcomfygivingyoumyemail, kdebugs, kdelibs-bugs, matt.fagnani, mserra, nate, nicolas.fella, null, p.wibberley, qwertier.ok, revent82, shizhiex, thienkimnguyenyt311, verdatenero |
Priority: | HI | Keywords: | drkonqi |
Version: | 5.102.0 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=471533 https://bugs.kde.org/show_bug.cgi?id=466164 |
||
Latest Commit: | https://invent.kde.org/frameworks/kio/-/commit/ebad60218b9d9e6901ae48c3dec9b90da963809c | Version Fixed In: | 5.114 |
Sentry Crash Report: | |||
Attachments: | Crash-inducing autostart .desktop file |
Description
Dmitrii Odintcov
2023-02-04 19:38:05 UTC
Correction: not any app, but the one I edited Could have been caused by mistakenly adding the argument into the Program field rather than Arguments Can you please go to .config/autostart/ and attach the .desktop file of the entry you edited? (In reply to Nicolas Fella from comment #3) > Can you please go to .config/autostart/ and attach the .desktop file of the > entry you edited? I deleted that one and made one that works (see my previous comment). Do you want one that does cause the crash? Yes, having the content of a .desktop file that causes the crash would help a lot Created attachment 155957 [details]
Crash-inducing autostart .desktop file
Adding the `--window=hide` erroneously to Program instead of Arguments seems to result in the Exec line being quoted
The desktop file you attached doesn't crash for me, but editing it to add '' around the Exec does make it crash #5 0x00007fbc01cafe5c in __pthread_kill_implementation () from /lib64/libc.so.6 #6 0x00007fbc01c5fa76 in raise () from /lib64/libc.so.6 #7 0x00007fbc01c497fc in abort () from /lib64/libc.so.6 #8 0x00007fbc02298b75 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914 #9 QMessageLogger::fatal (this=this@entry=0x7ffe6c974560, msg=msg@entry=0x7fbc0258b048 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:893 #10 0x00007fbc02297ff5 in qt_assert (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:3391 #11 0x00007fbc04a7e00b in QList<QString>::first (this=0x7ffe6c9747c8) at /home/nico/kde/usr/include/QtCore/qlist.h:361 #12 0x00007fbc04b2c232 in QList<QString>::takeFirst (this=0x7ffe6c9747c8) at /home/nico/kde/usr/include/QtCore/qlist.h:603 #13 0x00007fbc04b182a3 in KDEPrivate::KDesktopPropsPlugin::KDesktopPropsPlugin (this=0x1b0d7b0, _props=0x296de80) at /home/nico/kde/src/kio/src/widgets/kpropertiesdialog.cpp:3411 #14 0x00007fbc04b062e1 in KPropertiesDialogPrivate::insertPages (this=0x3196530) at /home/nico/kde/src/kio/src/widgets/kpropertiesdialog.cpp:640 #15 0x00007fbc04b051ee in KPropertiesDialogPrivate::init (this=0x3196530) at /home/nico/kde/src/kio/src/widgets/kpropertiesdialog.cpp:435 #16 0x00007fbc04b04254 in KPropertiesDialog::KPropertiesDialog (this=0x296de80, item=..., parent=0x0) at /home/nico/kde/src/kio/src/widgets/kpropertiesdialog.cpp:241 #17 0x00007fbbd0013ced in AutostartModel::editApplication (this=0x1cbc740, row=1, context=0x1d19360) at /home/nico/kde/src/plasma-workspace/kcms/autostart/autostartmodel.cpp:468 #18 0x00007fbbd000f111 in AutostartModel::qt_static_metacall (_o=0x1cbc740, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffe6c974f90) at /home/nico/kde/build/plasma-workspace/kcms/autostart/kcm_autostart_autogen/EWIEGA46WW/moc_autostartmodel.cpp:126 #19 0x00007fbbd000f34c in AutostartModel::qt_metacall (this=0x1cbc740, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffe6c974f90) at /home/nico/kde/build/plasma-workspace/kcms/autostart/kcm_autostart_autogen/EWIEGA46WW/moc_autostartmodel.cpp:181 #20 0x00007fbc012b9d23 in QQmlObjectOrGadget::metacall (this=this@entry=0x7ffe6c975230, type=type@entry=QMetaObject::InvokeMetaMethod, index=<optimized out>, index@entry=58, argv=<optimized out>) at qml/qqmlobjectorgadget.cpp:51 #21 0x00007fbc0119d949 in CallMethod (callType=<optimized out>, callArgs=0x3, engine=<optimized out>, argTypes=<optimized out>, argCount=<optimized out>, returnType=<optimized out>, index=<optimized out>, object=...) at /home/nico/workspace/qt5/qtbase/include/QtCore/../../src/corelib/tools/qvarlengtharray.h:189 #22 CallPrecise (object=..., data=..., engine=engine@entry=0x1cb9ff0, callArgs=callArgs@entry=0x7fbbca1406a0, callType=callType@entry=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1553 #23 0x00007fbc0119f75b in CallOverloaded (callType=<optimized out>, propertyCache=<optimized out>, callArgs=<optimized out>, engine=<optimized out>, data=..., object=...) at jsruntime/qv4qobjectwrapper.cpp:1629 #24 QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2117 #25 0x00007fbc011ba457 in QV4::FunctionObject::call (argc=<optimized out>, argv=<optimized out>, thisObject=<optimized out>, this=<optimized out>) at ../../include/QtQml/5.15.8/QtQml/private/../../../../../src/qml/jsruntime/qv4functionobject_p.h:202 #26 QV4::Moth::VME::interpret (frame=0x2eddd, engine=0x1cb9ff0, code=0x1ce68f0 "\360\345\022\001\274\177") at jsruntime/qv4vme_moth.cpp:757 #27 0x00007fbc011be70f in QV4::Moth::VME::exec (frame=frame@entry=0x7ffe6c9754d0, engine=engine@entry=0x1cb9ff0) at jsruntime/qv4vme_moth.cpp:466 #28 0x00007fbc01154cf6 in QV4::Function::call (this=this@entry=0x1ce4670, thisObject=<optimized out>, argv=argv@entry=0x7fbbca140600, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:69 #29 0x00007fbc012d35ea in QQmlJavaScriptExpression::evaluate (this=this@entry=0x2d709e0, callData=callData@entry=0x7fbbca1405d0, isUndefined=isUndefined@entry=0x0) at qml/qqmljavascriptexpression.cpp:212 #30 0x00007fbc0128761f in QQmlBoundSignalExpression::evaluate (this=<optimized out>, a=<optimized out>) at ../../include/QtQml/5.15.8/QtQml/private/../../../../../src/qml/jsruntime/qv4jscall_p.h:95 #31 0x00007fbc01288c80 in QQmlBoundSignal_callback (e=0x2d70990, a=0x7ffe6c9770d0) at ../../include/QtQml/5.15.8/QtQml/private/../../../../../src/qml/qml/qqmlboundsignalexpressionpointer_p.h:69 #32 0x00007fbc012b985f in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x7ffe6c9770d0) at qml/qqmlnotifier.cpp:104 #33 0x00007fbc024e782d in doActivate<false> (sender=0x2d702f0, signal_index=11, argv=0x7ffe6c9770d0) at kernel/qobject.cpp:3815 *** Bug 464188 has been marked as a duplicate of this bug. *** The problem is we have an Exec line like "Exec='solaar --window=hide'". Because of the = it gets parsed as an environment variable and stripped away, leaving an empty command, which causes the crash Interestingly, desktop-file-validate doesn't flag that file as broken: $ desktop-file-validate ~/Desktop/crashme.desktop /home/nate/Desktop/crashme.desktop: warning: value "" for key "Path" in group "Desktop Entry" does not look like an absolute path /home/nate/Desktop/crashme.desktop: warning: key "TerminalOptions" in group "Desktop Entry" is deprecated $ echo $? 0 *** Bug 465546 has been marked as a duplicate of this bug. *** Exactly the same problem here. After add --window=hide to solaar autostart, I can't edit this entry anymore. Fresh new installed KDE neon. *** Bug 466757 has been marked as a duplicate of this bug. *** (In reply to Dmitrii Odintcov from comment #2) > Could have been caused by mistakenly adding the argument into the Program > field rather than Arguments This is exactly what I did, and crashed Plasma. *** Bug 468722 has been marked as a duplicate of this bug. *** *** Bug 473927 has been marked as a duplicate of this bug. *** *** Bug 473998 has been marked as a duplicate of this bug. *** *** Bug 474189 has been marked as a duplicate of this bug. *** *** Bug 472325 has been marked as a duplicate of this bug. *** *** Bug 473290 has been marked as a duplicate of this bug. *** *** Bug 478464 has been marked as a duplicate of this bug. *** *** Bug 473034 has been marked as a duplicate of this bug. *** *** Bug 468346 has been marked as a duplicate of this bug. *** *** Bug 469451 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 466164 *** In progress with https://invent.kde.org/frameworks/kio/-/merge_requests/1510. *** Bug 466164 has been marked as a duplicate of this bug. *** *** Bug 466417 has been marked as a duplicate of this bug. *** *** Bug 468420 has been marked as a duplicate of this bug. *** *** Bug 469494 has been marked as a duplicate of this bug. *** Git commit 78d4364677fbe658c6e05d19bb158f895403ccc9 by Harald Sitter. Committed on 14/12/2023 at 04:24. Pushed by sitter into branch 'master'. kpropertiesdialog: don't trip over malformed Exec when the user incorrectly put env vars into the Program field the resulting desktop file will be somewhat malformed and literally contain > Exec='FOO=1 Bar' this then needs careful handling when parsing so we don't accidentally drain the execline list. when this scenario appears we'll need to assume the last item in the list is the program as we can't really tell if it is a program that looks like an env var or an env var without program M +8 -0 src/widgets/kpropertiesdialogbuiltin_p.cpp https://invent.kde.org/frameworks/kio/-/commit/78d4364677fbe658c6e05d19bb158f895403ccc9 This is fixed for the properties dialog, but not kmenuedit, which has the same bug Git commit ebad60218b9d9e6901ae48c3dec9b90da963809c by Harald Sitter. Committed on 18/12/2023 at 08:52. Pushed by sitter into branch 'kf5'. kpropertiesdialog: don't trip over malformed Exec when the user incorrectly put env vars into the Program field the resulting desktop file will be somewhat malformed and literally contain > Exec='FOO=1 Bar' this then needs careful handling when parsing so we don't accidentally drain the execline list. when this scenario appears we'll need to assume the last item in the list is the program as we can't really tell if it is a program that looks like an env var or an env var without program (cherry picked from commit 78d4364677fbe658c6e05d19bb158f895403ccc9) M +6 -0 src/widgets/kpropertiesdialog.cpp https://invent.kde.org/frameworks/kio/-/commit/ebad60218b9d9e6901ae48c3dec9b90da963809c KMenuEdit actually appears to be fixed as well; I can no longer reproduce the issue there. But just in case I'm wrong, I've marked all the KMenuEdit crashes as duplicates of Bug 466164, so we can just un-dupe that one if needed. *** Bug 478646 has been marked as a duplicate of this bug. *** *** Bug 479797 has been marked as a duplicate of this bug. *** *** Bug 485297 has been marked as a duplicate of this bug. *** |