winmerge icon indicating copy to clipboard operation
winmerge copied to clipboard

Folder compare with jpg images crashes

Open mharvey500 opened this issue 4 years ago • 6 comments

Quick compare fails part way on two folders of 95 images. It happens that all the images are counted as identical although they are slightly different sizes (a few bytes). There are also a few avi files. The program suddenly terminates. Full compare also fails but runs longer on a number of folders. (jpg and avi files) That's how I know the single pair of folders had all identical images because it got through that one. Incidentally, if I copy the two folders to another location on my disk they compare successfully whereas they consistently fail to compare with the original paths. On the other hand, the program will sometimes get stuck on comparing two jpg files in the folder compare and the cpu, memory, and disk usage is very low, as if it is a deadlock condition. The program does use all four of the CPU cores so it sort of points to a process synchronization issue. WinMerge.txt .

mharvey500 avatar Feb 02 '22 02:02 mharvey500

Thank you for your report. I have only been able to reproduce this crash once today, but not since. For this reason, I may not be able to fix it right away.

If you can, could you please try entering 1 in the 'Number of compare threads' field of the Compare/Folder category of the Options dialog, as shown below? If it stops crashing, the crash may be due to the multi-threaded comparison.

image

Also, looking at WinMerge.txt, I see that you have checked the 'Enable image compare in folder compare' checkbox in the Compare/Image category of the Options dialog, is this what you intended?

If not, try unchecking this checkbox to compare, as this is not intended to simply compare image files byte by byte, but to compare whether they match as images, or to ignore slight color differences.

image

sdottaka avatar Feb 02 '22 12:02 sdottaka

I have a scenario that I can reproduce that crashes when I newly start the program. It is too many GB to send you. If you wish I can try to reduce it to small enough size to upload them if it still crashes for your testing. After setting the number of compare threads to 1 it is not crashing, just slow. I intended to image compare because the images have been created by different programs from the same source camera. They are the same images but they have different lengths.

Sent from Mail for Windows

From: Takashi Sawanaka Sent: February 2, 2022 7:10 AM To: WinMerge/winmerge Cc: mharvey500; Author Subject: Re: [WinMerge/winmerge] Folder compare with jpg images crashes (Issue#1176)

Thank you for your report. I have only been able to reproduce this crash once today, but not since. For this reason, I may not be able to fix it right away. If you can, could you please try entering 1 in the 'Number of compare threads' field of the Compare/Folder category of the Options dialog, as shown below? If it stops crashing, the crash may be due to the multi-threaded comparison.

Also, looking at WinMerge.txt, I see that you have checked the 'Enable image compare in folder compare' checkbox in the Compare/Image category of the Options dialog, is this what you intended? If not, try unchecking this checkbox to compare, as this is not intended to simply compare image files byte by byte, but to compare whether they match as images, or to ignore slight color differences.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

mharvey500 avatar Feb 02 '22 13:02 mharvey500

Thank you for the information. If you can reproduce the crash by reducing the data size, it would be helpful if you could attach the files here.

sdottaka avatar Feb 02 '22 14:02 sdottaka

I don’t think I can make it small enough for an email attachment.

Sent from Mail for Windows

From: Takashi Sawanaka Sent: February 2, 2022 9:30 AM To: WinMerge/winmerge Cc: mharvey500; Author Subject: Re: [WinMerge/winmerge] Folder compare with jpg images crashes (Issue#1176)

Thank you for the information. If you can reproduce the crash by reducing the data size, it would be helpful if you could attach the files here. — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

mharvey500 avatar Feb 02 '22 17:02 mharvey500

Hi, I have actually found out the crash is not exactly reproducible but is random. It seems to be correlated with moving or clicking the mouse on the winmerge window but not always. I think if you were able to see it happen you have good enough test data and I don’t need to send you anything.

Sent from Mail for Windows

From: Takashi Sawanaka Sent: February 2, 2022 9:30 AM To: WinMerge/winmerge Cc: mharvey500; Author Subject: Re: [WinMerge/winmerge] Folder compare with jpg images crashes (Issue#1176)

Thank you for the information. If you can reproduce the crash by reducing the data size, it would be helpful if you could attach the files here. — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

mharvey500 avatar Feb 02 '22 19:02 mharvey500

I found a function in the FreeImage library that is not thread-safe, so I fixed it. I'm not sure because this crash is rare in my environment, but perhaps this fix will stop it from crashing.

sdottaka avatar Feb 26 '22 01:02 sdottaka