cmbruns / pyopenvr

Unofficial python bindings for Valve's OpenVR virtual reality SDK
BSD 3-Clause "New" or "Revised" License
254 stars 41 forks source link

"NULL pointer access" if controller is on or is turned on while it's running #56

Open ghost opened 5 years ago

ghost commented 5 years ago

HTC Vive Ubuntu 18.10 same problem on Python 2.7 and 3.x If none of the controllers are turned on, the test_obj.py script in objmesh samples works just fine. But if one or both controllers are turned on and then starting test_obj.py, a NULL pointer access error crashes the script. Same problem if one or both controllers are turned on while the script is running.

Traceback (most recent call last):
  File "test_obj.py", line 809, in <module>
    glfwApp.render_scene()
  File "/home/source/.local/lib/python3.6/site-packages/openvr/glframework/glfw_app.py", line 60, in render_scene
    self.renderer.render_scene()
  File "/home/source/.local/lib/python3.6/site-packages/openvr/gl_renderer.py", line 202, in render_scene
    self.display_gl(mvr, self.projection_right)
  File "/home/source/.local/lib/python3.6/site-packages/openvr/gl_renderer.py", line 211, in display_gl
    actor.display_gl(modelview, projection)
  File "/home/source/.local/lib/python3.6/site-packages/openvr/tracked_devices_actor.py", line 214, in display_gl
    mesh.display_gl(modelview, projection, pose)
  File "/home/source/.local/lib/python3.6/site-packages/openvr/tracked_devices_actor.py", line 102, in display_gl
    self._try_load_model()
  File "/home/source/.local/lib/python3.6/site-packages/openvr/tracked_devices_actor.py", line 77, in _try_load_model
    self._try_load_texture()
  File "/home/source/.local/lib/python3.6/site-packages/openvr/tracked_devices_actor.py", line 84, in _try_load_texture
    self.texture_map = texture_map.contents
ValueError: NULL pointer access
cmbruns commented 5 years ago

@source83 test_obj.py is still working fine for me on Windows, and I'm unable to test on linux. The exact crashing line has actually changed recently, so maybe it would work better now? Could you please try again and report back?

Anyone who can help debug this on linux would be much appreciated.