"ERROR Solidity: Error: Successor block not found. "

sansky09sansky09 Member Posts: 13
Hi,
I am trying to write my first contract and am following the tutorial here:https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/
I copy paste the source code exactly as is. And the 'Execute' button is greyed out with compile error:
ERROR Solidity: Error: Successor block not found.
Could I please know whats going wrong here? I am using a private chain if that matters.
Regards,

Comments

  • chrisethchriseth Member Posts: 170 ✭✭✭
    This sounds like a bug in the Solidity optimizer. As a workaround, disable the optimizer.
    In order to fix the bug, could you please tell us a bit more about
    1. your operating system
    2. which version of Solidity you are using
    3. what the exact source code was that led to the error

    Thanks!
  • sansky09sansky09 Member Posts: 13
    You are right. It worked after I disabled the optimizer. Thank you.
    OS : Win 8.1
    Ethereum: 0.9.41
    The exact source code:
    contract metaCoin {
    mapping (address => uint) balances;
    function metaCoin() {
    balances[msg.sender] = 10000;
    }
    function sendCoin(address receiver, uint amount) returns(bool sufficient) {
    if (balances[msg.sender] < amount) return false;
    balances[msg.sender] -= amount;
    balances[receiver] += amount;
    return true;
    }
    }
  • sansky09sansky09 Member Posts: 13
    Also, another observation is the "Contract" pane is not showing up?
  • chrisethchriseth Member Posts: 170 ✭✭✭
    Thanks for your response. Unfortunately, I cannot reproduce your problem on 0.1.2-5c3bfd4b*/.-/clang/int. Can you please tell how you compile the code (browser-compiler, solc, geth via JSONRPC, AlethZero, Mix ...) and the exact Solidity compiler version?
    Thanks!
  • FlanaganFlanagan Member Posts: 15
    edited September 2015
    Same problem here, using latest Mix on Windows 10.

    This code fails with Successor block error:
    if (msg.sender == owner) {
       owner.send(this.balance);
    }
    This works fine.
    if (msg.sender != owner)
       return;
    owner.send(this.balance);
  • water_resistantwater_resistant Member Posts: 3
    edited September 2015
    same problem here. Windows 10 using ethereum 0.9.92 works with some modifications and doesn't with others.. just what Flanagan describes. I'm using MIX IDE that came with ethereum 0.9.92 windows version.

    for me it was happening when I would call another function. for example:

    function xyz(parameters){
    int abc = this.foo(parameters);
    }
    function foo(parameters) { ... }

    it worked in the previous builds about 2 weeks ago. but not anymore.
    Post edited by water_resistant on
  • sansky09sansky09 Member Posts: 13
    Chris, coming to your question. I am using AlethZero. How do I find out the solidity compiler version? I am using whatever is packaged with 0.9.41 rel. btw.
    Regards,
  • sansky09sansky09 Member Posts: 13
    ok got it:
    C:\Program Files\Ethereum 0.9.41\Release>solc --version
    solc, the solidity compiler commandline interface
    Version: 0.1.1-ed7a8a35/Release-Windows/msvc/JIT
  • chrisethchriseth Member Posts: 170 ✭✭✭
    Fixed in latest develop.
Sign In or Register to comment.