SUMMARY When opening a .kvtml file it crashes with the error "The file is locked by another process". This problem persists after restarting the computer. STEPS TO REPRODUCE 1. Open a .kvtml file 2. See the crash message OBSERVED RESULT KWordQuiz crashes after opening the file. EXPECTED RESULT It doesn't crash SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.25.2 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 Kernel Version: 5.18.10-zen1-1-zen (64-bit) Graphics Platform: Wayland ADDITIONAL INFORMATION I get this output when running from the terminal "Cannot lock file /home/test/Desktop/Test/test.kvtml" Error: Invalid identifier index: 0
Created attachment 150632 [details] output of "backtrace full" with coredumpctl gdb and debuginfod
Can't reproduce can you attach the kvtml file that makes it crash?
(In reply to Albert Astals Cid from comment #2) > Can't reproduce can you attach the kvtml file that makes it crash? Its not the file that causes it to crash, so the file isn't useful. For example, if I rename the same file (that causes it to crash) from test.kvtml to test2.kvtml it won't crash anymore. Renaming it back to test.kvtml will cause it to crash again
I've attached the file, but examining it, I can't find any differences between the one that crashes and the one that doesn't
Created attachment 150789 [details] file that causes crashes
I installed the flatpak version of kwordquiz and opening the same file (that causes crashes) doesn't cause crashes. No idea why
Can you list the files that are in /home/test/Desktop/Test (including hidden files, remove anything that you think infringes your privacy) ? Anything that may look like a similar name to the test.kvtml file you're opening?
(In reply to Albert Astals Cid from comment #7) > Can you list the files that are in /home/test/Desktop/Test (including > hidden files, remove anything that you think infringes your privacy) ? > > Anything that may look like a similar name to the test.kvtml file you're > opening? The only file there is the test file in that folder. There is nothing else. Its why I'm not sure why this issue is occuring.
Huh, the flatpak version of kwordquiz is now exhibiting the same issue as the normal package. First it gives me the error "File not readable" then it says the same "The file is locked by another process" when opening it the second time.
(In reply to Phos from comment #8) > (In reply to Albert Astals Cid from comment #7) > > Can you list the files that are in /home/test/Desktop/Test (including > > hidden files, remove anything that you think infringes your privacy) ? > > > > Anything that may look like a similar name to the test.kvtml file you're > > opening? > > The only file there is the test file in that folder. > There is nothing else. > Its why I'm not sure why this issue is occuring. You sure? Not even hidden files? run ls -la on the folder
(In reply to Albert Astals Cid from comment #10) > (In reply to Phos from comment #8) > > (In reply to Albert Astals Cid from comment #7) > > > Can you list the files that are in /home/test/Desktop/Test (including > > > hidden files, remove anything that you think infringes your privacy) ? > > > > > > Anything that may look like a similar name to the test.kvtml file you're > > > opening? > > > > The only file there is the test file in that folder. > > There is nothing else. > > Its why I'm not sure why this issue is occuring. > > You sure? Not even hidden files? run > ls -la > on the folder Yep, there's nothing apart from the usual
The problematic state files seem to be located in ~/.local/share/stalefiles/kwordquiz/. Deleting all files from there (not just the .lock files) fixes the problem. KWordQuiz should handle these files appropriately, be it by simply ignoring them (by passing FileHandlingFlags::FileIgnoreLock to KEduVocDocument::open) or by doing some more advanced recovery.
(In reply to xiretza from comment #12) > The problematic state files seem to be located in > ~/.local/share/stalefiles/kwordquiz/. Deleting all files from there (not > just the .lock files) fixes the problem. KWordQuiz should handle these files > appropriately, be it by simply ignoring them (by passing > FileHandlingFlags::FileIgnoreLock to KEduVocDocument::open) or by doing some > more advanced recovery. Deleting all the files in ~/.local/share/stalefiles/kwordquiz doesn't fix the problem. It gives the "File is not readable" when trying to open the .kvtml file the first time then outputting "The File is locked by another process" when opening the same file the second time
(In reply to Phos from comment #13) > (In reply to xiretza from comment #12) > > The problematic state files seem to be located in > > ~/.local/share/stalefiles/kwordquiz/. Deleting all files from there (not > > just the .lock files) fixes the problem. KWordQuiz should handle these files > > appropriately, be it by simply ignoring them (by passing > > FileHandlingFlags::FileIgnoreLock to KEduVocDocument::open) or by doing some > > more advanced recovery. > > Deleting all the files in ~/.local/share/stalefiles/kwordquiz doesn't fix > the problem. It gives the "File is not readable" when trying to open the > .kvtml file the first time then outputting "The File is locked by another > process" when opening the same file the second time IGNORE WHAT I WROTE PREVIOUSLY, IT WAS INCORRECT (I had the flatpak version installed which is why deleting those files did nothing) When I tested it again after deleting the files in ~/.local/share/stalefiles/kwordquiz it works again. So kwordquiz is not handling the lock files correctly for some reason.
A possibly relevant merge request was started @ https://invent.kde.org/education/kwordquiz/-/merge_requests/12
Git commit 3b3d851d709c81514f78d11559fba35207041c53 by Albert Astals Cid. Committed on 02/08/2022 at 22:48. Pushed by aacid into branch 'release/22.08'. Fix crash if opening a file fails M +3 -0 src/kwordquiz.cpp https://invent.kde.org/education/kwordquiz/commit/3b3d851d709c81514f78d11559fba35207041c53
A possibly relevant merge request was started @ https://invent.kde.org/education/kwordquiz/-/merge_requests/13
Git commit 4d28a1a04c1897016228dd51e3bf24a3a8854037 by Albert Astals Cid. Committed on 04/08/2022 at 18:22. Pushed by aacid into branch 'release/22.08'. Allow users to still open a file even if it's locked File locked can happen if kwordquiz had crashed M +10 -4 src/kwordquiz.cpp M +2 -2 src/kwordquiz.h https://invent.kde.org/education/kwordquiz/commit/4d28a1a04c1897016228dd51e3bf24a3a8854037