Skip to content

Aground game panics on startup  #38

@jdknives

Description

@jdknives

When runnning aground, the following panic occurs:

$work:aground-game[master] cx  .
error: internal/model/cell.cx:38 trying to assign argument of type 'struct' to symbol 'mat' of type 'Material'
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running, locked to thread]:
github.com/skycoin/cx/cxparser/actions.CheckTypes(0xc000a9ad80)
	/home/work/go/src/github.com/skycoin/cx/cxparser/actions/functions.go:591 +0xddc
github.com/skycoin/cx/cxparser/actions.FunctionDeclaration(0xc00063be00, {0xc0000af860, 0xc000128600, 0x3}, {0xc00085e570, 0x2, 0x2}, {0xc000ac8000, 0x33, 0x40})
	/home/work/go/src/github.com/skycoin/cx/cxparser/actions/functions.go:190 +0x6cf
github.com/skycoin/cx/cxparser/cxparsingcompletor.yyParse({0x8f9778, 0xc00086b9e0})
	/home/work/go/src/github.com/skycoin/cx/cxparser/cxparsingcompletor/parsingcompletor.go:1702 +0x12e7
github.com/skycoin/cx/cxparser/cxparsingcompletor.Parse(...)
	/home/work/go/src/github.com/skycoin/cx/cxparser/cxparsingcompletor/parsingcompletor.go:31
github.com/skycoin/cx/cxparser/cxparsing.Passtwo(0xc00001afc0)
	/home/work/go/src/github.com/skycoin/cx/cxparser/cxparsing/helpers.go:26 +0x34
github.com/skycoin/cx/cxparser/cxparsing.ParseSourceCode({0xc000303900, 0x15, 0x14}, {0xc00014ca00, 0x14, 0x20})
	/home/work/go/src/github.com/skycoin/cx/cxparser/cxparsing/cxparsing.go:108 +0x6e5
main.parseProgram({0x0, {0x8f1218, 0x0}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {0x0, ...}, ...}, ...)
	/home/work/go/src/github.com/skycoin/cx/cmd/cx/helpers.go:54 +0x327
main.Run({0xc000128010, 0x1, 0x1})
	/home/work/go/src/github.com/skycoin/cx/cmd/cx/main.go:160 +0x371
main.main()
	/home/work/go/src/github.com/skycoin/cx/cmd/cx/main.go:22 +0x45

CX version used is 0.8.0.

OS is Arch Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions