OpenHMD: Segmentation fault in rift.c/get_device_list with VR-Tek WVR2 on Ubuntu
After compiling OpenHMD from master with cmake in debug mode, I ran the simple example with the headset plugged in and got a segmentation fault. Here’s my backtrace from ddd
:
in main () at simple.c:58
in ohmd_ctx_probe () at openhmd.c:120
in get_device_list () at rift.c:1081
wcscmp () at wcscmp.S:207
The relevant line in rift.c
is:
if((wcscmp(cur_dev->manufacturer_string, L"Oculus VR, Inc.") == 0) &&
I figure something is wrong with cur_dev->manufacturer_string
. The relevant line from lsusb
is:
Bus 001 Device 007: ID 2833:0001
It looks like the name is empty. I hope that isn’t the source of the segfault.
I should also note that I have installed OpenHMD from apt and the experimental SteamVR drivers from Valve. I also added their udev rules from here but didn’t mess with OpenHMD udev rules. xrandr --props
reports the headset as non-desktop
.
EDIT: When I prepend if(cur_dev->manufacturer_string &&
to the above, the segfault moves to vrtek.c
where it checks cur_dev->manufacturer_string
against L"STMicroelectronics"
. It’s pointless to keep kicking this can down the road, so I would suggest assigning manufacturer_string
(and others?) to an empty string if null earlier so as to avoid segfaulting wcscmp
.
EDIT 2: Hmm. What’s hid_enumerate
?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (13 by maintainers)
I don’t know how to read quaternions, but they are definitely moving now! I knew it must have been something stupid like that. Thanks! It even reports the correct model. Now I’ll try to get something to show up on the goggles.