| Summary: | Random crash in KisUpdateJobItem | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Bernhard Liebl <poke1024> |
| Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | halla |
| Priority: | NOR | ||
| Version First Reported In: | 4.0 pre-alpha | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | macOS | ||
| Latest Commit: | https://commits.kde.org/krita/a20c53eea0c1548502b78a73879488a09a27844c | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | same thing again | ||
|
Description
Bernhard Liebl
2017-10-28 10:32:31 UTC
Oh, I just detected some more info from the console: krita.core: BUG: The walker hasn't reached the root layer! krita.core: Start node: KisPaintLayer(0x7fa5c4bde050, name = "Layer 2") Requested rect: QRect(7929953,7471205 -4653120x-4784194) krita.core: There must be an inconsistency in the walkers happened! krita.core: Please report a bug describing how you got this message. Segmentation fault: 11 Created attachment 108602 [details]
same thing again
Something like this should solve it:
diff --git a/libs/image/kis_async_merger.cpp b/libs/image/kis_async_merger.cpp
index 041f6fbc68..9739eefab5 100644
--- a/libs/image/kis_async_merger.cpp
+++ b/libs/image/kis_async_merger.cpp
@@ -290,7 +290,6 @@ void KisAsyncMerger::startMerge(KisBaseRectsWalker &walker, bool notifyClones) {
if(m_currentProjection) {
warnImage << "BUG: The walker hasn't reached the root layer!";
warnImage << " Start node:" << walker.startNode() << "Requested rect:" << walker.requestedRect();
- warnImage << " There must be an inconsistency in the walkers happened!";
warnImage << " Please report a bug describing how you got this message.";
// reset projection to avoid artefacts in next merges and allow people to work further
resetProjection();
diff --git a/libs/image/kis_update_job_item.h b/libs/image/kis_update_job_item.h
index 3ac09e3436..6987611bba 100644
--- a/libs/image/kis_update_job_item.h
+++ b/libs/image/kis_update_job_item.h
@@ -100,7 +100,7 @@ public:
m_exclusiveJobLock->unlock();
- // try to exit the loop. Please note, that noone can flip the state from
+ // try to exit the loop. Please note, that no-one can flip the state from
// WAITING to EMPTY except ourselves!
Type expectedValue = Type::WAITING;
if (m_atomicType.compare_exchange_strong(expectedValue, Type::EMPTY)) {
@@ -111,6 +111,11 @@ public:
inline void runMergeJob() {
Q_ASSERT(m_atomicType == Type::MERGE);
+ if (!m_walker) {
+ qWarning() << "KisUpdateJobItem::runMergeJob: we have an invalid walker.";
+ return;
+ }
+
// dbgKrita << "Executing merge job" << m_walker->changeRect()
// << "on thread" << QThread::currentThreadId();
m_merger.startMerge(*m_walker);
Looks like a duplicate of 380246 *** This bug has been marked as a duplicate of bug 380246 *** No, this is not a true duplicate, because the other bug actually was about an assert in KoDerivedResourceConverter:
KIS_SAFE_ASSERT_RECOVER_NOOP(m_d->lastKnownValue.isNull() ||
result == m_d->lastKnownValue);
Git commit a20c53eea0c1548502b78a73879488a09a27844c by Boudewijn Rempt. Committed on 26/11/2017 at 13:29. Pushed by rempt into branch 'master'. Add safe assert checking for the walker in KisUpdateJobItem M +2 -1 libs/image/kis_update_job_item.h https://commits.kde.org/krita/a20c53eea0c1548502b78a73879488a09a27844c |