It is currently Sat Aug 22, 2020 4:16 am


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Examples segfault on glGenBuffers
PostPosted: Sun Dec 19, 2010 1:51 am 

Joined: Sun Dec 19, 2010 1:22 am
Posts: 2
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


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Examples segfault on glGenBuffers
PostPosted: Sun Dec 19, 2010 11:04 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Examples segfault on glGenBuffers
PostPosted: Sun Dec 19, 2010 1:45 pm 

Joined: Sat Dec 18, 2010 2:58 am
Posts: 41
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).


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Examples segfault on glGenBuffers
PostPosted: Sun Dec 19, 2010 2:46 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Examples segfault on glGenBuffers
PostPosted: Tue Dec 21, 2010 8:27 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
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.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Examples segfault on glGenBuffers
PostPosted: Mon Dec 27, 2010 11:15 am 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
David's just fixed the crash on his test machine and it works on mine too now as well.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net