Bug 461579

Summary: Export palette produces empty .kpl file.
Product: [Applications] krita Reporter: Corstiaan <CorstiaanS>
Component: File formatsAssignee: sh_zam <shzam>
Status: RESOLVED FIXED    
Severity: major CC: info, nekolex, oktopuse, shzam
Priority: NOR    
Version First Reported In: 5.1.2   
Target Milestone: ---   
Platform: Android   
OS: Android 12.x   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Report produced by Krita in the bug report window.

Description Corstiaan 2022-11-08 09:00:28 UTC
Created attachment 153578 [details]
Report produced by Krita in the bug report window.

SUMMARY
***
When attempting to export a palette as the standard .kpl file type, they cannot be opened on a different machine (a notice comes up stating the file cannot be read almost as if it were a different file type). 
Investigation showed the produced file was empty: its size was 0B and changing the extention to .txt or .zip showed files with no contents (meaning no text in case of .txt and no contained files in case of .zip). I compared this to a working palette, which did contain a load of text with the .txt extension.
I also went into the hidden Krita installation folder (invisible in the normal file browser, but I have an additional older version of the Android file browser, which has more permissions). There, Krita's source .kpl files were normal and working. So I suspect the export function fails to copy the source files somehow. Therefore, I have a temporary workaround, but this is not easily accessible to the general user.
Additionally, I noticed this in version 5.1.1, but it is still present in 5.1.2. I do not know exactly when it was introduced, but I know that Krita Android used to be able to export palettes correctly (I used the old ones as a test after all).
***


STEPS TO REPRODUCE
1. Create a simple palette.
2. Save the palette.
3. Use the export palette button in the palette docker.
4. Choose .kpl and save in your usual folder.

OBSERVED RESULT
Size of exported file is 0 Bytes. File not recognized when being imported.

EXPECTED RESULT
Size is at least 600KB and file gets loaded succesfully when being imported.

SOFTWARE/OS VERSIONS
(See report in attachment)

Additional information:
I have added the bug report from the report bug window as an attachment. I do not know where the useful sections are, since I didn't look into it, but I added it just in case something useful is in there.
Comment 1 sh_zam 2022-11-09 10:48:29 UTC
Confirming.
Comment 2 Bug Janitor Service 2022-11-10 12:18:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1642
Comment 3 sh_zam 2022-11-23 10:41:49 UTC
Git commit cdfd613078f0d60566e3323204dc852d17f262b5 by Sharaf Zaman.
Committed on 23/11/2022 at 09:19.
Pushed by szaman into branch 'master'.

Bugfix: Palette don't get exported to the right location

M  +14   -4    plugins/dockers/palettedocker/palettedocker_dock.cpp

https://invent.kde.org/graphics/krita/commit/cdfd613078f0d60566e3323204dc852d17f262b5
Comment 4 Halla Rempt 2022-12-08 14:44:46 UTC
*** Bug 462021 has been marked as a duplicate of this bug. ***
Comment 5 Freya Lupen 2023-06-20 19:55:09 UTC
*** Bug 464768 has been marked as a duplicate of this bug. ***
Comment 6 Freya Lupen 2023-08-20 13:11:11 UTC
*** Bug 473368 has been marked as a duplicate of this bug. ***