Open georgewsinger opened 5 years ago
Hmmm, that is weird because if no controllers are attached it shouldn't be calling that. I wonder if this might be related to a recent change in Godot where the default device ID for an ARVRController node is now 1.
I'll have to do some testing to see if I can reproduce this
@BastiaanOlij It turns out that Godot being launched w/o a controller already connected is an incidental data point.
Launching Godot w/Vive controller already connected. This yields, at bootup and with occasional frequency:
ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null
At: servers/arvr_server.cpp:305.
as well as:
Found openvr device 1 (lh_basestation_vive)
Found openvr device 2 (vr_controller_vive_1_5)
Initialized VR interface.
Creating render model resource
OpenVR: increased use count to 2
Argument count: 1
Searching for: vr_controller_vive_1_5
along with the eventual crash reported above (not necessarily from pressing a Vive button either; sometimes pressing a button causes an immediate crash, and sometimes a crash eventually happens regardless). I hope this helps.
Launching Godot w/no controller connected. To make things more complicated (perhaps less complicated?), another person using godot_openvr in our project has reported that launching Godot w/o a controller connected causes (not always, but at least one time):
OpenVR: initialising OpenVR context
Main OpenVR interface has been initialized
Main render models interface has been initialized.
/home/sonata/.steam/steam/steamapps/common/SteamVR/bin/linux64/vrmonitor: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
Found openvr device 1 (lh_basestation_vive)
Using breakpad crash handler
Setting breakpad minidump AppID = 250820
Forcing breakpad minidump interfaces to load
Initialized VR interface.
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null
At: servers/arvr_server.cpp:305.
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x43f60) [0x7f7adbe9ef60] (??:0)
[2] /home/sonata/workspace/simula/Simula/addons/godot-openvr/bin/x11/libgodot_openvr.so(+0x2b98) [0x7f7ab2f11b98] (??:0)
[3] ARVRInterfaceGDNative::process() (/home/sonata/workspace/simula/Simula/build/godot/modules/gdnative/arvr/arvr_interface_gdnative.cpp:212)
[4] ARVRServer::_process() (/home/sonata/workspace/simula/Simula/build/godot/servers/arvr_server.cpp:352 (discriminator 2))
[5] VisualServerViewport::draw_viewports() (/home/sonata/workspace/simula/Simula/build/godot/servers/visual/visual_server_viewport.cpp:252)
[6] VisualServerRaster::draw(bool, double) (/home/sonata/workspace/simula/Simula/build/godot/servers/visual/visual_server_raster.cpp:107 (discriminator 2))
[7] VisualServerWrapMT::draw(bool, double) (/home/sonata/workspace/simula/Simula/build/godot/servers/visual/visual_server_wrap_mt.cpp:104)
[8] Main::iteration() (/home/sonata/workspace/simula/Simula/build/godot/main/main.cpp:1878)
[9] OS_X11::run() (/home/sonata/workspace/simula/Simula/build/godot/platform/x11/os_x11.cpp:2959)
[10] /home/sonata/workspace/simula/Simula/addons/godot-haskell-plugin/../..//bin/godot(main+0xdc) [0x115c81e] (/home/sonata/workspace/simula/Simula/build/godot/platform/x11/godot_x11.cpp:56)
[11] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f7adbe81b6b] (??:0)
[12] /home/sonata/workspace/simula/Simula/addons/godot-haskell-plugin/../..//bin/godot(_start+0x2a) [0x115c68a] (??:?)
-- END OF BACKTRACE --
which seems to be fixed by a reboot. Notice that
ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null
At: servers/arvr_server.cpp:305.
coming up again (though to be clear: the p_tracker_id == 0
error doesn't immediately cause the crash; it just floats in the console until the crash eventually happens, either from a button press or not).
The p_tracker_id == 0
warning is just a warning, it means there is an ARVRController node somewhere where controller id is set to 0.
I really don't get this crash issue, on my MR headset my controllers go to sleep all the time so I often don't turn them on until the game is running. But I'm on Windows, might be some weird issue in Linux though. @beniwtv do you have any ideas?
Are you running a master build or the version thats in the asset library?
I also run often without controllers, and turn them on later. Didn't have the issue so far. I would be good to know what Godot version you are using as well as what version of the asset (library or self-compiled)
Godot version. We are using a fork of Godot based on 10e9221
(commit date: Dec. 22nd 2018). I believe it's a beta version of Godot 3.1.
libgodot_openvr.so + libopenvr_api.so. It turns out we were using fairly old pre-compiled binaries (\~9 months old). I just recompiled godot_openvr and tried to reproduce some of these crashes but couldn't, though I was still getting familiar console output:
ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null
At: servers/arvr_server.cpp:305.
Found openvr device 1 (vr_controller_vive_1_5)
Creating render model resource
OpenVR: increased use count to 2
Argument count: 1
Searching for: vr_controller_vive_1_5
ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null
At: servers/arvr_server.cpp:305.
ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null
I'm crossing my fingers and hoping that updating godot_openvr fixed this issue. Right now I'm waiting for another person to test this on their Ubuntu machine. I'll report back with the results.
Like i said, the p_tracker_id is just a warning that there is an ARVRController set to an ID for which no controller is active. 0 is the default id (or was) so this is most likely caused by the split second where the ARVRController is added for the new controller but its tracker id isn't set yet.
Unfortunately, someone else testing another Ubuntu machine (with updated godot_openvr
libs) is still getting the crashes reported above. :S More specificially, if the godot_openvr
crash patterns thus far are:
then the tester said that they're still experiencing (1) and (3), even with updated godot_openvr
libs.
Could you try the current 3.1 + the current asset and see if the demo works? There have been some breaking changes in GDNative around Godot 3.1 beta/RCs if I remember correctly.
This bug only seems to reproduce when using AMD cards (AMDGPU driver), but hasn't reproduced for nvidia cards running nvidia drivers.
I've recently set up am Ubuntu 18.04 container for compiling this on Linux. Godot compiled on newer distros could be the cause of the crash on Ubuntu, which have lower versions of libc.
If you still have this issue, let me know if my recent build in this PR works: https://github.com/GodotVR/godot_openvr/pull/64
@beniwtv I'm using Ubuntu 19.04 and will test out your PR.
godotengine/godot
should I use: master
or 3.1`?1) 3.1 as well as master should be fine. 2) libc is the one from Ubuntu 18.04, so in theory anything equal or newer should work
@beniwtv When attempting to the launch the ./demo
in your PR (with godot 3.1
branch), I get the following error:
OpenGL ES 3.0 Renderer: GeForce GTX 1070/PCIe/SSE2
Construct gdnative interface
ERROR: _load_data: Condition ' !f ' is true. returned: ERR_CANT_OPEN
At: scene/resources/texture.cpp:495.
ERROR: _load: Failed loading resource: res://.import/Milkyway.png-c8038416f38c889c516f7e41b5681a1a.stex
At: core/io/resource_loader.cpp:285.
ERROR: _load: Failed loading resource: res://Milkyway.png
At: core/io/resource_loader.cpp:285.
ERROR: poll: res://Main.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Milkyway.png
At: scene/resources/resource_format_text.cpp:440.
ERROR: load: Condition ' err != OK ' is true. returned: RES()
At: core/io/resource_loader.cpp:208.
ERROR: _load: Failed loading resource: res://Main.tscn
At: core/io/resource_loader.cpp:285.
ERROR: start: Failed loading scene: res://Main.tscn
At: main/main.cpp:1733.
Destruct gdnative interface
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:2089.
ERROR: clear: Resources Still in use at Exit!
At: core/resource.cpp:425.
Do you have a file Milkyway.png there? It seems to be missing according to the output
@beniwtv The main resource should be there:
george@UbuntuBox:~/godot_openvr_pr/demo$ find . -name "*Milkyway*"
./Milkyway.png.import
./Milkyway.png
though it looks like I'm lacking whatever res://.import/Milkyway.png-c8038416f38c889c516f7e41b5681a1a.stex
is.
ok, try deleting Milkyway.png.import and see if the editor imports it again
ok, try deleting Milkyway.png.import and see if the editor imports it again
The error persists. Strange.
I'm running Godot w/ARVR support on Ubuntu (19.04) + HTC Vive (generation 1). The crash pattern is:
Launch Godot w/o controller(s)
Turn on controller, generating the following console output (but Godot will keep running):
Click controller, causing the following crash:
The fuller gdb backtrace output is as follows:
Someone else on a project I'm working on (@KaneTW) inspected
libgodot_openvr
with debug symbols and found thatis what is crashing, so that this could be a bug with
libgodot_openvr
.Does anyone have any thoughts about how to fix this crash?