Bug 368764

Summary: Crash when opening a .kra file in krita
Product: [Applications] krita Reporter: Pierre "bloodywing" Geier <bloodywing>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Backtrace

Description Pierre "bloodywing" Geier 2016-09-13 20:28:33 UTC
I was able to reproduce this multiple times now:

Starting Krita
Open a .kra file made with Krita Version from yesterday
SIGSEGV in __dynamic_cast()

Reproducible: Always

Steps to Reproduce:
See desciption

Actual Results:  
Makes krita crash

Expected Results:  
Should open the .kra file
Comment 1 Pierre "bloodywing" Geier 2016-09-13 20:29:13 UTC
Created attachment 101074 [details]
Backtrace
Comment 2 Halla Rempt 2016-09-14 06:44:13 UTC
I can reproduce, but if you want to report bugs in the future and build Krita yourself anyway, please build with RelWithDebInfo or KritaDevs -- this backtrace misses line number information.
Comment 3 Halla Rempt 2016-09-14 07:24:28 UTC
Git commit 0e6db278ae1498117d0fed7810f342e6abed629b by Boudewijn Rempt.
Committed on 14/09/2016 at 07:23.
Pushed by rempt into branch 'master'.

The ownership management by the lut docker using a bool to
indicate that a display filter was our display filter was
broken and caused memory leaks. Fixing the memory leak caused
crashes.

Now all display filters are wrapped in a QSharedPointer, which
uglifies the code but fixes the issue.

M  +1    -1    libs/ui/canvas/kis_abstract_canvas_widget.h
M  +3    -4    libs/ui/canvas/kis_canvas2.cpp
M  +2    -2    libs/ui/canvas/kis_canvas2.h
M  +0    -4    libs/ui/canvas/kis_canvas_widget_base.cpp
M  +1    -1    libs/ui/canvas/kis_canvas_widget_base.h
M  +5    -6    libs/ui/canvas/kis_display_color_converter.cpp
M  +4    -4    libs/ui/canvas/kis_display_color_converter.h
M  +1    -1    libs/ui/canvas/kis_image_pyramid.cpp
M  +3    -3    libs/ui/canvas/kis_image_pyramid.h
M  +1    -1    libs/ui/canvas/kis_prescaled_projection.cpp
M  +1    -1    libs/ui/canvas/kis_prescaled_projection.h
M  +1    -1    libs/ui/canvas/kis_projection_backend.h
M  +1    -1    libs/ui/canvas/kis_qpainter_canvas.cpp
M  +1    -1    libs/ui/canvas/kis_qpainter_canvas.h
M  +4    -3    libs/ui/opengl/kis_opengl_canvas2.cpp
M  +2    -2    libs/ui/opengl/kis_opengl_canvas2.h
M  +1    -1    libs/ui/opengl/kis_opengl_shader_loader.cpp
M  +1    -1    libs/ui/opengl/kis_opengl_shader_loader.h
M  +42   -37   plugins/dockers/lut/lutdocker_dock.cpp
M  +3    -4    plugins/dockers/lut/lutdocker_dock.h

http://commits.kde.org/krita/0e6db278ae1498117d0fed7810f342e6abed629b