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

Runtime Panic using v2.1/gl #96

Closed
Noofbiz opened this issue Mar 21, 2018 · 6 comments
Closed

Runtime Panic using v2.1/gl #96

Noofbiz opened this issue Mar 21, 2018 · 6 comments
Labels

Comments

@Noofbiz
Copy link

Noofbiz commented Mar 21, 2018

Original issue here EngoEngine/engo#520

Related to: f8cee0f

If we use eafa86a everything works perfectly. It looks like it comes from the change to GlowGetProcAddress_gl21; before it returned a value and now it's not, so when ClearColor is called it gets to here in package.go:

func ClearColor(red float32, green float32, blue float32, alpha float32) {
	C.glowClearColor(gpClearColor, (C.GLfloat)(red), (C.GLfloat)(green), (C.GLfloat)(blue), (C.GLfloat)(alpha))
}

When it tries to get gpClearColor = (C.GPCLEARCOLOR)(getProcAddr("glClearColor")) it segfaults.

@dmitshur
Copy link
Member

Thank you for reporting this. This is clearly a bug and shouldn't happen. We need to investigate what is different about ClearColor in new XML data.

@dmitshur dmitshur added the bug label Mar 21, 2018
@dmitshur
Copy link
Member

@Noofbiz Since you're able to reproduce this (I can't yet), is it possible for you to make a smaller repro sample?

github.com/go-gl/example/gl21-cube works okay for me despite using ClearColor. Does it work for you too?

@dmitshur
Copy link
Member

When I compare v2.1/gl/package.go before and after that commit, there is no change related to ClearColor. I suspect the issue is not tied to that particular function, but rather it just happened to be the first one called.

@dmitshur
Copy link
Member

dmitshur commented Mar 21, 2018

I tried the hud demo from EngoEngine/engo#520. I got the same crash. I tried it again with eafa86a, and got the same crash. It doesn't seem to be an issue with go-gl/gl.

@Noofbiz
Copy link
Author

Noofbiz commented Mar 21, 2018

Thank you for checking that out so throughly and quickly. Sorry for any inconveniences

@Noofbiz Noofbiz closed this as completed Mar 21, 2018
@dmitshur
Copy link
Member

No problem, thanks anyway!

@dmitshur dmitshur added invalid and removed bug labels Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants