Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snake game panics on run #40

Open
jdknives opened this issue Sep 21, 2021 · 0 comments
Open

Snake game panics on run #40

jdknives opened this issue Sep 21, 2021 · 0 comments

Comments

@jdknives
Copy link
Member

error: cmd/main.cx:93, CX_RUNTIME_ERROR, texture "/../assets/textures/snake_new-head.png" not found on disk: open /assets/textures/snake_new-head.png: no such file or directory

===Callstack===
>>> initTextures()
Expressions
 	cmd/main.cx:91 : os.GetWorkingDirectory() : 1083778
	cmd/main.cx:93 : sprintf() : 1083787
	cmd/main.cx:93 : gl.NewTexture() : 0
	cmd/main.cx:94 : sprintf() : 0
	cmd/main.cx:94 : gl.NewTexture() : 0
	cmd/main.cx:95 : sprintf() : 0
	cmd/main.cx:95 : gl.NewTexture() : 0
	cmd/main.cx:96 : sprintf() : 0
	cmd/main.cx:96 : gl.NewTexture() : 0
	cmd/main.cx:97 : sprintf() : 0
	cmd/main.cx:97 : gl.NewTexture() : 0

>>> main()
Expressions
 	cmd/main.cx:620 : identity() : false
	cmd/main.cx:0 : glfw.GetTime() : 0
	cmd/main.cx:627 : glfw.ShouldClose() : false
	cmd/main.cx:651 : bool.not() : false
	cmd/main.cx:628 : i32.bitor() : 0
	cmd/main.cx:634 : eq() : false
	cmd/main.cx:0 : eq() : false
	cmd/main.cx:638 : glfw.GetTime() : 0
	cmd/main.cx:638 : f64.sub() : 0
	cmd/main.cx:638 : f64.lt() : 0.25
	cmd/main.cx:642 : f64.lt() : false
	cmd/main.cx:646 : eq() : false

goroutine 1 [running, locked to thread]:
runtime/debug.Stack()
	/usr/lib/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	/usr/lib/go/src/runtime/debug/stack.go:16 +0x19
github.com/skycoin/cx/cx/ast.RuntimeErrorInfo({0x7fc780, 0xc00082fa40}, 0x1, 0x5)
	/home/work/go/src/github.com/skycoin/cx/cx/ast/error.go:55 +0x26b
github.com/skycoin/cx/cx/ast.RuntimeError()
	/home/work/go/src/github.com/skycoin/cx/cx/ast/error.go:78 +0x13c
panic({0x7fc780, 0xc00082fa40})
	/usr/lib/go/src/runtime/panic.go:1038 +0x215
github.com/skycoin/cx/cx/packages/cxfx.uploadTexture({0xc000258090, 0xc000a08994}, 0x26, 0x0, 0x0)
	/home/work/go/src/github.com/skycoin/cx/cx/packages/cxfx/op_opengl.go:264 +0x3d9
github.com/skycoin/cx/cx/packages/cxfx.opGlNewTexture({0xc000194380, 0x1, 0x0}, {0xc000188000, 0x1, 0x0})
	/home/work/go/src/github.com/skycoin/cx/cx/packages/cxfx/op_opengl.go:323 +0x1e7
github.com/skycoin/cx/cx/ast.(*CXCall).Ccall(0xc0002f0018, 0xc0002ee750, 0xc0008e1c08, 0xc0008e1bf0)
	/home/work/go/src/github.com/skycoin/cx/cx/ast/ast_cxcall.go:125 +0x6de
github.com/skycoin/cx/cx/execute.RunCxAst(0xc0002ee750, 0x1, 0xc0008e1d70, 0xffffffff)
	/home/work/go/src/github.com/skycoin/cx/cx/execute/execute.go:86 +0x1d4
github.com/skycoin/cx/cx/execute.RunCompiled(0xc0002ee750, 0x0, {0x0, 0x0, 0x7abf40})
	/home/work/go/src/github.com/skycoin/cx/cx/execute/execute.go:171 +0x55e
main.runProgram({0x0, {0x8f1218, 0x0}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {0x0, ...}, ...}, ...)
	/home/work/go/src/github.com/skycoin/cx/cmd/cx/main.go:196 +0x125
main.Run({0xc000012050, 0x1, 0x1})
	/home/work/go/src/github.com/skycoin/cx/cmd/cx/main.go:178 +0x448
main.main()
	/home/work/go/src/github.com/skycoin/cx/cmd/cx/main.go:22 +0x45

This panic occurs when running snake as specified in the README.md against CX version 0.8.0 on Arch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant