Bug 363416 - *Sometimes* crashes on loading files via drag and drop
Summary: *Sometimes* crashes on loading files via drag and drop
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 3.0 Release Candidate
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-22 22:35 UTC by Lake
Modified: 2016-05-27 10:08 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lake 2016-05-22 22:35:21 UTC
Windows 7

Dragging and dropping a file from my pictures directory window (IE browser) causes a crash immediately after the file is loaded. All the .jpgs and .pngs I have tried work (and I tried a bunch of them), but I have had crashes trying to open .xcf .psd and .kra . One of the files that caused a crash was a Krita auto-generated autosave file. Nearly every file that has caused a crash has also, at a different time, been opened successfully via this method. One of the .psd files that caused a crash was only 196KB (and no other files were open in Krita).

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	krita.exe
  Application Version:	0.0.0.0
  Application Timestamp:	00000409
  Fault Module Name:	libkritalibbrush.dll
  Fault Module Version:	0.0.0.0
  Fault Module Timestamp:	00d388c0
  Exception Code:	c0000005
  Exception Offset:	00008e00
  OS Version:	6.1.7601.2.1.0.256.48
  Locale ID:	1033
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

Reproducible: Sometimes
Comment 1 Halla Rempt 2016-05-25 09:28:58 UTC
*** Bug 363470 has been marked as a duplicate of this bug. ***
Comment 2 Halla Rempt 2016-05-25 11:48:47 UTC
Must be timing dependent: see also the duplicate bug.
Comment 3 Friedrich W. H. Kossebau 2016-05-27 10:08:40 UTC
Git commit ea7592e93feadb2080a6c48ca6ce44b88ee3230e by Friedrich W. H. Kossebau.
Committed on 27/05/2016 at 10:05.
Pushed by kossebau into branch 'master'.

Fix double-deletion crash on destruction of KisNode with KisNodeProgressProxy

Summary:
The emission of the signal KisNodeProgressProxy::percentageChanged due to
KisBusyProgressIndicator::endUpdatesBeforeDestroying()
KisBusyProgressIndicator::Private::stopProgressReport()
KisNodeProgressProxy::setRange(int, int)
resulted in a temporary KisNodeSP being created, which called ref() and
deref() on the KisNode object, whose KisShared part already was at 0
ref count, which results in deref() to trigger another delete call
on the KisNode.
Related: bug 363470

Fixes T2393

Test Plan: KisFileLayerTest no longer fails, other tests still as before.

Reviewers: #krita:_next, rempt, dkazakov

Differential Revision: https://phabricator.kde.org/D1695

M  +12   -6    libs/image/kis_busy_progress_indicator.cpp
M  +13   -2    libs/image/kis_busy_progress_indicator.h
M  +2    -1    libs/image/kis_node.cpp
M  +6    -0    libs/image/kis_node_progress_proxy.cpp
M  +8    -0    libs/image/kis_node_progress_proxy.h

http://commits.kde.org/krita/ea7592e93feadb2080a6c48ca6ce44b88ee3230e