Summary: | Cannot save files | ||
---|---|---|---|
Product: | [Frameworks and Libraries] libkeduvocdocument | Reporter: | Leon Maurer <leon.maurer> |
Component: | general | Assignee: | Jeremy Whiting <jpwhiting> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | christof.hanke, damian.sparrow, joelsymon, madjestic13, michael.gius, rdieter, smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Versions of qt5 and kf5 related packages (output of: rpm -qa kf5* qt5* | sort >kf5-qt5-versions.txt) |
Description
Leon Maurer
2015-06-26 03:51:15 UTC
I'm observing the same on the latest available version in Fedora 22: $ rpm -qv kwordquiz kwordquiz-15.04.0-1.fc22.x86_64 Steps to reproduce: 1. launch kwordquiz 2. Enter "foo" in Column 1 3. Enter "bar" in Column 2 4. Save as into ~/kwordquiz-test Result: "File is not writable" Reproducibility: 100% It's not the filesystem issue: $ ls -ls ~/kwordquiz-test* $ ls: cannot access /home/dawid/kwordquiz-test*: No such file or directory $ echo foo > ~/kwordquiz-test.kvtml $ ls -ls ~/kwordquiz-test* 4 -rw-rw-r-- 1 dawid dawid 4 paź 31 18:55 /home/dawid/kwordquiz-test.kvtml However the problem seems to be more generic becuase "parley" is also affected by the same issue and reports: Writing file "Untitled" resulted in an error: File is not writeable. Created attachment 95239 [details]
Versions of qt5 and kf5 related packages (output of: rpm -qa kf5* qt5* | sort >kf5-qt5-versions.txt)
stracing the kwordquiz during the attempt of saving a file gives the following output: stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec2107f0) = -1 ENOENT (No such file or directory) lstat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210700) = -1 ENOENT (No such file or directory) stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210780) = -1 ENOENT (No such file or directory) stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210700) = -1 ENOENT (No such file or directory) stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210560) = -1 ENOENT (No such file or directory) stat("/home/dawid/kwordquiz-test.kvtml", 0x7fffec2105b0) = -1 ENOENT (No such file or directory) lstat("/home/dawid/kwordquiz-test.kvtml", 0x7fffec210720) = -1 ENOENT (No such file or directory) open("/home/dawid/kwordquiz-test.kvtml", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = 19 stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210470) = -1 ENOENT (No such file or directory) stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210670) = -1 ENOENT (No such file or directory) stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210580) = -1 ENOENT (No such file or directory) stat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210580) = -1 ENOENT (No such file or directory) lstat("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0x7fffec210570) = -1 ENOENT (No such file or directory) open("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop.h25416", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 20 rename("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop.h25416", "/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop") = 0 chmod("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop", 0600) = 0 unlink("/home/dawid/.local/share/RecentDocuments/kwordquiz-test.kvtml.desktop.lock") = 0 open("/home/dawid/.local/share/stalefiles/kwordquiz/kwordquiz-test.kvtmlfile_file%3A%2F%2F%2Fhome%2FdawidX.d25015.kalock", O_RDONLY|O_CLOEXEC) = 19 It looks that there is no single attempt to really create the "/home/dawid/kwordquiz-test.kvtml" file. I can comfirm this. The problem is in libkeduvocdocument. The saveAS()-method of the KEduVocDocument-class creates an QUrl from another url, but it should do it from the QString Path of the local file. Otherwise it tries to store files like "file:///blah.bla" on the local filesystem. This usually fails, since the directory "file:" is not existant in the CWD. The patch which works for me is : libkeduvocdocument/libkeduvocdocument-15.08.3/keduvocdocument> diff -u keduvocdocument.cpp.orig keduvocdocument.cpp --- keduvocdocument.cpp.orig 2015-03-19 16:35:18.000000000 +0100 +++ keduvocdocument.cpp 2015-12-01 13:45:16.618816540 +0100 @@ -317,7 +317,7 @@ return FileIsReadOnly; } - QUrl tmp( url ); + QUrl tmp( url.toLocalFile() ); if ( ft == Automatic ) { if ( tmp.path().right( strlen( "." KVTML_EXT ) ) == "." KVTML_EXT ) DISCLAIMER: I have _no_ experience in debugging KDE-apps. I am just interested in parley. It looks like the problem is solved, by cleaning stalefiles: rm -rf .kde4/data/stalefiles/* rm -rf .local/share/stalefiles/* Problem has not been resolved by deleting the listed directories here. wasn't it fixed here ? https://projects.kde.org/projects/kde/kdeedu/libkeduvocdocument/repository/revisions/adff24a2a7130ac99fa772c1b47fa06aedd01a60 I can confirm the small patch in comment #5 works as advertised (tested with kwordquiz successfully saving now) fix from bug #356233 works too, but it was committed only to master/ branch triaging to libkeduvocdocument Ok, cherry-picked 0cb9b9aea2264fc66d25fb6d93adc32c75dfef97 from master to Applications/15.12 branch, so it will be in Applications 15.12.3 release next month. *** Bug 360940 has been marked as a duplicate of this bug. *** |