Fatal Error when running code from tutorial

bcurdybcurdy Member Posts: 9
Hello,

First of all, as I'm new here, please let me know if this is not the right place to post such topics.

I've installed the Go version of ethereum/ethereal without any problem.

The issue appears when I try to run the code from the tutorial: http://hidskes.com/blog/2014/05/21/ethereum-dapp-development-for-web-developers/ (the 14 lines after "The whole contract should now look something like this:")

I get the following error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x38 pc=0x41f99a5]

The whole trace is on http://pastebin.com/3cvDucu3

I'm running this on MacBook Pro on OSX (10.9.2)

Any idea what could be happening ?

Thanks a lot,

Ben

Comments

  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    Hello! Do you mean it panics when you press the 'send' button in the client?
    Also can you please let us know which release you are using (current is POC5 RC8, in doubt just re-run both 'go get' commands to install the latest).
  • bcurdybcurdy Member Posts: 9
    Yes, exactly. Both "Send" and "Debug" buttons lead to the same panic result. I run version "v0.5.0 RC8". Running "go get" again didn't help.

    As nobody else seems to experience this, I'm inclined to think that the issue comes from my Go install. There might be a weird conflict somewhere. I'm going to start over from scratch. Thanks for the input!
  • MaranMaran Member Posts: 7
    It might have something to do with the fact that since I wrote the post the contract format changed. I updated the post with the version that should be used in the newer RC releases. Please let me know if that works for you.
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    The contract format has indeed changed. New code should be:

    this.store[this.origin()] = 10**20 return lambda { big to = this.data[0] big from = this.origin() big value = this.data[1] if this.store[from] > value { this.store[from] = this.store[from] - value this.store[to] = this.store[to] + value } }
Sign In or Register to comment.