Bug 456047 - Crashes once at startup in ImageColors::update()
Summary: Crashes once at startup in ImageColors::update()
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords: drkonqi
: 457742 459685 460170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-27 18:35 UTC by Aleix Pol
Modified: 2022-10-10 18:51 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleix Pol 2022-06-27 18:35:36 UTC
Application: plasmashell (5.25.80)
 (Compiled from sources)
Qt Version: 5.15.3
Frameworks Version: 5.96.0
Operating System: Linux 5.18.7-arch1-1 x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 5.25.80 [KCrashBackend]

-- Information about the crash:
Crashes once, then it restarts and it all works, possibly because one display is rotated?

The crash can be reproduced sometimes.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  0x0000000000000000 in  ()
#6  0x00007fe7508d8216 in QFutureWatcherBase::cancel() (this=<optimized out>) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/thread/qfuturewatcher.cpp:133
#7  0x00007fe72c077ffc in ImageColors::update() (this=0x5626abb6a970) at /home/apol/devel/frameworks/kirigami/src/imagecolors.cpp:140
#8  0x00007fe72c07a4f1 in ImageColors::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5626abb6a970, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7ffe6945a500) at src/KirigamiPlugin_autogen/include/moc_imagecolors.cpp:194
#9  0x00007fe72c07b19c in ImageColors::qt_metacall(QMetaObject::Call, int, void**) (this=0x5626abb6a970, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7ffe6945a500) at src/KirigamiPlugin_autogen/include/moc_imagecolors.cpp:394
#10 0x00007fe752ac94f3 in QQmlObjectOrGadget::metacall(QMetaObject::Call, int, void**) const (this=0x7ffe6945a750, this@entry=0x7ffe6945a5a0, type=type@entry=QMetaObject::InvokeMetaMethod, index=<optimized out>, index@entry=15, argv=argv@entry=0x7ffe6945a500) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/qml/qqmlobjectorgadget.cpp:51
#11 0x00007fe7529a11ad in CallMethod (callType=QMetaObject::InvokeMetaMethod, callArgs=0x7fe7489c0580, engine=0x5626ab8bb830, argTypes=0x0, argCount=0, returnType=43, index=<optimized out>, object=...) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:1318
#12 CallPrecise(QQmlObjectOrGadget const&, QQmlPropertyData const&, QV4::ExecutionEngine*, QV4::CallData*, QMetaObject::Call) (object=..., data=..., engine=engine@entry=0x5626ab8bb830, callArgs=callArgs@entry=0x7fe7489c0580, callType=callType@entry=QMetaObject::InvokeMetaMethod) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:1572
#13 0x00007fe7529a449b in CallOverloaded (callType=<optimized out>, propertyCache=<optimized out>, callArgs=<optimized out>, engine=<optimized out>, data=<optimized out>, object=<optimized out>) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:1644
#14 QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=<optimized out>) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:2132
#15 0x00007fe7529d3a7a in QV4::FunctionObject::call(QV4::Value const*, QV4::Value const*, int) const (argc=0, argv=0x7fe7489c0500, thisObject=0x7fe7489c0538, this=0x7ffe6945a878) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/jsruntime/qv4functionobject_p.h:202
#16 QV4::Runtime::CallPropertyLookup::call(QV4::ExecutionEngine*, QV4::Value const&, unsigned int, QV4::Value*, int) (engine=0x5626ab8bb830, base=..., index=<optimized out>, argv=0x7fe7489c0500, argc=0) at /home/apol/devel/frameworks/qt5/qtdeclarative/src/qml/jsruntime/qv4runtime.cpp:1460
#17 0x00007fe67ce62de2 in  ()
#18 0x0000000000000000 in  ()
[Inferior 1 (process 85486) detached]

Reported using DrKonqi
Comment 1 Patrick Silva 2022-06-27 23:36:04 UTC
Crash on neon unstable running on my laptop without any external screen too.
Comment 2 Fushan Wen 2022-06-29 03:40:29 UTC
Can you confirm

https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1873

and

https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1008

fix your bug?

The bug is likely to be caused by "divide by zero" in ImageColors.
Comment 3 Nate Graham 2022-06-29 19:04:26 UTC
.
Comment 4 Nicolas Fella 2022-08-15 15:39:03 UTC
*** Bug 457742 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2022-08-19 05:02:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/721
Comment 6 Nate Graham 2022-09-12 16:16:47 UTC
Git commit 1337d3ffddd7e7ce563ecb14b1ad5730edc97a32 by Nate Graham, on behalf of Weng Xuetian.
Committed on 12/09/2022 at 16:13.
Pushed by ngraham into branch 'master'.

Always reset m_futureImageData to null after deleteLater

Two calls to ImageColors::update() in row may access a deleted
m_futureImageData and cause crash.

M  +1    -0    src/imagecolors.cpp

https://invent.kde.org/frameworks/kirigami/commit/1337d3ffddd7e7ce563ecb14b1ad5730edc97a32
Comment 7 Nicolas Fella 2022-09-26 15:35:59 UTC
*** Bug 459685 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-10-10 18:51:49 UTC
*** Bug 460170 has been marked as a duplicate of this bug. ***