Bug 384818 - Cannot save file
Summary: Cannot save file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (other bugs)
Version First Reported In: 4.0 pre-alpha
Platform: Ubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-18 16:19 UTC by Jean-Baptiste Mardelle
Modified: 2017-09-18 18:30 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Mardelle 2017-09-18 16:19:18 UTC
Using latest Krita Lime PPA (1:4.0.0-0~201709170641~ubuntu17.04.1) it is impossible to save a file. Saving seems to start but no file is ever created.

From the terminal, I get the following message:
No file found for ".xml" , even though update-mime-info said it would exist.
Either it was just removed, or the directory doesn't have executable permission... ("/home/four/.local/share/mime", "/usr/share/mime", "/usr/local/share/mime")
SAFE ASSERT (krita): "!job.mimeType.isEmpty()" in file /build/krita-testing-69tD9s/krita-testing-4.0.0/libs/ui/KisDocument.cpp, line 519


I used previous versions of 4.0 prealpha before and never encountered this issue before... reporting here as requested by Boud on IRC
Comment 1 Halla Rempt 2017-09-18 16:46:24 UTC
Thanks. I get the same output but not the problem with saving; however the output itself shows that something undesirable is going on.
Comment 2 Halla Rempt 2017-09-18 16:46:56 UTC
Btw, does this hold for every file type?
Comment 3 Jean-Baptiste Mardelle 2017-09-18 17:35:00 UTC
I tested kra and an image format (png or jpeg not sure which one) and problem was reproducible in the 2 formats. Let me know if you need more precise infos
Comment 4 Raghavendra kamath 2017-09-18 18:01:05 UTC
I am experiencing this bug too, with krita built from master. I too get the same output in terminal.
Comment 5 Halla Rempt 2017-09-18 18:02:26 UTC
Okay... You're on OpenSUSE Leap 42.3. What is your exact cmake command line?
Comment 6 Raghavendra kamath 2017-09-18 18:03:54 UTC
I use the following line for building

cmake -DCMAKE_INSTALL_PREFIX=$HOME/kf5/inst /run/media/raghu/Data/krita-build/src/krita/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPACKAGERS_BUILD=ON -DBUILD_TESTING=OFF
Comment 7 Halla Rempt 2017-09-18 18:29:45 UTC
Git commit 6576cf77854cc2e7101439cfa71ab7e4e8bdbe9a by Boudewijn Rempt.
Committed on 18/09/2017 at 18:28.
Pushed by rempt into branch 'master'.

Try harder, even harder, to get a mimetype

Apparently, some versions of Qt, when you pass the check-the-content
flag, don't check the extension if the target file doesn't exist, so
return an empty mimetype. So, after checking with content, if the
result is bogus, check for the extension.

M  +9    -0    libs/koplugin/KisMimeDatabase.cpp

https://commits.kde.org/krita/6576cf77854cc2e7101439cfa71ab7e4e8bdbe9a
Comment 8 Halla Rempt 2017-09-18 18:30:20 UTC
Git commit f55d05b4a3705dfd76d84bd894c715de4880188c by Boudewijn Rempt.
Committed on 18/09/2017 at 18:30.
Pushed by rempt into branch 'krita/3.3'.

Try harder, even harder, to get a mimetype

Apparently, some versions of Qt, when you pass the check-the-content
flag, don't check the extension if the target file doesn't exist, so
return an empty mimetype. So, after checking with content, if the
result is bogus, check for the extension.

M  +9    -0    libs/koplugin/KisMimeDatabase.cpp

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