bitcoin-qt.exe crash with 0.7.1 (reproducible) #2025

issue Diapolo opened this issue on November 18, 2012
  1. Diapolo commented at 11:07 AM on November 18, 2012: none

    Just add -proxy=crashme as parameter and on Windows and this will lead to an APPCRASH.

    I looked what that parameter causes, which is calling InitError(), which aborts AppInit2() and causes a return 1; to exit the client.

    Knowing this I was placing a return false; in AppInit2() to see when the crash starts to occur. This is the case after the first bitdb.open() in Step 5 of the initialisation (https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L587).

    I digged deeper into this and found out, that the crash is triggered in CDBEnv::EnvShutdown() (https://github.com/bitcoin/bitcoin/blob/master/src/db.cpp#L41), which is called when destroying the bitdb global.

    What I did not yet fully understand (because of a bad working Debugger), why would DbEnv(0).remove(GetDataDir().string().c_str() (https://github.com/bitcoin/bitcoin/blob/master/src/db.cpp#L41) cause this. Is it a problem with GetDataDir() or string()?

    Anyway, I have a fix ready, which prevents this crash #2024.

    Perhaps there is a better way to fix this, so core devs should take a look.

  2. laanwj commented at 11:32 AM on November 18, 2012: member

    Cannot reproduce this problem on 0.7.1 nor master, either with or without your patch :-/

  3. Diapolo commented at 1:03 PM on November 18, 2012: none

    @laanwj Strange ... have you got a Windows machine, as it only happens on Windows. I know sipa could not reproduce it on Linux and it also does not happen with bitcoind.

  4. burger2 commented at 3:41 PM on November 24, 2012: contributor

    hmm, I just get an error message that the proxy adress is invalid when I type: bitcoin-qt.exe -proxy=crashme in the windows 8 command prompt (cmd). Then bitcoin closes.

  5. 94m3k1n9 commented at 3:53 PM on November 24, 2012: contributor

    Also just getting an invalid proxy error on Win7.

  6. Diapolo commented at 4:51 PM on November 24, 2012: none

    I had a non default datadir set also, perhaps that fact leads to the crash. Closing this, as the patch is merged.

  7. Diapolo closed this on Nov 24, 2012

  8. luke-jr commented at 7:06 PM on November 24, 2012: member
  9. Diapolo commented at 11:07 AM on November 25, 2012: none

    @luke-jr Yeah, I'll take a look now, will report back in a few minutes.

    Edit: Crash is gone, fix is working!

  10. KolbyML referenced this in commit 2768e98dc6 on Dec 5, 2020
  11. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me