Bug 399641 - Krita crashes when selecting reference image
Summary: Krita crashes when selecting reference image
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Emmet O'Neill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-11 06:30 UTC by Anna Medonosova
Modified: 2018-10-11 09:41 UTC (History)
3 users (show)

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


Attachments
Backtrace (28.73 KB, text/plain)
2018-10-11 06:30 UTC, Anna Medonosova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Medonosova 2018-10-11 06:30:12 UTC
Created attachment 115555 [details]
Backtrace

SUMMARY
When I click a reference image to select it, I get a segfault. I'm attaching a backtrace.

It happens in my build from today morning. In previous build from Tuesday it worked.

STEPS TO REPRODUCE
1. Switch to reference image tool.
2. Click a reference image to select it.

OBSERVED RESULT
Segfault.

EXPECTED RESULT
Selected image.
Comment 1 Halla Rempt 2018-10-11 08:01:57 UTC
Comment on attachment 115555 [details]
Backtrace

Doesn't seem to crash here...
Comment 2 Emmet O'Neill 2018-10-11 08:08:31 UTC
Hey again, Anna.

I haven't been able to reproduce this one so far. Can you give me any more details? For example, does it seem to happen every time or only occasionally?

#0  0x00007fffbb891330 in SelectionDecorator::isOverTextEditorButton() (this=0x0) at /home/tilya/programy/krita/src/gamut-masking/plugins/tools/defaulttool/defaulttool/SelectionDecorator.cpp:243
#1  0x00007fffbb8809d4 in DefaultTool::updateCursor() (this=this@entry=0x55555747b950) at /home/tilya/programy/krita/src/gamut-masking/plugins/tools/defaulttool/defaulttool/DefaultTool.cpp:646
        rotOctant = <optimized out>
        rotateHandle = false
        shearHandle = false
        editable = true
        cursor = {d = 0x555557366590}
        statusText = {d = 0x7ffff4f14620 <QArrayData::shared_null>}
        selection = <optimized out>

It may be due to the fact that SelectionDecorator::isOverTextEditorButton() is being called without first being null-checked, but until I can reproduce the crash myself I can only guess.

Thanks for the report.
Comment 3 Emmet O'Neill 2018-10-11 08:09:19 UTC
Also switching this bug to "waitingforinfo" for now.
Comment 4 Dmitry Kazakov 2018-10-11 08:12:56 UTC
Git commit 193a608f4741043d9dc24e0a160df9ec2d1b01d9 by Dmitry Kazakov.
Committed on 11/10/2018 at 08:12.
Pushed by dkazakov into branch 'master'.

Fix a crash when selecting reference image with default tool

M  +1    -1    plugins/tools/defaulttool/defaulttool/DefaultTool.cpp

https://commits.kde.org/krita/193a608f4741043d9dc24e0a160df9ec2d1b01d9
Comment 5 Emmet O'Neill 2018-10-11 08:14:12 UTC
I lost the race...