-
Notifications
You must be signed in to change notification settings - Fork 812
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
Crashes when comparing large files #325
Comments
…to see only the results of the comparison, not the contents of the files. If you choose to display only the results of the comparison, WinMerge uses less memory because it does the comparison in the same way as a folder comparison. ref issue #325
I thought the crash in issue #318 was during folder comparison. For file comparison, "Quick contents compare method" and "Binary contents compare method" have nothing to do with it. When comparing files, WinMerge reads all the contents of the files into memory for comparison. Because of this, it uses a very large amount of memory when compared to files with large file sizes. (When comparing folders, if the files are large, it will switch to "Quick contents compare method" or "Binary contents compare mehtod" to compare them, so it doesn't use a lot of memory) The reason why HxD has no problem opening a large file is probably that the implementation does not read all the contents into memory, but only partially reads them. It's too much for me to change to such an implementation, so I introduced a workaround in 330fa44. When comparing large files, it displays a message box that asks if you want to see only the results of the comparison, not the contents of the file. If you only want to see the comparison results, WinMerge doesn't use as much memory as it does for folder comparisons. |
Ah, yeah, I see how I was misleading on that, sorry. It's definitely when comparing large files. Still, it doesn't make sense, even if it reads the entire file into memory, for it to run out of memory and crash when comparing two files that, combined, only use a portion of my free memory. Also, HxD shows the file contents, so I'm not sure why it can do so without using any memory while WinMerge uses so much. |
I had the same problem on 2.16.18; I then fixed my issue by downgrading. If you really just need to access the most basic of WinMerge functionality just downgrade to: 2.15.5 Works perfectly with large files.. |
Could you tell me under what conditions the crash occurred?
|
I have the same issue with 2.16.22 (x64) To answer your question @sdottaka , here's the details: |
Hey @sdottaka , With 2.15.5, there's no CSV file handling, and I guess that's why it's working fine |
Changing one side to semicolon-separated instead of comma-separated caused the comparison to be very slow, but did not crash. |
There's no crash, however it takes an infinite time to load the comparison. |
Thank you for clarifying |
I thought that replacing the comma with a semicolon in one of the files slowed down the comparison, but since it was just as slow in the text mode comparison, perhaps I am not reproducing the problem you are experiencing. Would it be very slow when you compare the attached files? If it is slow, could you please attach the text file that is created by the [Help]->[Configuration] menu item? |
My Winmerge, that I am using many times daily (Winmerge 2.16.4.0 x86, Windows 7 Pro FR), had a problem, but before updating I googled for "Is 64 bit Winmerge really better than 32 bit", which landed me here and made me NOT UPdating to the last stable version (https://github.com/WinMerge/winmerge/releases = WinMerge 2.16.26 of 26 jan 2023) BUT RETROdating to 2.15.5 32-bit of 28 oct 2018, recommended on this page. |
Is your Windows 7 64bit version? If it is 32bit version, you cannot use WinMerge 64bit version.
The latest version does not improve the reading speed of large CSV files. Note that if you uninstall the 32-bit version and install the 64-bit version, the configuration information will be lost.
The 64-bit version of WinMerge can do the following compared to the 32-bit version.
|
Takashi Sawanaka Mon 30 jan 2023 14h08m16s GMT, Thanks for replying. |
This was already partially answered, but: HxD loads only the part of the file. The part that contains what it is currently displaying. WinMerge could be modified to do something similar, but is probably not trivial. |
I initially mentioned this in issue #318, but it's a serious enough problem I feel it needs its own issue.
First, I need to state that this issue is HUGE, and until it's fixed, I will have to limit my use of this program to the 32-bit version and to non-video files, i.e. relatively small files. I've quoted the pertinent info from the other issue first, then provided additional info regarding the more serious crashes experienced with the 64-bit version. Both versions are 2.16.6.0 on Win10x64 1909.18363.592.
I realized the other day while trying to help another user with a problem they were having that I was running the 32-bit version of WinMerge. I have no idea which version, 32 or 64-bit, I was running previously, but after uninstalling them the other day and reinstalling, trying to resolve another issue, I ended up installing the 32-bit version without even realizing there were separate ones. I have to say that the available versions are a bit odd and confusing, with the only 64-bit ones being a special version that can't be installed per user for some reason and a portable version. Anyways, I downloaded the portable 64-bit version to test it on larger files, thinking maybe that's why I was having issues before, due to the inability of a 32-bit program to address larger files (though it should still be able to handle ones a few hundred and several hundred MB, which it couldn't).
I did find that the 64-bit version can handle larger files though, as mentioned, many of the files should be able to be handled with the 32-bit version based on size. However, while I was able to successfully compare two files that I couldn't compare with the 32-bit version (few to several hundred MB maybe, don't remember exactly, but still relatively small), it took a LOT longer than it takes to compare files the same size, or even several times larger, with HxD (hex editor I use to compare large files).
What's worse, and the reason I'm now wary of even using this program, is that when I tried comparing a couple files that are each ~16GB, it ended in disaster. The first time I tried, after waiting quite a while for the comparison to run, in the middle of watching a video while waiting I heard a couple error sounds, the video (and maybe the whole screen, but I don't remember) went blank, and after a bit I got a few different error messages from different programs, as well as one from WinMerge saying out of memory. I saw that my memory usage was very high and realized that the comparison had used up all my memory, which is what caused the other programs to error as well. I then checked task manager, which only showed WinMerge using a few (or several, don't remember exactly, but not THAT much) GB of memory, yet my usage was still very high. By the way, this was after I closed WinMerge, so despite closing it, it remained running in the background using a bunch of memory. Once I killed it in task manager, my memory dropped back down to normal.
My system has 64GB, and before running WinMerge, I was using ~13% (~8.5GB), leaving ~55GB free. That means that even if WinMerge loads the entire contents of the files it's comparing into memory, I had enough free memory to do so 3.5x for the files I was comparing, so it shouldn't have been a problem. And if it does have to load the files into memory, that's not a good way of doing it, for obvious reasons. In comparison, I just compared two 39GB files with HxD, and my memory usage didn't increase 1% (not to mention it finished in at least the same, if not less, time for files over twice the size). Nor does it go up when comparing directories containing multiple large files with FreeFileSync. For some reason, neither of those comparison programs use more than a miniscule amount of memory to do the job, and they do it faster, whereas WinMerge uses far more memory than it should possibly need, and is very slow.
I ran the comparison again, planning to keep closer tabs on things this time, and I noticed that the memory usage increased gradually, though fairly quickly, to the 90s, then slowly crept up until it got to 99%, then it dropped down to the mid-70s, then started creeping up again. This time, when it got near 100%, the screen went blank, I heard the error sounds again, and I couldn't do anything. The most I could get, and even then only sometimes, was to get the taskbar to show and to somewhat interact with it, but nothing above the taskbar was visible. I couldn't kill WinMerge (couldn't see task manager) or anything. I kept trying and trying until finally, I had to restart the computer. Granted, Windows deserves a lot of blame for that, being completely inept at handling OOM situations, and this is just another of many examples of how crappy W10 is. But WinMerge should never have let it get to that point, both because it shouldn't be using so much memory, and because it should self-terminate before it takes down the whole OS.
I don't know if the comparison method is just not very good (and I mean no disrespect to the developers, as this is a very useful and otherwise incredible program) or if there's a memory leak, but it clearly has a serious problem.
The text was updated successfully, but these errors were encountered: