help with glfw seg-fault

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

help with glfw seg-fault

briand-3
Hi,

  GLFW.swapBuffers w

is the culprit.

Not sure where to go from there.

That's a pretty low level failure.

Any suggestions.

Brian
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: help with glfw seg-fault

Daniel P. Wright
Hi Brian,

Have you checked for / output any GL errors that happen before you call swapBuffers? I have a function printErrors (as defined here http://dpwright.com/posts/2015/03/25/the-haskell-gl-package/#error-handling-utilities ) which I scatter around when things go wrong to try and find the root cause...

-Dani

2015/05/26 14:19、<[hidden email]> <[hidden email]> のメッセージ:

> Hi,
>
>  GLFW.swapBuffers w
>
> is the culprit.
>
> Not sure where to go from there.
>
> That's a pretty low level failure.
>
> Any suggestions.
>
> Brian
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: help with glfw seg-fault

briand-3
On Tue, 26 May 2015 14:34:16 +0900
"Daniel P. Wright" <[hidden email]> wrote:

> Hi Brian,
>
> Have you checked for / output any GL errors that happen before you call swapBuffers? I have a function printErrors (as defined here http://dpwright.com/posts/2015/03/25/the-haskell-gl-package/#error-handling-utilities ) which I scatter around when things go wrong to try and find the root cause...
>

+list

glGetErrors is in the openglraw package but not opengl, which is kind of weird.

on your web page: GL_NO_ERROR should be gl_NO_ERROR

and sadly, i put in the getErrors function and i'm getting the empty list right before it segfaults.


Brian
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: help with glfw seg-fault

briand-3
In reply to this post by Daniel P. Wright
On Tue, 26 May 2015 14:34:16 +0900
"Daniel P. Wright" <[hidden email]> wrote:

> Hi Brian,
>
> Have you checked for / output any GL errors that happen before you call swapBuffers? I have a function printErrors (as defined here http://dpwright.com/posts/2015/03/25/the-haskell-gl-package/#error-handling-utilities ) which I scatter around when things go wrong to try and find the root cause...
>

bug report!


  m@(~(Just w)) <- createWindow 400 400 "Title" Nothing Nothing
  when (isNothing m) (error "Couldn't create window!")  

  GLFW.makeContextCurrent m
  ^^^^^^^^^^^^^^^^^^^^^^^^^

then no seg-faults.

Brian
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: help with glfw seg-fault

Daniel P. Wright
Ah, yeah, that blog post I linked is using the "gl" package rather than the "OpenGL"/"OpenGLRaw" packages, so some of the names of things are a bit different.

Glad you got it sorted in the end!

2015-05-29 13:32 GMT+09:00 <[hidden email]>:
On Tue, 26 May 2015 14:34:16 +0900
"Daniel P. Wright" <[hidden email]> wrote:

> Hi Brian,
>
> Have you checked for / output any GL errors that happen before you call swapBuffers? I have a function printErrors (as defined here http://dpwright.com/posts/2015/03/25/the-haskell-gl-package/#error-handling-utilities ) which I scatter around when things go wrong to try and find the root cause...
>

bug report!


  m@(~(Just w)) <- createWindow 400 400 "Title" Nothing Nothing
  when (isNothing m) (error "Couldn't create window!")

  GLFW.makeContextCurrent m
  ^^^^^^^^^^^^^^^^^^^^^^^^^

then no seg-faults.

Brian


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe