Bug 410242 - Krita takes up all the memory when opening a very certain jpg file
Summary: Krita takes up all the memory when opening a very certain jpg file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.2.3
Platform: Microsoft Windows Microsoft Windows
: NOR critical
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-26 18:08 UTC by WOAS
Modified: 2019-08-01 09:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
KEEP TASK MANAGER ACTIVE WHEN OPENING THIS FILE WITH Krita (467.86 KB, image/jpeg)
2019-07-26 18:08 UTC, WOAS
Details
deviceSettingDescription contents (3.10 KB, text/plain)
2019-07-27 01:09 UTC, vanyossi
Details

Note You need to log in before you can comment on or make changes to this bug.
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