Bug 410242

Summary: Krita takes up all the memory when opening a very certain jpg file
Product: [Applications] krita Reporter: WOAS <korotkih.00>
Component: File formatsAssignee: vanyossi <ghevan>
Status: RESOLVED FIXED    
Severity: critical CC: ghevan
Priority: NOR    
Version: 4.2.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: KEEP TASK MANAGER ACTIVE WHEN OPENING THIS FILE WITH Krita
deviceSettingDescription contents

Description WOAS 2019-07-26 18:08:41 UTC
Created attachment 121750 [details]
KEEP TASK MANAGER ACTIVE WHEN OPENING THIS FILE WITH Krita

STEPS TO REPRODUCE
1. try to open attached file with Krita
2. get your PC jammed
3. Kill task before your OS crashes
Comment 1 vanyossi 2019-07-27 01:08:34 UTC
I don't know exactly how to solve this. but I take it :)

there is some strange condition in deviceSettingDescriptionExifToKMD that provokes the lastIndex to always be below "index" for this particular image.

exiting the loop if lastIndex is negative and getting the first 4 bytes gives in metadata -> List.
Comment 2 vanyossi 2019-07-27 01:09:56 UTC
Created attachment 121766 [details]
deviceSettingDescription contents

Krita contents are corrupted as I trimmed the loop.
Comment 3 Halla Rempt 2019-08-01 08:56:36 UTC
Git commit d56b7b29509646977a714987b03702e41978bf99 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 01/08/2019 at 08:55.
Pushed by rempt into branch 'master'.

Avoidp parsing data if is not detected as String

deviceSettingDescription can be any type of data.

M  +2    -2    libs/ui/kisexiv2/kis_exif_io.cpp

https://invent.kde.org/kde/krita/commit/d56b7b29509646977a714987b03702e41978bf99
Comment 4 Halla Rempt 2019-08-01 09:27:50 UTC
Git commit fa9fbcb6d4253371d43aff5be691ccecfff42cf1 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 01/08/2019 at 09:27.
Pushed by rempt into branch 'krita/4.2'.

Avoidp parsing data if is not detected as String

deviceSettingDescription can be any type of data.

M  +2    -2    libs/ui/kisexiv2/kis_exif_io.cpp

https://invent.kde.org/kde/krita/commit/fa9fbcb6d4253371d43aff5be691ccecfff42cf1