Qt: specifiying -reindex with empty datadir leads to crash #2239

issue Diapolo opened this issue on January 30, 2013
  1. Diapolo commented at 1:02 PM on January 30, 2013: none

    I had -reindex specified as a leftover from some tests with -txindex and because of the new db directory naming I cleaned my datadir to start an IDB. That case crashed my Qt client right after showing the UI.

  2. Diapolo commented at 2:36 PM on January 30, 2013: none

    Cause is, that an empty data-dir contains no /blocks/ and no block-files at all but we set fReindex = false not till the import thread is running and fails calling OpenBlockFile(). I guess this is not very nice for bitcoind also.

  3. Diapolo cross-referenced this on Jan 30, 2013 from issue fix crash with -reindex and empty datadir by Diapolo
  4. gavinandresen commented at 7:38 PM on January 30, 2013: contributor

    Can't reproduce in bitcoind.

    In Bitcoin-Qt, the crash is pindexBest being null in:

    49 QDateTime ClientModel::getLastBlockDate() const 50 { 51 return QDateTime::fromTime_t(pindexBest->GetBlockTime()); 52 }

  5. gavinandresen cross-referenced this on Jan 30, 2013 from issue Prevent Qt crash at startup with an empty data directory by gavinandresen
  6. gavinandresen cross-referenced this on Jan 30, 2013 from issue Make sure the genesis block is present after reindex by sipa
  7. gavinandresen commented at 11:33 PM on January 30, 2013: contributor

    Fix pulled.

  8. gavinandresen closed this on Jan 30, 2013

  9. bitcoin 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-05-19 06:55 UTC