Skip to content

Error while calling functions from all-core #104

Open
@olsdavis

Description

@olsdavis

Hi there!

Thanks for this library, it's very cool, but I am currently having a really annoying issue, which actually makes my program crash every time I call a function from the all-core/gl package. Here is the error:

Exception 0xc0000005 0x8 0x0 0x0
PC=0x0
signal arrived during external code execution

github.com/go-gl/gl/all-core/gl._Cfunc_glowBegin(0x0, 0x7ffe00000007)
	github.com/go-gl/gl/all-core/gl/_obj/_cgo_gotypes.go:3558 +0x4c
github.com/go-gl/gl/all-core/gl.Begin(0x7)
	A:/Apps/Go/bin/src/github.com/go-gl/gl/all-core/gl/package.go:10712 +0x3c
github.com/olsdavis/voxel/rendering.render()
	A:/Apps/Go/bin/src/github.com/olsdavis/voxel/rendering/display.go:57 +0x34
github.com/olsdavis/voxel/rendering.RenderDisplay()
	A:/Apps/Go/bin/src/github.com/olsdavis/voxel/rendering/display.go:43 +0x2e
main.main()
	A:/Apps/Go/bin/src/github.com/olsdavis/voxel/main.go:22 +0x1ec

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	A:/Apps/Go/src/runtime/asm_amd64.s:2197 +0x1
rax     0xc042031d80
rbx     0xc042031d80
rcx     0x7
rdi     0xc042031d80
rsi     0x601980
rbp     0xc042031d30
rsp     0xb1fd68
r8      0xc04201e000
r9      0x0
r10     0x0
r11     0x1
r12     0xc042038108
r13     0x0
r14     0xc0420380c0
r15     0x0
rip     0x0
rflags  0x10212
cs      0x33
fs      0x53
gs      0x2b

Process finished with exit code 2

Here is a snippet of the code which runs the LoadIdentity and makes the whole thing crash:

func (camera *Camera) InitProjection() {
	gl.Enable(gl2.PROJECTION)
	gl2.LoadIdentity() // the crash
	camera.perspective()
	gl.Enable(gl2.MODELVIEW)
}

Note: gl2 is the name of the all-core import.
Yeah, not a very good clue, I could send some more code if you ask. And I guess that this does to every other function of the package, because I've tested it with some others.

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions