Fundamental genesis.print(); throwing a segment fault. #4153

issue einewton opened this issue on May 8, 2014
  1. einewton commented at 5:54 PM on May 8, 2014: none

    Not changing anything, just trying to print the genesis block, it throws a segment fault (core dumped).

  2. laanwj commented at 5:56 PM on May 8, 2014: member

    Can you elaborate in what you are doing exactly?

  3. einewton commented at 6:00 PM on May 8, 2014: none

    I've tested this many times before in previous 0.8 versions, and now when I try to print the genesis block (not changing anything), I get a Segmentation fault (core dumped)

    doing the whole finding the find nNonce ==0 loop

        hashGenesisBlock = genesis.GetHash();
        while (hashGenesisBlock > bnProofOfWorkLimit.getuint256()){
            if (++genesis.nNonce==0) break;
            hashGenesisBlock = genesis.GetHash();
        }
    

    chainparams.cpp -> genesis.print();

    I see this method still exists in core.cpp so I know it's not a method taken out or no comments about it being deprecated...

  4. gavinandresen commented at 6:10 PM on May 8, 2014: contributor

    Is this some altcoin-genesis-block-creating code? There is no genesis.print or genesis-incrementing nonce in Bitcoin Core.

  5. einewton commented at 6:27 PM on May 8, 2014: none

    It's used to re-create the BitCoin genesis block, yes... Thanks for verifying that there is no .print method in the BitCoin core. I thought that it might have been broken due to a change from 0.8 to 0.9

  6. einewton closed this on May 8, 2014

  7. sipa commented at 6:31 PM on May 8, 2014: member

    There is a print() method in CBlockIndex and CDiskBlockIndex. I still have no clue what code you're talking about, where the variable genesis is declared, what type it is, or where exactly it segfaults.

  8. einewton reopened this on May 8, 2014

  9. einewton commented at 6:40 PM on May 8, 2014: none

    Thanks sipa,

    It's the print() method in CBlockIndex that it's occurring.. I haven't tracked down on what line it's occurring.

    I'll get back with that info...

    I have to say guys, I'm very impressed with the responses and quickness that is represented here. Thanks for taking the time to look at this with me, even if it's just some benign occurrence that i'm experiencing.

  10. sipa commented at 6:42 PM on May 8, 2014: member

    Closing this unless you actually have a problem to report.

  11. sipa closed this on May 8, 2014

  12. 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-20 06:55 UTC