octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44478] test __osmesa_print__.cc-tst crashes w


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44478] test __osmesa_print__.cc-tst crashes with Nvidia drivers
Date: Wed, 11 May 2016 18:30:49 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #81, bug #44478 (project octave):

Your sample program is exhibiting the same problem with invalid context.  I
run this and see nonsensical numbers as well.  If I make the change:


--- osmesa-foo.cc       2016-05-11 12:47:27.675647015 -0500
+++ osmesa-foo-mod.cc   2016-05-11 13:03:55.287656681 -0500
@@ -31,7 +31,7 @@
   if (! OSMesaMakeCurrent (ctx, buffer, GL_UNSIGNED_BYTE, Width, Height))
     error ("__osmesa_print__: OSMesaMakeCurrent failed!");
 
-  GLint z, s;
+  GLint z=0, s=0;
   glGetIntegerv (GL_DEPTH_BITS, &z);
   glGetIntegerv (GL_STENCIL_BITS, &s);
 


I see


GL_DEPTH_BITS: 0
GL_STENCIL_BITS: 0


It's just that in the more complicated Octave/multi-thread setting we get a
seg fault rather than "no action".

But your program could be a good debugging environment because it compiles
quickly and may give more traceable debugging.

Either OSMesaCreateContextExt() is not working properly, even though the
return value is telling us it is.  Or, the context is constructed correctly
and the switch OSMesaMakeCurrent() is not correct.  If I had to guess, I say
the former (i.e., creating the context) is what fails.

The thing I'm wondering about is how the OpenGL environment is initialized, or
if it needs to be done at all.  The OpenGL documentation is very vague on this
saying that it is system dependent and suggesting that we should just use a
window manager (e.g., Qt?) which will have done the necessary work.

In that regard, is there something that needs to be done at the start of this
sample program (call some function, include some library)?

For example, take a look at this example where someone tries to call
glGetIntegerv() without having even created a context:

http://stackoverflow.com/questions/6594214/glgetintegerv-returning-garbage-value

The person then adds some "glut" type of code at the front which does the
context creation (apparently) for a window.  There is some magic going on
there which I don't fully comprehend yet.  Is there some type of
initialization that needs to be done for the nVidia OpenGL library?


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44478>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]