Bug 467373 - Menu "Generate QR Code" crashes (tested on Falkon)
Summary: Menu "Generate QR Code" crashes (tested on Falkon)
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.104.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-14 23:14 UTC by Juraj
Modified: 2023-03-15 22:04 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juraj 2023-03-14 23:14:21 UTC
SUMMARY
After selecting an option to "Generate QR Code" from the "Share page" menu in Falkon (provided by KDE Integration plugin) the purpose window dialog to show the QR code shows up and than it closes without any error message.

STEPS TO REPRODUCE
1. Open Falkon and enable KDE Integration plugin in [preferences > extensions]
2. Go to some webpage and invoke context menu (right mouse click) and select ["Share page" > "Generate QR Code"`
3. Observe

OBSERVED RESULT
The purpose window is displayed and quickly closed.

EXPECTED RESULT
The purpose window stay open.

ADDITIONAL INFORMATION
I poked around within the barcode plugin and found that the cause of crash on my system is the "QQC2.TextField" item. When I change it to just a "TextInput" and commented out the unsupported placeholder text option it works normally and QR code is displayed.
Using the TextInput does not play well with my dark theme, so if this approach is going to be taken please ensure it works well on different color schemes, Thank you.

FALKON BUG
Bug reported for Falkon (I replicated a while ago and now as well): https://bugs.kde.org/show_bug.cgi?id=467315
Comment 1 Nicolas Fella 2023-03-15 11:12:20 UTC
Application: Falkon (falkon), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  QObject::parent (this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:519
#6  QWidget::parentWidget (this=<optimized out>) at ../../include/QtWidgets/../../src/widgets/kernel/qwidget.h:875
#7  containerWidget (w=w@entry=0x0) at styles/qstylesheetstyle.cpp:2467
#8  0x00007fd0bf220674 in QStyleSheetStyle::drawPrimitive (this=0x3345840, pe=QStyle::PE_PanelLineEdit, opt=0x3d91f90, p=0x7ffed3dac8c0, w=0x0) at styles/qstylesheetstyle.cpp:4452
#9  0x00007fcfed09be05 in KQuickStyleItem::paint (this=0x375bd40, painter=0x7ffed3dac8c0) at /home/nico/kde/src/qqc2-desktop-style/plugin/kquickstyleitem.cpp:1700
#10 0x00007fcfed09d5d6 in KQuickStyleItem::updatePolish (this=0x375bd40) at /home/nico/kde/src/qqc2-desktop-style/plugin/kquickstyleitem.cpp:1961
#11 0x00007fd0bec79502 in QQuickWindowPrivate::polishItems (this=0x3b591e0) at items/qquickwindow.cpp:393
#12 0x00007fd0bec1fd6d in QSGThreadedRenderLoop::polishAndSync (this=this@entry=0x3ba6060, w=w@entry=0x3b65d00, inExpose=inExpose@entry=true) at scenegraph/qsgthreadedrenderloop.cpp:1576
#13 0x00007fd0bec21133 in QSGThreadedRenderLoop::handleExposure (this=0x3ba6060, window=<optimized out>) at scenegraph/qsgthreadedrenderloop.cpp:1374
#14 0x00007fd0bd74e3db in QWindow::event (this=0x3a575c0, ev=<optimized out>) at kernel/qwindow.cpp:2455
#15 0x00007fd0bf17c3ae in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x3a575c0, e=0x7ffed3dacd30) at kernel/qapplication.cpp:3640
#16 0x00007fd0bd2b2848 in QCoreApplication::notifyInternal2 (receiver=0x3a575c0, event=0x7ffed3dacd30) at kernel/qcoreapplication.cpp:1064
#17 0x00007fd0bd2b29fe in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#18 0x00007fd0bd7447c7 in QGuiApplicationPrivate::processExposeEvent (e=0x3ba5e70) at kernel/qguiapplication.cpp:3261
#19 0x00007fd0bd71828c in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#20 0x00007fd0abf634d0 in userEventSourceDispatch (source=<optimized out>) at qeventdispatcher_glib.cpp:74
#21 0x00007fd0b9b15c7f in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#22 0x00007fd0b9b6c118 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#23 0x00007fd0b9b12f00 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#24 0x00007fd0bd306e36 in QEventDispatcherGlib::processEvents (this=0xb15840, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#25 0x00007fd0bd2b142b in QEventLoop::exec (this=this@entry=0x7ffed3dacff0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#26 0x00007fd0bd2b8f32 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#27 0x0000000000402807 in main (argc=1, argv=0x7ffed3dad2b8) at /home/nico/kde/src/falkon/src/main/main.cpp:74
[Inferior 1 (process 1470654) detached]

Doesn't look like a Purpose bug, rather qqc2-desktop-style
Comment 2 Nicolas Fella 2023-03-15 11:42:01 UTC
Actually it looks like https://bugreports.qt.io/browse/QTBUG-104917
Comment 3 Nicolas Fella 2023-03-15 11:53:01 UTC
Seems fixed upstream, backporting to KDE patch collection: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/246
Comment 4 Juraj 2023-03-15 15:48:32 UTC
I apologize for the mess, I did not thought of using debugger to try to catch the problem since Falkon did not crash.

Thank you for figuring it out.