Bug 472193 - Various crashes when creating two views of an animated file and trying to play any of them
Summary: Various crashes when creating two views of an animated file and trying to pla...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2023-07-12 15:21 UTC by Dmitry Kazakov
Modified: 2023-07-25 04:01 UTC (History)
0 users

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 Dmitry Kazakov 2023-07-12 15:21:14 UTC
STEPS TO REPRODUCE
1. Open a document with animation (don't create from scratch, since it involves the cache populator and long delay when constructing the image hides the problem) 
2. Winodw->View->New View
3. Window->Tiled (to make both views visible)
4. Click Play button

OBSERVED RESULT

Frame cache generation dialog appears followed by an assert/crash, depending on the OS:

Windows: assert triggers in KisAsyncAnimationRendererBase::notifyFrameCompleted:
KIS_SAFE_ASSERT_RECOVER_RETURN(m_d->requestedFrame == frame)

Linux: crash in timer even handler:

Thread 1 (Thread 0x7ffff06fe840 (LWP 678131) "krita"):
#0  0x00007ffff777fd32 in KisPlaybackEngineQT::throttledDriverCallback (this=0x5555576c9c10) at /home/appimage/persistent/krita/libs/ui/KisPlaybackEngineQT.cpp:358
        neededRefresh = true
        targetFrame = 1
        displayProxy = 0x5555586ccea0
        animInterface = <optimized out>
        currentFrame = 0
        startFrame = 0
        endFrame = 100
        timeSinceLastFrame = <optimized out>
        timePerFrame = <optimized out>
        extraFrames = 0
#1  0x00007ffff5793c28 in ?? () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
No symbol table info available.
#2  0x00007ffff5793c28 in ?? () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
No symbol table info available.
#3  0x00007ffff5797c9e in QTimer::timeout(QTimer::QPrivateSignal) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
No symbol table info available.
#4  0x00007ffff57894ff in QObject::event(QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
No symbol table info available.
#5  0x00007ffff62ad7e3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
No symbol table info available.
#6  0x00007ffff7bd7a45 in KisApplication::notify (this=0x7fffffffd400, receiver=0x55555e674500, event=0x7fffffffce90) at /home/appimage/persistent/krita/libs/ui/KisApplication.cpp:767
        guard = {m_info = 0x555555edd9b0}

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

I have tested in this branch, but it seems like the MR change should not be related:
https://invent.kde.org/graphics/krita/-/merge_requests/1843
Comment 1 Dmitry Kazakov 2023-07-13 08:58:23 UTC
It seems like the crash is fixed by this commit (a part of a MR still):
https://invent.kde.org/graphics/krita/-/merge_requests/1843/diffs?commit_id=bdd4d25e859404e10829989f8e3b2176be021ee8
Comment 2 Dmitry Kazakov 2023-07-14 07:09:09 UTC
It looks like the bug is fixed in the proposed MR :)

https://invent.kde.org/graphics/krita/-/merge_requests/1843
Comment 3 Emmet O'Neill 2023-07-25 04:01:00 UTC
Git commit b3bf9685dc1d7edf471d67703a243f4738d5975e by Emmet O'Neill, on behalf of Dmitry Kazakov.
Committed on 25/07/2023 at 05:44.
Pushed by emmetoneill into branch 'master'.

Properly intialize KisFrameDisplayProxy to avoid hiccups on the first playback start
Related: bug 472192

M  +2    -0    libs/ui/animation/KisFrameDisplayProxy.cpp

https://invent.kde.org/graphics/krita/-/commit/b3bf9685dc1d7edf471d67703a243f4738d5975e