Bitcoin-Qt suddenly stopped with "assertion failed" #2547

issue cpunks opened this issue on April 22, 2013
  1. cpunks commented at 12:23 PM on April 22, 2013: none

    Bitcoin version 0.8.1-beta Qt version 4.8.3

    Screenshot:

    http://www.freeimagehosting.nl/pics/44408cb76129be8e0813ed1286be3f86.png

    Background:

    I have used this Bitcoin client for a while. The configuration was initialized under Windows XP, and later on transferred to a Windows 7 machine. It has worked for several months swithout any notable problems -- with the only exception of it sometimes not including a "mined" transaction into my free balance immediately as it matures (instead it needs to be restarted).

    Today, about 4 hours after receiving a "mined" transaction, it then crashed telling:

    Assertion failed! File: src/main.cpp Line: 1127 Expression: pindexFirst

    After restarting, it appears to have recovered fully.

  2. sipa commented at 10:59 PM on April 23, 2013: member

    Are you mining?

    EDIT: I mean solo-mining (or p2pool), against Bitcoin-qt?

  3. cpunks commented at 9:16 AM on April 24, 2013: none

    Nope, not against my local bitcoin-qt -- a different machine is mining against a pool, local client just receives the resulting bitcoins (they appear as "mined" transactions since Eligius does it that way).

  4. sipa commented at 9:42 AM on April 24, 2013: member

    For the record: @gmaxwell noticed yesterday that this can only be cause by the retargetting code. That should narrow down the problem a lot.

  5. cpunks commented at 3:12 PM on April 24, 2013: none

    Would retargeting code only run on an instance of Bitcoin intended for mining?

    In that case, I have to clarify: I have in the past, used this Bitcoin instance for mining too, and now that I checked, as a historic leftover, "rpcuser" and "rpcpassword" are still set in "bitcoin.conf".

  6. sipa commented at 3:13 PM on April 24, 2013: member

    Sorry for the confusion. It is unrelated to mining - I asked that question before it was discovered that this assertion failure is caused by the retargetting code. I just added it here so we don't forget.

  7. cpunks commented at 3:14 PM on April 24, 2013: none

    However, to further clarify, I am not starting it with a "-server" command line option, so anything that results from that code path, should be excluded.

  8. cpunks commented at 3:16 PM on April 24, 2013: none

    Aha, thanks. If you have any additional questions, just ask. I'll check back about once a day, even if the problem is not disturbing my activities in any manner.

  9. bitcoinstarter commented at 11:16 AM on May 1, 2013: none

    @sipa any workaround/fix regarding this problem? I too have this issue for more than 2 weeks now. assertion_failed

  10. Diapolo commented at 9:00 AM on May 2, 2013: none

    The part of the code which triggers your problem is (in GetNextWorkRequired()):

    <pre> // Go back by what we want to be 14 days worth of blocks const CBlockIndex* pindexFirst = pindexLast; for (int i = 0; pindexFirst && i < nInterval-1; i++) pindexFirst = pindexFirst->pprev; assert(pindexFirst); </pre>

    But this needs to be looked at by a core dev...

  11. bitcoinstarter commented at 5:43 AM on May 4, 2013: none

    @gavinandresen

    Can you please take a look the problem stated by @Diapolo above?

    thanks

  12. gavinandresen commented at 8:17 PM on May 7, 2013: contributor

    Duplicate; hopefully fixed by the "don't use too many file descriptors" fix.

  13. gavinandresen closed this on May 7, 2013

  14. sipa commented at 8:20 PM on May 7, 2013: member

    @gavinandresen That's very unlikely on Windows.

  15. gavinandresen reopened this on May 7, 2013

  16. sipa commented at 11:07 PM on May 8, 2013: member

    @bitcoinstarter You have this problem for more than two weeks now. Does that mean that you fix it, and it re-appears, or after it happened the first time, it just doesn't go away?

  17. bitcoinstarter commented at 6:35 PM on May 9, 2013: none

    @sipa @gavinandresen Im still having issues. The problem still persist and I cannot finish synchronizing because of the issue. Below is the latest screenshot of my wallet showing the error.

    still problem

  18. bitcoinstarter commented at 6:42 PM on May 9, 2013: none

    @sipa @gavinandresen no matter what button I choose from the error above, bitcoin-qt.exe has stopped working. This is my problem since I started downloading the client for more than 2 weeks now and I keep having this problem no matter how many times I have re-download the client whether I using the install version or the zip version. same issues.

    not responding

    btw, I using windows 7 Ultimate with 4GB RAM (just for reference).

  19. sipa commented at 9:30 PM on May 9, 2013: member

    Is this an error that appears immediately at startup, every time? If so, start with -reindex on the command line, once. That will rebuild the database from scratch.

  20. bitcoinstarter commented at 5:24 AM on May 10, 2013: none

    @sipa Yes, that is an error after I fire up the exe. the error appears after a few minutes of initialization.

    btw, how do I start wit -reindex on the command line?

    Is there a command line version for the wallet? or are you referring to the Windows CMD prompt?

  21. bitcoinstarter commented at 5:31 AM on May 10, 2013: none

    @sipa Ok I think youre referring to the Windows CMD prompt so Im giving it a shot. Hope it works and will let you know :)

    reindex

  22. sipa commented at 9:03 AM on May 12, 2013: member

    Did you ever play with testnet before?

  23. laanwj commented at 12:32 PM on January 17, 2014: member

    User hasn't reported back after 8 months, likely the -reindex solved the problem.

  24. laanwj closed this on Jan 17, 2014

  25. partsoven commented at 5:23 PM on October 11, 2016: none

    -reindex worked for me!

  26. 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-17 03:15 UTC

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