SUMMARY The application crashes when an invalid symbolic link is encountered. STEPS TO REPRODUCE 1. Create test dirs/files ``` mkdir dir_a dir_b ln -s non_existing dir_b/bad_link ``` 2. Run: `kdiff3 dir_a dir_b` OBSERVED RESULT The application crashes with the message: kdiff3: ./src/fileaccess.cpp:762: QDateTime FileAccess::lastModified() const: Assertion `!m_modificationTime.isNull()' failed. EXPECTED RESULT The application should not crash when an invalid symbolic link is encountered. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 22.04 KDE Plasma Version: 5.27.0 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8
Created attachment 156604 [details] Backtrace
Git commit 1a2d5eea2b48cbd8bc9a6c43db5260610b5f26ca by Michael Reeves. Committed on 23/02/2023 at 17:00. Pushed by mreeves into branch '1.10'. Fix handling of broken links QFileInfo::exists returns false for broken links FIXED-IN:1.10.1 (cherry picked from commit 2b3645b8aef912f92d4a7c034141e1ef00fd22ed) M +1 -1 src/SourceData.cpp M +12 -2 src/fileaccess.cpp M +3 -0 src/fileaccess.h https://invent.kde.org/sdk/kdiff3/commit/1a2d5eea2b48cbd8bc9a6c43db5260610b5f26ca
Git commit 9d5f7b6a6d146fcefe50e7a3d5cac897a0e8d0ac by Michael Reeves. Committed on 23/02/2023 at 17:01. Pushed by mreeves into branch 'master'. Fix handling of broken links QFileInfo::exists returns false for broken links FIXED-IN:1.10.1 M +1 -1 src/SourceData.cpp M +12 -2 src/fileaccess.cpp M +2 -0 src/fileaccess.h https://invent.kde.org/sdk/kdiff3/commit/9d5f7b6a6d146fcefe50e7a3d5cac897a0e8d0ac
*** Bug 467086 has been marked as a duplicate of this bug. ***
(In reply to michael from comment #4) > *** Bug 467086 has been marked as a duplicate of this bug. *** I wanted to point out that a similar crash is happening with two folders where ONE is missing u-x. I'm possibly obnoxiously re-opening this bug since it'll be fresh on your mind, michael, in case it's in the same area of code. Otherwise, please let me know if a new report is needed. kdiff3: ./src/fileaccess.cpp:762: QDateTime FileAccess::lastModified() const: Assertion `!m_modificationTime.isNull()' failed. To reproduce: mkdir a b a/1 b/1 && echo x > a/1/test.txt && echo y > b/1/test.txt && chmod u-x a/1 && kdiff3 a b
(Oh, note that I am not able to build with your broken symlink patch, but in reviewing the code I don't believe it fixes this perm-based one)
The !m_modificationTime.isNull() assertion no longer exists in kdiff3 source. It proved to be invalid due to the design of QDateTime::isNull(). Current 1.10 yields a conflicting type error in the permissions case but will no longer crash. That removal may not have been part of the same commit. Thanks.