Bug 389877 - Trying to "Add contact info" crashes Krita and corrupts Author profile
Summary: Trying to "Add contact info" crashes Krita and corrupts Author profile
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-04 14:49 UTC by Storm Engineer
Modified: 2018-02-14 15:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Console output (11.58 KB, text/plain)
2018-02-04 14:55 UTC, Storm Engineer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Storm Engineer 2018-02-04 14:49:21 UTC
Clicking the "Add contact info" button results in Krita insta-crashing to the desktop and also corrupts the author profile - or more precisely it seems the database storing author profiles is mismatched.

Steps to reproduce:
1; Create two profiles: Test1 and Test2, and populate the default fields
2; In Test2, click "Add contact info" -y Krita crashes instantly to desktop
3; Restart Krita. Try to edit fields of Test2 then hit OK.
4; Go to profiles again -> Test2 shows empty, trying to repopulate fields does not work.
5; Delete Test2 -> The disappeared field values from Test1 now show up in Test2 instead

Built yesterday early afternoon (forgot to write down commit ID before I pulled again).
Comment 1 Storm Engineer 2018-02-04 14:52:59 UTC
Addendum:

Trying to edit fields in Test2 crashed Krita once again.
Comment 2 Storm Engineer 2018-02-04 14:55:27 UTC
Created attachment 110333 [details]
Console output
Comment 3 Storm Engineer 2018-02-05 13:25:54 UTC
I discovered several more anomalies, and there seem to be some randomness to them.

 - Creating and editing profiles may result in a profile file (at .local/share/krita/authorinfo ) with empty XML tags, while the field contents are still saved somewhere as Krita retains them.

 - Editing profiles may result in field data apparently disappearing (combined with a crash) and later reappearing, or appearing under a different profile

 - Deleted profiles may randomly re-appear, including removed profile files getting recreated and fields may or may not contain the correct data

 - Various actions may result in a crash:
 --- Clicking "Add contact info" (100% crash)
 --- Saving a profile
 --- Creating a profile
 --- Deleting a profile
 --- Saving an image while "sign with author profile" is ticked
Comment 4 wolthera 2018-02-05 14:03:52 UTC
Git commit dc7d04685c888606d84b0b0f04d3141ef51fe6bf by Wolthera van Hövell tot Westerflier.
Committed on 05/02/2018 at 14:03.
Pushed by woltherav into branch 'master'.

Fix crash when saving authorinfo that has no contact info.
Related: bug 389720

M  +5    -3    libs/ui/kis_png_converter.cpp
M  +5    -3    plugins/impex/jpeg/kis_jpeg_export.cc

https://commits.kde.org/krita/dc7d04685c888606d84b0b0f04d3141ef51fe6bf
Comment 5 wolthera 2018-02-14 15:35:50 UTC
Git commit d464668dc11e3769aff8e9bad0ded824dc3324fe by Wolthera van Hövell tot Westerflier.
Committed on 14/02/2018 at 15:33.
Pushed by woltherav into branch 'master'.
Related: bug 0

Otherwise it'll end up saving the wrong data to the wrong profile.

M  +4    -2    libs/widgets/KoConfigAuthorPage.cpp

https://commits.kde.org/krita/d464668dc11e3769aff8e9bad0ded824dc3324fe