Summary: | Crash when moving a file layer that had a transform mask attached. [gdb backtrace] | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | wolthera <griffinvalley> |
Component: | Tools/Transform | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | halla |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kde/krita/commit/77c57103e7b9c322ddbe189bda1656afed927508 | Version Fixed In: | |
Sentry Crash Report: |
Description
wolthera
2019-09-26 13:35:57 UTC
This is one for dmitry. The assert happens here: void prepareClone(KisPaintDeviceSP src) { prepareCloneImpl(src, src->m_d->currentData()); Q_ASSERT(fastBitBltPossible(src)); } It's possible the assert is just broken when layers have been moved since it does: bool fastBitBltPossibleImpl(Data *srcData) { return x() == srcData->x() && y() == srcData->y() && *colorSpace() == *srcData->colorSpace(); } The assert is correct, but the entire situation is not :) Moves are usually exclusive, I don't know how it could happen concurrently. Git commit b3c150e21993cd63105454aeae73f4b4ec9efb8c by Dmitry Kazakov. Committed on 20/11/2019 at 11:27. Pushed by dkazakov into branch 'master'. Make sure that fake original() of KisFileLayer has defaultBounds() set Before KisFileLayer loaded its image (or when the image is not available), file layer uses a fake paint device. This paint device should also have proper default bounds set. M +9 -0 libs/ui/kis_file_layer.cpp M +2 -0 libs/ui/kis_file_layer.h https://invent.kde.org/kde/krita/commit/b3c150e21993cd63105454aeae73f4b4ec9efb8c Git commit e57bcfc223f90a74b8b821cc405d5efd232c281c by Dmitry Kazakov. Committed on 20/11/2019 at 11:27. Pushed by dkazakov into branch 'master'. Implement KisDefaultBounds::sourceCookie() It is needed for debugging/sanity-check purposes only. It returns an abstract pointer to the source object, where default bounds takes its data from. One can ckeck if the pointer is null or compare two pointers of different default bounds objects. M +11 -1 libs/image/kis_default_bounds.cpp M +2 -0 libs/image/kis_default_bounds.h M +13 -0 libs/image/kis_default_bounds_base.h https://invent.kde.org/kde/krita/commit/e57bcfc223f90a74b8b821cc405d5efd232c281c Git commit 4686d100ce0cfcbbf0ccc360eb46e886e5a9b069 by Dmitry Kazakov. Committed on 20/11/2019 at 11:27. Pushed by dkazakov into branch 'master'. Add a bit of debugging capabilities to KisCachedPaintDevice M +8 -0 libs/image/kis_cached_paint_device.h https://invent.kde.org/kde/krita/commit/4686d100ce0cfcbbf0ccc360eb46e886e5a9b069 Git commit 77c57103e7b9c322ddbe189bda1656afed927508 by Dmitry Kazakov. Committed on 20/11/2019 at 11:27. Pushed by dkazakov into branch 'master'. Fix crash when moving a layer under a transformation mask When doing KisPaintDevice::prepareClone(), we should first set new defaultBounds object, and only after that clone the data. The reason for this: switching defaultBounds can change current level-of-detail/frameId, and therefore, switch currentData(). M +10 -4 libs/image/kis_paint_device.cc https://invent.kde.org/kde/krita/commit/77c57103e7b9c322ddbe189bda1656afed927508 |