Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparing broken lnk-files (windows shortcuts) freezes WinMerge #1007

Closed
JP95Git opened this issue Oct 13, 2021 · 7 comments
Closed

Comparing broken lnk-files (windows shortcuts) freezes WinMerge #1007

JP95Git opened this issue Oct 13, 2021 · 7 comments

Comments

@JP95Git
Copy link

JP95Git commented Oct 13, 2021

I compared 2 folders and noticed that WinMerge freezes, if it compares 2 invalid lnk-files (windows shortcuts). Both (equal) shortcuts points to a network-share which is no longer available.

This is not a problem in windows, since fc (in cmd) can compare these files.

It happens if you compare a folder with these files and if you compare only both lnk-files.

Version: 2.16.14 (x64) with Windows 10.

@sdottaka
Copy link
Member

Didn't WinMerge become operational when you waited a minute or so after it froze?

If a given file is a shortcut, WinMerge will try to open the file or folder that the shortcut points to. This means that if you are on a network where the file pointed to by the shortcut does not exist, it will take a very long time for the process to time out, and you will not be able to operate during that time.

When I tried this, WinMerge became operational after a few dozen seconds of waiting.

The reason why the fc command did not freeze is because the fc command compares the contents of the shortcut file (.lnk) file itself.

Unfortunately, at the moment, there is no way to prevent WinMerge from resolving this shortcut link.

If you want WinMerge to compare the contents of the shortcut file itself, change the .lnk extension of the shortcut file to a different extension. (Explorer does not allow you to do this, so you will need to do it at a command prompt or in powershell).

@JP95Git
Copy link
Author

JP95Git commented Oct 13, 2021

The folder with the lnk-file is rather small, I can copy&paste it in Explorer in under 1 second. comparing both copies seems to take forever. I waited over 10 minutes without progress.

After killing WinMerge I discovered a hidden? error-message from Explorer complaining that the shortcut is invalid. Then another error opens:
Title: Laufzeitfehler in Microsoft VBScript
Message: Objekt erforderlich: 'wd.Documents.Open(...)'

I tried it again. As soon as WinMerge hangs I can use Alt+Tab to show the hidden error-messages and click OK in both of them. Then WinMerge continues.

@sdottaka
Copy link
Member

So the problem is that the error message box is hidden behind WinMerge?

Is the file you compared a Word file?
What method did you use to compare the files?

  • Dragging the file from Explorer into WinMerge
  • Select the file in Explorer and launch WinMerge from the Explorer context menu
  • Compare the file from the "Select Files or Folders" Window
  • Launch WinMerge from a command prompt with the file as an argument

@JP95Git
Copy link
Author

JP95Git commented Oct 13, 2021

Yes, it's a Word file (.doc).

I used this:

Compare the file from the "Select Files or Folders" Window

Edit: I compared the folders (containing the shortcut) in the above dialog.

@sdottaka
Copy link
Member

Thank you for the information. I think I misunderstood the reproduction conditions. Now I am able to reproduce the problem. I don't know if it's possible to fix the problem of the message box being hidden behind at the moment.

This problem can be prevented by selecting the "Manual Unpacking" menu item in the Plugin menu.

image
image

@JP95Git
Copy link
Author

JP95Git commented Oct 13, 2021

Great. These are "my" hidden error-messages.

@sdottaka
Copy link
Member

Fixed with commit a52e6a0

Thank you for the report.

@sdottaka sdottaka added this to the v2.16.16 milestone Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants