Bug 470786 - templates/private/PassiveNotificationManager.qml:226: TypeError: Cannot read property 'callBack' of undefined
Summary: templates/private/PassiveNotificationManager.qml:226: TypeError: Cannot read ...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: Master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-06-08 12:15 UTC by Jack Hill
Modified: 2023-06-26 11:16 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Hill 2023-06-08 12:15:59 UTC
SUMMARY
On the kf5 branch, there is a type error that sometimes occurs when clicking Elisa's "Undo" button on it's passive notification. This is caused by commit 3a1c087e in Kirigami.

STEPS TO REPRODUCE
1. Build Kirigami from commit 3a1c087e in branch kf5
2. Build Elisa from the master branch
3. Run Elisa
4. Add a track to the Playlist
5. Start playing a different track by pressing the "Play from here, replacing current playlist" button
6. Click the Undo button that appears at the bottom of the window

OBSERVED RESULT
The Playlist is not restored to its previous state.
In the console:
    file:///home/jack/Dev/KDE/usr/lib64/qml/org/kde/kirigami.2/templates/private/PassiveNotificationsManager.qml:220: TypeError: Cannot read property 'callBack' of undefined

EXPECTED RESULT
The Playlist should be restored to its previous state, and no error in the console.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230605
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.4-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Jack Hill 2023-06-08 12:25:01 UTC
BTW the error is at line 220 for commit 3a1c087e, or line 226 for the current head of kf5 (commit 74155121)
Comment 2 ratijas 2023-06-09 21:40:48 UTC
hmm, can confirm with those specific steps.
Comment 3 Jack Hill 2023-06-14 18:21:27 UTC
Also forgot to mention that this only happens when clearing a playlist using the "Play from here, replacing current playlist" button. There is another button called "Clear All" which can  be found in the footer of the playlist sidebar. Clicking this button will also bring up the same passive notification. However this time the "Undo" button works as expected without the type error.
Comment 4 Bug Janitor Service 2023-06-23 10:06:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1142
Comment 5 Bug Janitor Service 2023-06-23 10:58:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1144
Comment 6 ratijas 2023-06-26 11:08:17 UTC
Git commit 99d5e2ac9d7445bc4d6c17ff222a5d8cba790d2b by ivan tkachenko, on behalf of Matej Starc.
Committed on 26/06/2023 at 11:08.
Pushed by ratijas into branch 'master'.

PassiveNotificationsManager: Fix callBack lifetime

Set QtObject's parent when creating it to prevent premature destruction.

M  +1    -2    src/controls/templates/private/PassiveNotificationsManager.qml

https://invent.kde.org/frameworks/kirigami/-/commit/99d5e2ac9d7445bc4d6c17ff222a5d8cba790d2b
Comment 7 ratijas 2023-06-26 11:16:23 UTC
Git commit 822c50c9473256a8682ab3b5f83efaff31050991 by ivan tkachenko, on behalf of Matej Starc.
Committed on 26/06/2023 at 11:08.
Pushed by ratijas into branch 'kf5'.

PassiveNotificationsManager: Fix callBack lifetime

Set QtObject's parent when creating it to prevent premature destruction.
(cherry picked from commit 99d5e2ac9d7445bc4d6c17ff222a5d8cba790d2b)

M  +1    -2    src/controls/templates/private/PassiveNotificationsManager.qml

https://invent.kde.org/frameworks/kirigami/-/commit/822c50c9473256a8682ab3b5f83efaff31050991