Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_hmd_driver has null pointer as driver_host, but gets dereferenced later #78

Open
ChristophHaag opened this issue Jul 6, 2016 · 2 comments

Comments

@ChristophHaag
Copy link

Description of issue

Second argument here

vr::EVRInitError error = tracker_driver->Init(&logger, nullptr, "", "");
is driver_host and a null pointer. It gets passed around a bit and then dereferenced here:
settings_ = std::make_unique<Settings>(driver_host->GetSettings(vr::IVRSettings_Version));

Program received signal SIGSEGV, Segmentation fault.
OSVRTrackedDevice::OSVRTrackedDevice (this=0x5555557b2400, context=..., driver_host=0x0, driver_log=0x0) at /home/chris/build/osvr-steamvr-git/src/osvr-steamvr/src/OSVRTrackedDevice.cpp:63
63          settings_ = std::make_unique<Settings>(driver_host->GetSettings(vr::IVRSettings_Version));
(gdb) bt full
#0  OSVRTrackedDevice::OSVRTrackedDevice (this=0x5555557b2400, context=..., driver_host=0x0, driver_log=0x0)
    at /home/chris/build/osvr-steamvr-git/src/osvr-steamvr/src/OSVRTrackedDevice.cpp:63
No locals.
#1  0x00007ffff7bd0f8a in std::make_unique<OSVRTrackedDevice, osvr::clientkit::ClientContext&, vr::IServerDriverHost*&> ()
    at /home/chris/build/osvr-steamvr-git/src/osvr-steamvr/vendor/libcxx/include/make_unique_impl.h:47
No locals.
#2  ServerDriver_OSVR::Init (this=0x7ffff7dd85c0 <g_ServerDriverOSVR>, driver_log=<optimized out>, driver_host=0x0, user_driver_config_dir=<optimized out>,
    driver_install_dir=<optimized out>) at /home/chris/build/osvr-steamvr-git/src/osvr-steamvr/src/ServerDriver_OSVR.cpp:52
No locals.
#3  0x00005555555554cd in main (argc=<optimized out>, argv=<optimized out>) at /home/chris/build/osvr-steamvr-git/src/osvr-steamvr/src/test_hmd_driver.cpp:81
        error = <optimized out>
        tracker_count = <optimized out>
        driver_init_return = 0
        tracker_driver = 0x7ffff7dd85c0 <g_ServerDriverOSVR>
        logger = {<vr::IDriverLog> = {_vptr.IDriverLog = 0x555555756d80 <vtable for Logger+16>}, <No data fields>}
@cjlong1213
Copy link

hi, I also met this problem. Anyone who had solved this?

@cjlong1213
Copy link

cjlong1213 commented Mar 20, 2017

@ChristophHaag hi, do you solve this issue? would you please share to me?tks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants