Skip to content

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

@Diapolo

Description

@Diapolo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions