Date: Sat, Jan 10, 2009 at 2:59 PM
Subject: Re: Crash in bitcoin 0.1.0
To: hal.finney@gmail.com
I was temporarily able to reproduce the bug and narrowed it down to the “mapAddresses.count” in the following code. It was absolutely the last piece of code to go in and mainly only got tested with the MSVC build. It’s not essential and I’m inclined to turn off optimization and delete the section of code until I figure out what’s going on.
I’m attaching a dbg exe you can try that deletes the line of code and turns off optimization. I’m not able to reproduce it anymore at the moment.
irc.cpp: if (pszName[0] == 'u') { CAddress addr; if (DecodeAddress(pszName, addr)) { CAddrDB addrdb; if (AddAddress(addrdb, addr)) printf("new "); else { // make it try connecting sooner CRITICAL_BLOCK(cs_mapAddresses) if (mapAddresses.count(addr.GetKey())) mapAddresses[addr.GetKey()].nLastFailed = 0; } addr.print(); } else { printf("decode failed\n"); } }
Yes, actually the version with MSVC symbols would be better, that is
>the one I am using.
>
>I found that if I launched this one from a cygwin shell, it does
not >crash. But if I launch it from Windows, double-clicking on the
file,
>it does crash similarly to the previous version. However, I am
pretty >sure that the previous version did crash even when I
launched it from >cygwin.
>
>I have to go out but I’ll leave this version running for a
while. >
>Hal