open-ecosystem-development / OpenXR-SDK

Apache License 2.0
2 stars 3 forks source link

SIGSEV in xrAttachSessionActionSets() after calling xrSuggestInteractionProfileBindings() more than once #34

Open svillar opened 2 years ago

svillar commented 2 years ago

If we have multiple potential interaction profiles for a given device (as for HVR glasses were we have both 6DoF and 3DoF profiles) then we should call xrSuggestInteractionProfileBindings() multiple times. That's fine according to the spec.

However if you do that then the second call will fail with error

E/HxrInstance: [@SDK][HxrInstance.cpp:hxrAllocatePath](765): XR_ERROR_PATH_COUNT_EXCEEDED

And then after that when xrAttachSessionActionSets() is called the program will SIGSEV.

I found it working on Wolvic but I could reproduce it using HVRSDK_XrDemo. You just need to add an additional xrSuggestInteractionProfileBindings call and you'll get it.

dingsing2021 commented 2 years ago

feedback from HVR team:This problem needs to be further located.

svillar commented 2 years ago

I cannot reproduce it anymore with the latest .79 package

lzhangcs commented 2 years ago

Close as confirmed by the developer this is resolved by the below apk: image

svillar commented 2 years ago

Sorry but I was not and this is not fixed. We should reopen this. I'm still getting

2022-09-23 17:41:54.572 23821-24834/com.igalia.wolvic.dev E/HxrInstance: [@SDK][HxrInstance.cpp:hxrAllocatePath](765): XR_ERROR_PATH_COUNT_EXCEEDED

The error happens in the call to xrAttachSessionActionSets(). Seems that we can call xrSuggestInteractionProfileBindings multiple times, but the call to xrAttachSessionActionSets() SIGSEVs.

So please reopen this.

lzhangcs commented 2 years ago

per developer: Small correction here. #34 is not fixed. In OpenXR when registering the bindings for the actions of the controllers there are two calls that you use one after another, they're

xrSuggestInteractionProfileBindings() xrAttachSessionActionSets()

Originally calling the 1st one multiple times was causing a SIGSEV (crash). Now, after .79, we can call the first multiple times but the second one is now crashing with the same error. So although technically the original issue is "fixed" the whole process of registering the bindings is still broken.

dingsing2021 commented 2 years ago

I think this is for the 3dof&6dof one apk, some suggestions, please help to test 1,about the manifest 3dof|6dof ,it is the only flag indicated the app can support 3dof or 6dof or 3&6dof,
the VR runtime check the this flag and hardware, if the app is 6dof but the hardware is 3dof , a 6dof app will not be launch, an the runtime push a window to remind the user to install the 6dof camera kit. if the app is 3dof, but the hardware is 6dof, it will be launch and run, and the app will run in 3dof. 2、so maybe you can try set the manifest to 3dof|6dof, and bindings for the actions of the controllers only run one time. only use the 6dof profile. xrSuggestInteractionProfileBindings() xrAttachSessionActionSets() 3,use the xrGetSystemProperties() to get hardware capacity, and do different actions.

svillar commented 2 years ago

I think this is for the 3dof&6dof one apk, some suggestions, please help to test 1,about the manifest 3dof|6dof ,it is the only flag indicated the app can support 3dof or 6dof or 3&6dof, the VR runtime check the this flag and hardware, if the app is 6dof but the hardware is 3dof , a 6dof app will not be launch, an the runtime push a window to remind the user to install the 6dof camera kit. if the app is 3dof, but the hardware is 6dof, it will be launch and run, and the app will run in 3dof. 2、so maybe you can try set the manifest to 3dof|6dof, and bindings for the actions of the controllers only run one time. only use the 6dof profile. xrSuggestInteractionProfileBindings() xrAttachSessionActionSets() 3,use the xrGetSystemProperties() to get hardware capacity, and do different actions.

Yes, if I set the manifest to 3dof|6dofand use only the 6DoF profile that does not crash. But if I use more than one then it'll crash. For the short term we can live with that but it has to be fixed because it should be allowed to set more than one suggested binding.