| Summary: | Segfault when creating document with two windows opened | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Nicholas LaPointe <nicholaslapointe8> |
| Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | halla |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/krita/f566a8023cba382e4fc7f866b494684964cf7be7 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Backtrace | ||
|
Description
Nicholas LaPointe
2017-08-14 09:46:32 UTC
Hm... I cannot reproduce the issue. In any case, accessing a pointer without checking it is wrong, so we could probably "fix" the issue with this patch:
diff --git a/libs/ui/input/kis_input_manager.cpp b/libs/ui/input/kis_input_manager.cpp
index 6faf5c5574..a2fc48d0cc 100644
--- a/libs/ui/input/kis_input_manager.cpp
+++ b/libs/ui/input/kis_input_manager.cpp
@@ -556,10 +556,12 @@ void KisInputManager::slotToolChanged()
{
KoToolManager *toolManager = KoToolManager::instance();
KoToolBase *tool = toolManager->toolById(canvas(), toolManager->activeToolId());
- d->setMaskSyntheticEvents(tool->maskSyntheticEvents());
- if (tool && tool->isInTextMode()) {
- d->forwardAllEventsToTool = true;
- d->matcher.suppressAllActions(true);
+ if (tool) {
+ d->setMaskSyntheticEvents(tool->maskSyntheticEvents());
+ if (tool->isInTextMode()) {
+ d->forwardAllEventsToTool = true;
+ d->matcher.suppressAllActions(true);
+ }
} else {
d->forwardAllEventsToTool = false;
d->matcher.suppressAllActions(false);
Hm, I managed to get a crash but only by opening three windows and then opening a new view on a document, not a new window. Git commit 1736dd852ace5ec81a2131351b75ba42984fcb99 by Boudewijn Rempt. Committed on 15/08/2017 at 07:33. Pushed by rempt into branch 'krita/3.2'. M +10 -7 libs/ui/input/kis_input_manager.cpp https://commits.kde.org/krita/1736dd852ace5ec81a2131351b75ba42984fcb99 Git commit f566a8023cba382e4fc7f866b494684964cf7be7 by Boudewijn Rempt. Committed on 15/08/2017 at 07:35. Pushed by rempt into branch 'master'. M +10 -7 libs/ui/input/kis_input_manager.cpp https://commits.kde.org/krita/f566a8023cba382e4fc7f866b494684964cf7be7 |