This error has greeted me several times before in the past when working with Msysgit on Windows. It alway appears for no apparent reason; sometimes from one boot to the next, and sometimes it suddenly starts happening while the system is running. Once the error is there, it stays consistently at the very least until the next reboot. Sometimes it only happens for specific commands like “git log”, sometimes it seems to affect every cygwin command.

I have absolutely no clue what the cause is and I don’t have the time to really dig into that – even though it would probably be quite interesting and educational. Since the last couple of times a reboot didn’t solve the issue, I had to go look for an alternate solution and I found one at http://jakob.engbloms.se/archives/1403.

The solution essentially just uses the Windows tool rebase.exe to move the base load address of the msys-1.0.dll around. Just execute

> rebase.exe -b 0x50000000 msys-1.0.dll

in your msysgit bin directory. The new base address (0x50000000) is essentially a random choice and there have been reports in the original article that this address doesn’t work for everybody. You can choose another one (within a reasonable range), just make sure to create a backup of the original DLL before you start experimenting.

For me, this simple trick has worked out very well.

Leave a Reply

Your email address will not be published.

*