https://bugs.kde.org/show_bug.cgi?id=452048
Bug ID: 452048 Summary: Remote File Previews are not shown when Limit is set to 4096MiB or more Product: frameworks-kio Version: git master Platform: Compiled Sources OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kio-bugs-n...@kde.org Reporter: brainpo...@mailbox.org CC: kdelibs-b...@kde.org Target Milestone: --- Created attachment 147826 --> https://bugs.kde.org/attachment.cgi?id=147826&action=edit path to fix the issue SUMMARY I noticed that dolphin did not show previews of videos on my nfs filesystem anymore since one of the latest updates, probably Frameworks 5.92. STEPS TO REPRODUCE 1. Set remote file preview limit to 4096 MiB or more in dolphin settings (General -> Previews) 2. Navigate to a remote FS with previewable files, nfs with video files in my case OBSERVED RESULT No previews. Even for files smaller than 4 GiB, 1.3 GiB video files for example. EXPECTED RESULT Previews being loaded or generated and shown, if the file is smaller than 4 GiB (or however the limit is set). SOFTWARE/OS VERSIONS Operating System: Arch Linux Dolphin Version: 22.03.80 (also tried git master) KDE Frameworks Version: 5.92.0 (also tried git master) Qt Version: 5.15.3 Kernel Version: 5.17.0-arch1-1 (64-bit) Graphics Platform: X11 ADDITIONAL INFORMATION I traced this setting to ~/.config/kdeglobals where it is stored as MaximumRemoteSize in Group "PreviewSettings". When set to 4096 MiB in dolphin, the value in the config file becomes 4294967296 . When set to 4095 MiB, the value becomes 4293918720 . This number looked suspiciously like UINT_MAX, so I looked that up: 4294967295 And behold, 4294967296 == UINT_MAX + 1. So I went searching for the place where some code uses an uint instead of a size_t or something like that. I compiled from source, did some "printf-Debugging" in previewjob.cpp [1] and found that the "MaximumRemoteSize" setting was indeed not read correctly. [1]: https://invent.kde.org/frameworks/kio/-/blob/a474739fc0eb714ac5230514f2af5ab397c1613a/src/widgets/previewjob.cpp#L415 MaximumRemoteSize=4293918720 (4095 MiB) was read as 18446744073708503040 MaximumRemoteSize=4294967296 (4096 MiB) was read as 0 MaximumRemoteSize=4296015872 (4097 MiB) was read as 1048576 I'm not sure which kind of combination of overflowing and/or misinterpreting would produce these values. 4293918720 does not even overflow an uint but produces a garbage 64 bit value somehow. Anyway, indicating the correct integer type to KConfig's readEntry() by casting the default value seems to be enough to solve this. I've attached a git format-patch which does that. I wanted to do a Merge Request directly, but Gitlab refuses to let me fork KIO. When trying to do that manually, it shows these errors from the remote's pre-receive hook: ``` [...] remote: Resolving deltas: 100% (42286/42286), done. remote: Audit failure - Commit d2aeab0987959fe3f250a2b0afa866215f82f94a - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit d2aeab0987959fe3f250a2b0afa866215f82f94a - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit c5e008e1af7a0cd7f4ca1acada4131443c468478 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit c5e008e1af7a0cd7f4ca1acada4131443c468478 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit c09634935294dbdea0839541bb620254581b5b65 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit c09634935294dbdea0839541bb620254581b5b65 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit ba6dd58ae76903c1802d8ee80cb4711abc5ef79f - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit ba6dd58ae76903c1802d8ee80cb4711abc5ef79f - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit fdba4bb168b64c3a9c89c62ace088bf19a7bced6 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit fdba4bb168b64c3a9c89c62ace088bf19a7bced6 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit 872a8be0e64225b39629514c475b93d9b14649d9 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit 872a8be0e64225b39629514c475b93d9b14649d9 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit 9063654daa5af4e3c846db9488c202cf3313a536 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Audit failure - Commit 9063654daa5af4e3c846db9488c202cf3313a536 - Email address has an invalid domain : k...@randomguy3.me.uk remote: Push declined - commits failed audit remote: Should the audit failures above mention issues regarding your name, please ensure that your Git username has been set to your full name. remote: Please see https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup for more details on ensuring Git has been fully configured. remote: In the event that your full name has been set and is shown above as being rejected, please file a Sysadmin ticket at https://go.kde.org/systickets To invent.kde.org:brainpower/kio.git ! [remote rejected] fix-reading-maximumremotesize -> fix-reading-maximumremotesize (pre-receive hook declined) ``` No idea where to report this, though. -- You are receiving this mail because: You are watching all bug changes.