Bug 426568 - Kdiff3 can't read remote files when comparing remote folders
Summary: Kdiff3 can't read remote files when comparing remote folders
Status: RESOLVED WORKSFORME
Alias: None
Product: kdiff3
Classification: Applications
Component: application (show other bugs)
Version: 1.8.4
Platform: Neon Linux
: HI normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-15 15:51 UTC by jmaspons
Modified: 2024-06-17 03:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Result in binary comparison mode (11.95 KB, image/png)
2020-09-15 15:51 UTC, jmaspons
Details
Binary comparison result. *_diff files are different (85.85 KB, image/png)
2021-01-05 12:22 UTC, jmaspons
Details
Error window when doing binary comparison with folders throug fish:// (40.71 KB, image/png)
2021-03-06 15:33 UTC, jmaspons
Details
Binary comparison result. *_diff files are different (48.13 KB, image/png)
2021-03-06 15:39 UTC, jmaspons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmaspons 2020-09-15 15:51:26 UTC
Created attachment 131678 [details]
Result in binary comparison mode

SUMMARY
It seems there are problems downloading files from remote folders.

STEPS TO REPRODUCE
1. Select 2 folders. One of them is a remote folder using ssh (fish://$USER@localhost/...)
2. Start comparison

OBSERVED RESULT
In binary comparison mode, files with different sizes have black squares for A & B status (see attached image). For Trust size mode, the results looks OK.

When opening remote files, and error message appears:
Can't read file fish://jmaspons@localhost/home/jmaspons/tmp/kdiff/text_diff.txt.
While the status window is «Copying file: fish://jmaspons@localhost/home/jmaspons/tmp/kdiff/text_diff.txt -> /tmp/kdiff3.Ooiafkj»

ADDITIONAL INFORMATION
I can access the same remote folder from dolphin or the file picker without problems.

EXPECTED RESULT
Kdiff3 works flawlessly with remote folders like in 0.9.98 version

SOFTWARE/OS VERSIONS
Neon user edition
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.0
Comment 1 jmaspons 2020-09-15 16:01:02 UTC
While running kdiff3 in konsole and reproducing the bug I see this output:


     org.kde.kdiff3: "Loading A: "
     org.kde.kdiff3: Loading B:  ""
     org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/cats.jpg"
     org.kde.kdiff3: Loading B:  "fish://joan@localhost/home/joan/tmp/kdiff/cats.jpg"
     QFile::remove: Empty or null file name
     org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/cats_diff.jpg"
     org.kde.kdiff3: Loading B:  "fish://joan@localhost/home/joan/tmp/kdiff/cats_diff.jpg"
     qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 10858, resource id: 14746507, major code: 40 (TranslateCoords), minor code: 0
    QFile::remove: Empty or null file name
    org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/text_diff.txt"
    org.kde.kdiff3: Loading B:  "fish://joan@localhost/home/joan/tmp/kdiff/text_diff.txt"
    QFile::remove: Empty or null file name
Comment 2 michael 2020-11-08 21:40:41 UTC
For non text files this is known limitation of kdiff3 1.8.4 that is not limited to remote files. However, text files should not be affect. A quick test with current master doesn't reproduce this error. I am using fish protocol with a raspberry pi on the same subnet. So there's something more than than just basic network handling going on here.
Comment 3 michael 2020-11-08 21:49:10 UTC
When choosing binary compare I get the read error but only for non-text files. This is likely a side effect of such compares being temporarily blocked. It should not however be setting specific. This is odd. "Full analysis" behaves as expected and is what I tend to use.
Comment 4 michael 2020-12-08 02:22:21 UTC
I am getting the errors in my setup as well. I fixed one bug which was changing the protocol for the url to "file:". This should only have been happening if there was no scheme but instead had been flipped around to always happen. Once that was fixed a second bug surfaced in determining the correct remote path. KDiff3 now displays nested files as if they were in the top level of the diff.
Comment 5 jmaspons 2020-12-19 11:17:18 UTC
I managed to compile kdiff3 from master. Tell me if I can help with testing at some point
Comment 6 michael 2020-12-21 16:26:58 UTC
That would actually be very helpful. Right now I'm still trying to track down the root cause. What I know at this point is the fallowing.

Current master which has a fixes related to url handling seems to reliably get the first level contents of a directory.
Sub directories fail intermittently producing an error.
Even when no error message is given there seems to be missing metadata. This produces interesting results when kdiff3 tries to setup the comparison display for the directories.
For even more fun have both directories on a network volume accessed with a non-file protocol.
I'd be curious to know if protocols other than "fish:/" are affected.
Comment 7 michael 2020-12-28 04:59:10 UTC
Just pushed changes to 1.8 and master which fixed a number of network related bugs. Binary comparison mode now runs without error except for binary files which are being intentionally blocked anyway as of this time. @jmaspons are you able to confirm the fix?
Comment 8 jmaspons 2021-01-05 12:18:02 UTC
> Just pushed changes to 1.8 and master which fixed a number of network
> related bugs. Binary comparison mode now runs without error except for
> binary files which are being intentionally blocked anyway as of this time.
> @jmaspons are you able to confirm the fix?

I can reproduce your findings running kdiff3 from master. Seems that the problem only appears on binary comparisons but also for identical text files which are showed with black squares and default operation to Merge. No problem with subfolders during my testing but I have seen this top level files without file names in some cases when doing local comparisons, probably not related to remote protocols


Here are the session log:

org.kde.kdiff3: "Loading A: "
QFSFileEngine::open: No file name specified
org.kde.kdiff3: "Loading B: "
QFSFileEngine::open: No file name specified
org.kde.kdiff3: "Diff: A <-> B"
org.kde.kdiff3: "Linediff: A <-> B"
org.kde.kdiff3: Enter: calcDiff3LineListUsingAB
org.kde.kdiff3: Leave: calcDiff3LineListUsingAB

# Full analysis with fish protocol
org.kde.kdiff3.fileAccess: filePath =  "B"
org.kde.kdiff3.fileAccess: filePath =  "B"
org.kde.kdiff3.fileAccess: Reading folder:  "/home/joan/tmp/kdiff/A"
org.kde.kdiff3.fileAccess: Reading folder:  "/home/joan/tmp/kdiff/A/subfolder"
org.kde.kdiff3.fileAccess: Reading folder:  "fish://joan@localhost/home/joan/tmp/kdiff/B"
org.kde.kdiff3.fileAccess: filePath =  ".."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/..")
org.kde.kdiff3.fileAccess: filePath =  "."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/.")
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/cats.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/text_diff.txt")
org.kde.kdiff3.fileAccess: filePath =  "subfolder"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder")
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/cats_diff.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/text.txt")
org.kde.kdiff3.fileAccess: Reading folder:  "fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder"
org.kde.kdiff3.fileAccess: filePath =  ".."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/..")
org.kde.kdiff3.fileAccess: filePath =  "."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/.")
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/cats.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/text_diff.txt")
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/cats_diff.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/text.txt")
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/cats.jpg"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/cats.jpg"
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/cats_diff.jpg"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/cats_diff.jpg"
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/subfolder/cats.jpg"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/cats.jpg"
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/subfolder/cats_diff.jpg"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/cats_diff.jpg"
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/subfolder/text.txt"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/text.txt"
org.kde.kdiff3: "Diff: A <-> B"
org.kde.kdiff3: "Linediff: A <-> B"
org.kde.kdiff3: Enter: calcDiff3LineListUsingAB
org.kde.kdiff3: Leave: calcDiff3LineListUsingAB
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/subfolder/text_diff.txt"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/text_diff.txt"
org.kde.kdiff3: "Diff: A <-> B"
org.kde.kdiff3: "Linediff: A <-> B"
org.kde.kdiff3: Enter: calcDiff3LineListUsingAB
org.kde.kdiff3: Leave: calcDiff3LineListUsingAB
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/text.txt"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/text.txt"
org.kde.kdiff3: "Diff: A <-> B"
org.kde.kdiff3: "Linediff: A <-> B"
org.kde.kdiff3: Enter: calcDiff3LineListUsingAB
org.kde.kdiff3: Leave: calcDiff3LineListUsingAB
QFile::remove: Empty or null file name
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3: "Loading A: /home/joan/tmp/kdiff/A/text_diff.txt"
org.kde.kdiff3: "Loading B: fish://joan@localhost/home/joan/tmp/kdiff/B/text_diff.txt"
org.kde.kdiff3: "Diff: A <-> B"
org.kde.kdiff3: "Linediff: A <-> B"
org.kde.kdiff3: Enter: calcDiff3LineListUsingAB
org.kde.kdiff3: Leave: calcDiff3LineListUsingAB
QFile::remove: Empty or null file name


# Binary with fish protocol
org.kde.kdiff3.fileAccess: filePath =  "B"
org.kde.kdiff3.fileAccess: filePath =  "B"
org.kde.kdiff3.fileAccess: Reading folder:  "/home/joan/tmp/kdiff/A"
org.kde.kdiff3.fileAccess: Reading folder:  "/home/joan/tmp/kdiff/A/subfolder"
org.kde.kdiff3.fileAccess: Reading folder:  "fish://joan@localhost/home/joan/tmp/kdiff/B"
org.kde.kdiff3.fileAccess: filePath =  ".."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/..")
org.kde.kdiff3.fileAccess: filePath =  "."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/.")
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/cats.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/text_diff.txt")
org.kde.kdiff3.fileAccess: filePath =  "subfolder"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder")
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/cats_diff.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/text.txt")
org.kde.kdiff3.fileAccess: Reading folder:  "fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder"
org.kde.kdiff3.fileAccess: filePath =  ".."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/..")
org.kde.kdiff3.fileAccess: filePath =  "."
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/.")
org.kde.kdiff3.fileAccess: filePath =  "cats.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/cats.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text_diff.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/text_diff.txt")
org.kde.kdiff3.fileAccess: filePath =  "cats_diff.jpg"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/cats_diff.jpg")
org.kde.kdiff3.fileAccess: filePath =  "text.txt"
org.kde.kdiff3.fileAccess: Url not received from KIO.
org.kde.kdiff3.fileAccess: Computed url is:  QUrl("fish://joan@localhost/home/joan/tmp/kdiff/B/subfolder/text.txt")
Comment 9 jmaspons 2021-01-05 12:22:34 UTC
Created attachment 134572 [details]
Binary comparison result. *_diff files are different
Comment 10 michael 2021-02-10 18:19:03 UTC
Do you have a snap shot of the error message itself? The log out you've given me indicates KDiff3 is not getting an error from KIO and is now currently determining the full url
Comment 11 Bug Janitor Service 2021-02-25 04:33:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 jmaspons 2021-03-06 15:33:41 UTC
Created attachment 136431 [details]
Error window when doing binary comparison with folders throug fish://

Error window in catalan. It can be translated to «Some files couldn't be processed. Error while reading from ... Unknown error»
Comment 13 jmaspons 2021-03-06 15:39:47 UTC
Created attachment 136432 [details]
Binary comparison result. *_diff files are different

With the current version from git master seems that it have improved. Now the problem with binary comparison appears only in subfolders but not on the top level files
Comment 14 Bug Janitor Service 2021-03-21 04:33:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 15 michael 2021-03-21 11:40:00 UTC
Ignore the bot. I have taken care of the status change.
Comment 16 michael 2024-05-18 23:49:53 UTC
I would like to confirm if this still happens with the 1.11.1 tag or master. I found a pair of bugs that would have resulted in arbitrary KIO job cancellation  when handling non-file paths. Meta data retrieval and file reads where impacted by a race condition that resulted from this.
Comment 17 Bug Janitor Service 2024-06-02 03:45:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 18 Bug Janitor Service 2024-06-17 03:47:04 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!