Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Examples segfault on glGenBuffers
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=107
Page 1 of 1

Author:  elyzion [ Sun Dec 19, 2010 1:51 am ]
Post subject:  Examples segfault on glGenBuffers

Hey,

I checked out polyvox from svn last night, built and installed it. However, the example applications are segfaulting on my system. (polyvox itself is fine i think). In particular, it is segfaulting on PolyVox/examples/Basic/OpenGLWidget.cpp:22 and PolyVox/examples/OpenGL/OpenGLVertexBufferObjectSupport.cpp:48. (stupid segv on glGenBuffers)

This probably has more to do with my linking or system setup than polyvox, but if you have any suggestions as to how I can resolve this issue, I would be glad to hear them. (I usually work with java and php these days, so my c++ has rusted into oblivion)

I am running the 64bit build of OpenSUSE 11.3. A coredump from the opengl example is available at http://aphyre.com/~elyzion/core.tar.gz

gdb stack info:
Code:
#0  0x0000000000000000 in ?? ()
#1  0x000000000043c55b in OpenGLWidget::setSurfaceMeshToRender (this=0x7fffffffdb60, surfaceMesh=...) at /home/elyzion/projects/PolyVox/examples/Basic/OpenGLWidget.cpp:22
#2  0x000000000043725c in main (argc=1, argv=<value optimized out>) at /home/elyzion/projects/PolyVox/examples/Basic/main.cpp:90

Code:
#0  0x0000000000000000 in ?? ()
#1  0x000000000043fa74 in BuildOpenGLSurfaceMesh (mesh=...) at /home/elyzion/projects/PolyVox/examples/OpenGL/OpenGLVertexBufferObjectSupport.cpp:48
#2  0x0000000000440914 in OpenGLWidget::setVolume (this=0x7fffffffd970, volData=0x7fffffffda40) at /home/elyzion/projects/PolyVox/examples/OpenGL/OpenGLWidget.cpp:142
#3  0x000000000043b2ce in main (argc=1, argv=<value optimized out>) at /home/elyzion/projects/PolyVox/examples/OpenGL/main.cpp:120

Author:  David Williams [ Sun Dec 19, 2010 11:04 am ]
Post subject:  Re: Examples segfault on glGenBuffers

Interesting... unfortunatly don't have the knowledge to examine the core file to see what went wrong (I'm a windows developer I'm afraid...) but I can give you some other pointers.

Firstly, you should check the BasicExample as well as the OpenGLExample - it's a lot simpler so there's a chance it works better.

Secondly, there is actually an option to run the OpenGLExample without vertex/index buffers, instead it can use the old OpenGL immediate mode. This should avoid calling glGenBuffers altogether. Search for 'm_bUseOpenGLVertexBufferObjects' and change it to be initialised to false instead of true. Maybe this will help work out if you have a problem with PolyVox or OpenGL.

Author:  Freakazo [ Sun Dec 19, 2010 1:45 pm ]
Post subject:  Re: Examples segfault on glGenBuffers

Examples didn't work for me either, m_bUseOpenGLVertexBufferObjects = false; did fix it for me. However it's running pretty slow (I don't know how fast it would normally run actually).

Author:  David Williams [ Sun Dec 19, 2010 2:46 pm ]
Post subject:  Re: Examples segfault on glGenBuffers

Ah, right, so there's a problem with the examples under Linux. Actually my Linux setup is just in a virtual machine without hardware acceleration, so I can't run the samples myself. I just check they compile.

It does appear to be an OpenGL problem rather than a PolyVox problem (as it works in immediate mode), buit it could also be that I need to do some extra setup steps. Do you have proper OpenGL drivers installed or are you using Mesa?

Anyway, I'll talk to milliams and maybe we can get this sorted over Christmas.

Author:  milliams [ Tue Dec 21, 2010 8:27 pm ]
Post subject:  Re: Examples segfault on glGenBuffers

Ok, I'm able to reproduce this crash. I too am running openSUSE 11.3 64-bit. I'll start to look into the source of the error and discuss it with David when I see him.

Author:  milliams [ Mon Dec 27, 2010 11:15 am ]
Post subject:  Re: Examples segfault on glGenBuffers

David's just fixed the crash on his test machine and it works on mine too now as well.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/