coin3d / coin

Coin3D core library
BSD 3-Clause "New" or "Revised" License
289 stars 109 forks source link

coin3d with nvidia optimus oddness? #97

Open VolkerEnderlein opened 9 years ago

VolkerEnderlein commented 9 years ago

Original report by john candlish (Bitbucket: jCandlish, GitHub: jCandlish).


Hello

I experience odd program behavior when Coin3d (FreeCAD) runs from the nvidia-optimus (bumblebee-primus) environment. The other GPU in my laptop works OK, and nvidia-optimus is fine for nsight-CUDA apps.

Coin warning in glglue_init(): glVertexArrayRangeNV found, but one or more of the other vertex array functions were not found

#!text

candlish@w530:~/CADCAM/freecad/branches/FreeCAD_sf_master$ optirun bash
candlish@w530:~/CADCAM/freecad/branches/FreeCAD_sf_master$ cd build
candlish@w530:~/CADCAM/freecad/branches/FreeCAD_sf_master/build$ bin/FreeCAD
FreeCAD 0.16, Libs: 0.16R4806 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Coin warning in glglue_init(): glVertexArrayRangeNV found, but one or more of the other vertex array functions were not found
Draft workbench activated
Draft workbench deactivated
Draft workbench activated
*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 8
candlish@w530:~/CADCAM/freecad/branches/FreeCAD_sf_master/build$ 

The screwy GL context causes lots of funny, but non-fatal, UI quirks. FreeCAD hangs on application close, then SEGVs.

Anybody else see this behavior?

#!text

OS: Debian GNU/Linux 8.0 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4806 (Git)
Branch: master
Hash: a7c346606fe588b0f2faa251e3ae72e9ef833184
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a

Thanks jCandlish .

VolkerEnderlein commented 9 years ago

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


Hi John,

Sorry, I don't know anything about the nVidia-Optimus environment.

However, I glanced at the error message in gl.cpp, line 1886, and noted that there are three other functions it is looking for. Are you able to tell which one(s) is(are) missing?

Roy

VolkerEnderlein commented 9 years ago

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


John,

Thanks for the update. I see two lines of attack:

1) Try finding out from NVidia if they really aren't supported, and if not what to use instead. 2) Review the Coin code to determine where they are used and look to see if there is an alternative.

I can have a go at the latter.

Roy

VolkerEnderlein commented 9 years ago

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


John,

I'm sorry to have to admit that I am not seeing what the problem is. Can you expand for me, please?

Roy

VolkerEnderlein commented 9 years ago

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


John,

The one thing I have noted when reading the OpenGL extension registry documentation is that the two missing functions are not part of the glVertexArrayRangeNV extension. Instead I have seen comments it is part of the wglAllocateMemoryNV / glXAllocateMemoryNV extension. I looked at both the wglext.h and the glxext.h files on the OpenGL web site. wglAllocateMemeoryNV was in the wglext.h file but I couldn't find glXAllocateMemoryNV in the glxext.h file.

Does the nVidia-Optimus have either of these two functions?

Roy

VolkerEnderlein commented 9 years ago

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


John,

Thanks for the update.

Roy