pyopenxr_examples icon indicating copy to clipboard operation
pyopenxr_examples copied to clipboard

xr.exception.HandleInvalidError: A supplied object handle was invalid when running 'hello_xr.py'

Open Gistix opened this issue 1 year ago • 0 comments

I'm trying to run the example on Windows 10

\pyopenxr_examples-main\xr_examples>hello_xr.py
03/29/23 11:02:20.147 main INFO: Press any key to shutdown...
03/29/23 11:02:20.177 openxr_program INFO: Available Layers: (2)
03/29/23 11:02:20.517 openxr_program INFO: Instance RuntimeName=SteamVR/OpenXR RuntimeVersion=0.1.0
03/29/23 11:02:20.518 openxr_program INFO: Available View Configuration Types: (1)
03/29/23 11:02:20.518 openxr_program INFO: Available Environment Blend Mode count : (1)
03/29/23 11:02:20.519 openxr_program INFO: Environment Blend Mode (EnvironmentBlendMode.OPAQUE) : (Selected)
Traceback (most recent call last):
  File "\pyopenxr_examples-main\xr_examples\hello_xr\main.py", line 81, in main
    program.initialize_device()
  File "\pyopenxr_examples-main\xr_examples\hello_xr\openxr_program.py", line 532, in initialize_device
    self.graphics_plugin.initialize_device(self.instance.handle, self.system.id)
  File "\pyopenxr_examples-main\xr_examples\hello_xr\graphics_plugin_opengl.py", line 220, in initialize_device
    self.initialize_resources()
  File "\pyopenxr_examples-main\xr_examples\hello_xr\graphics_plugin_opengl.py", line 244, in initialize_resources
    GL.glBufferData(GL.GL_ARRAY_BUFFER, c_cubeVertices, GL.GL_STATIC_DRAW)
  File "src/latebind.pyx", line 51, in OpenGL_accelerate.latebind.Curry.__call__
  File "C:\Users\*\AppData\Local\Programs\Python\Python39\lib\site-packages\OpenGL\GL\VERSION\GL_1_5.py", line 89, in glBufferData
    return baseOperation( target, size, data, usage )
  File "src/latebind.pyx", line 39, in OpenGL_accelerate.latebind.LateBind.__call__
  File "src/wrapper.pyx", line 314, in OpenGL_accelerate.wrapper.Wrapper.__call__
  File "src/wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.__call__
  File "C:\Users\*\AppData\Local\Programs\Python\Python39\lib\site-packages\OpenGL\platform\baseplatform.py", line 402, in __call__
    return self( *args, **named )
ctypes.ArgumentError: ("argument 3: <class 'TypeError'>: wrong type", (GL_ARRAY_BUFFER, 864, array([[[[-0.5 ,  0.5 , -0.5 ],
         [ 0.25,  0.  ,  0.  ]],

        [[-0.5 , -0.5 ,  0.5 ],
         [ 0.25,  0.  ,  0.  ]],

        [[-0.5 , -0.5 , -0.5 ],
         [ 0.25,  0.  ,  0.  ]],

        [[-0.5 ,  0.5 , -0.5 ],
         [ 0.25,  0.  ,  0.  ]],

        [[-0.5 ,  0.5 ,  0.5 ],
         [ 0.25,  0.  ,  0.  ]],

        [[-0.5 , -0.5 ,  0.5 ],
         [ 0.25,  0.  ,  0.  ]]],


       [[[ 0.5 ,  0.5 , -0.5 ],
         [ 1.  ,  0.  ,  0.  ]],

        [[ 0.5 , -0.5 , -0.5 ],
         [ 1.  ,  0.  ,  0.  ]],

        [[ 0.5 , -0.5 ,  0.5 ],
         [ 1.  ,  0.  ,  0.  ]],

        [[ 0.5 ,  0.5 , -0.5 ],
         [ 1.  ,  0.  ,  0.  ]],

        [[ 0.5 , -0.5 ,  0.5 ],
         [ 1.  ,  0.  ,  0.  ]],

        [[ 0.5 ,  0.5 ,  0.5 ],
         [ 1.  ,  0.  ,  0.  ]]],


       [[[-0.5 , -0.5 , -0.5 ],
         [ 0.  ,  0.25,  0.  ]],

        [[-0.5 , -0.5 ,  0.5 ],
         [ 0.  ,  0.25,  0.  ]],

        [[ 0.5 , -0.5 ,  0.5 ],
         [ 0.  ,  0.25,  0.  ]],

        [[-0.5 , -0.5 , -0.5 ],
         [ 0.  ,  0.25,  0.  ]],

        [[ 0.5 , -0.5 ,  0.5 ],
         [ 0.  ,  0.25,  0.  ]],

        [[ 0.5 , -0.5 , -0.5 ],
         [ 0.  ,  0.25,  0.  ]]],


       [[[-0.5 ,  0.5 , -0.5 ],
         [ 0.  ,  1.  ,  0.  ]],

        [[ 0.5 ,  0.5 , -0.5 ],
         [ 0.  ,  1.  ,  0.  ]],

        [[ 0.5 ,  0.5 ,  0.5 ],
         [ 0.  ,  1.  ,  0.  ]],

        [[-0.5 ,  0.5 , -0.5 ],
         [ 0.  ,  1.  ,  0.  ]],

        [[ 0.5 ,  0.5 ,  0.5 ],
         [ 0.  ,  1.  ,  0.  ]],

        [[-0.5 ,  0.5 ,  0.5 ],
         [ 0.  ,  1.  ,  0.  ]]],


       [[[-0.5 , -0.5 , -0.5 ],
         [ 0.  ,  0.  ,  0.25]],

        [[ 0.5 , -0.5 , -0.5 ],
         [ 0.  ,  0.  ,  0.25]],

        [[ 0.5 ,  0.5 , -0.5 ],
         [ 0.  ,  0.  ,  0.25]],

        [[-0.5 , -0.5 , -0.5 ],
         [ 0.  ,  0.  ,  0.25]],

        [[ 0.5 ,  0.5 , -0.5 ],
         [ 0.  ,  0.  ,  0.25]],

        [[-0.5 ,  0.5 , -0.5 ],
         [ 0.  ,  0.  ,  0.25]]],


       [[[-0.5 , -0.5 ,  0.5 ],
         [ 0.  ,  0.  ,  1.  ]],

        [[-0.5 ,  0.5 ,  0.5 ],
         [ 0.  ,  0.  ,  1.  ]],

        [[ 0.5 ,  0.5 ,  0.5 ],
         [ 0.  ,  0.  ,  1.  ]],

        [[-0.5 , -0.5 ,  0.5 ],
         [ 0.  ,  0.  ,  1.  ]],

        [[ 0.5 ,  0.5 ,  0.5 ],
         [ 0.  ,  0.  ,  1.  ]],

        [[ 0.5 , -0.5 ,  0.5 ],
         [ 0.  ,  0.  ,  1.  ]]]], dtype=float32), GL_STATIC_DRAW))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\pyopenxr_examples-main\xr_examples\hello_xr.py", line 4, in <module>
    main()
  File "\pyopenxr_examples-main\xr_examples\hello_xr\main.py", line 103, in main
    break
  File "\pyopenxr_examples-main\xr_examples\hello_xr\openxr_program.py", line 114, in __exit__
    xr.destroy_space(self.input.hand_space[hand])
  File "C:\Users\*\AppData\Local\Programs\Python\Python39\lib\site-packages\xr\functions.py", line 388, in destroy_space
    raise result
xr.exception.HandleInvalidError: A supplied object handle was invalid.

Gistix avatar Mar 30 '23 02:03 Gistix