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

Exiting immersive mode programmatically can lock up the browser #27270

Closed
jdm opened this issue Jul 14, 2020 · 7 comments
Closed

Exiting immersive mode programmatically can lock up the browser #27270

jdm opened this issue Jul 14, 2020 · 7 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Jul 14, 2020

We had a report from a user that calling XrSession.end puts the browser into an unusable state after leaving immersive mode. We should try this out.

@jdm jdm added this to To do in HoloLens Jul 14, 2020
@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jul 20, 2020

Calling session.end() crashes. At least with the emulator.

I uncommented this to test: https://github.com/servo/servo.org/blob/6c70d85ef880c7b25bbae406ee31d0d334bbe2f4/hl-home/webxr-ar.js#L112

https://github.com/servo/openxrs/blob/30d3bd0beddede0a7c958589b77f1125ffd23c92/openxr/src/space.rs#L116

simpleservo.dll!openxr::space::{{impl}}::drop(openxr::space::Space * self) Line 234	Unknown
simpleservo.dll!core::ptr::drop_in_place<openxr::space::Space>(openxr::space::Space *) Line 184	Unknown
simpleservo.dll!core::ptr::drop_in_place<webxr::openxr::OpenXrDevice>(webxr::openxr::OpenXrDevice *) Line 184	Unknown
simpleservo.dll!core::ptr::drop_in_place<webxr_api::session::SessionThread<webxr::openxr::OpenXrDevice>>(webxr_api::session::SessionThread<webxr::openxr::OpenXrDevice> *) Line 184	Unknown
simpleservo.dll!webxr_api::session::{{impl}}::spawn::{{closure}}<webxr::surfman_layer_manager::SurfmanGL,webxr::openxr::OpenXrDevice,closure-1>(webxr_api::session::{{impl}}::spawn::closure-0) Line 504	Unknown
@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jul 20, 2020

@jdm can you reproduce with the device?

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jul 20, 2020

A crash doesn't lock up the browser, just restart it. So it looks like another type of issue.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 20, 2020

I see exceptions on the device and then the script thread panics when trying to communicate with the webgl thread.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 20, 2020

I do end up with a browser instance that is locked up, however.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 20, 2020

We get a panic in the surfman Surface destructor:

 	simpleservo.dll!surfman::platform::windows::angle::surface::{{impl}}::drop(surfman::platform::windows::angle::surface::Surface * self) Line 89	Unknown	Symbols loaded.
 	simpleservo.dll!core::ptr::drop_in_place<surfman::platform::windows::angle::surface::Surface>(surfman::platform::windows::angle::surface::Surface *) Line 184	Unknown	Symbols loaded.
 	simpleservo.dll!core::ptr::drop_in_place<surfman::platform::windows::angle::surface::SurfaceTexture>(surfman::platform::windows::angle::surface::SurfaceTexture *) Line 184	Unknown	Symbols loaded.
 	simpleservo.dll!core::ptr::drop_in_place<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>>(core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture> *) Line 184	Unknown	Symbols loaded.
 	simpleservo.dll!core::ptr::drop_in_place<slice<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>>>(mut slice<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>>*) Line 184	Unknown	Symbols loaded.
 	simpleservo.dll!alloc::vec::{{impl}}::drop<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>>(alloc::vec::Vec<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>> * self) Line 2426	Unknown	Symbols loaded.
 	simpleservo.dll!core::ptr::drop_in_place<alloc::vec::Vec<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>>>(alloc::vec::Vec<core::option::Option<surfman::platform::windows::angle::surface::SurfaceTexture>> *) Line 184	Unknown	Symbols loaded.
 	simpleservo.dll!core::ptr::drop_in_place<webxr::openxr::OpenXrLayer>(webxr::openxr::OpenXrLayer *) Line 184	Unknown	Symbols loaded.
 	simpleservo.dll!webxr::openxr::{{impl}}::destroy_layer(webxr::openxr::OpenXrLayerManager * self, surfman::platform::windows::angle::device::Device * device, webxr_api::layer::mut GLContexts<webxr::surfman_layer_manager::SurfmanGL>* contexts, webxr_api::layer::ContextId context_id, webxr_api::layer::LayerId layer_id) Line 580	Unknown	Symbols loaded.
>	simpleservo.dll!canvas::webgl_thread::WebXRBridge::destroy_layer(canvas_traits::webgl::WebXRLayerManagerId self, surfman::platform::windows::angle::device::Device * manager_id, webxr_api::layer::mut GLContexts<webxr::surfman_layer_manager::SurfmanGL>* device, webxr_api::layer::ContextId contexts, webxr_api::layer::LayerId context_id) Line 3218	Unknown	Symbols loaded.
 	simpleservo.dll!canvas::webgl_thread::WebGLThread::handle_webxr_command(canvas_traits::webgl::WebXRCommand self) Line 452	Unknown	Symbols loaded.
 	simpleservo.dll!canvas::webgl_thread::WebGLThread::handle_msg(canvas_traits::webgl::WebGLMsg self, canvas_traits::webgl_channel::WebGLChan * msg) Line 408	Unknown	Symbols loaded.
 	simpleservo.dll!canvas::webgl_thread::WebGLThread::process() Line 326	Unknown	Symbols loaded.
 	simpleservo.dll!canvas::webgl_thread::{{impl}}::run_on_own_thread::{{closure}}(canvas::webgl_thread::{{impl}}::run_on_own_thread::closure-0) Line 318	Unknown	Symbols loaded.
 	simpleservo.dll!std::sys_common::backtrace::__rust_begin_short_backtrace<closure-0,()>(canvas::webgl_thread::{{impl}}::run_on_own_thread::closure-0 f) Line 131	Unknown	Symbols loaded.
 	simpleservo.dll!std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-0,()>(std::thread::{{impl}}::spawn_unchecked::{{closure}}::closure-0) Line 476	Unknown	Symbols loaded.
 	simpleservo.dll!std::panic::{{impl}}::call_once<(),closure-0>(std::panic::AssertUnwindSafe<closure-0> self) Line 319	Unknown	Symbols loaded.
 	simpleservo.dll!std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,()>(unsigned char * data) Line 350	Unknown	Symbols loaded.
 	simpleservo.dll!_ZN3std9panicking3try8do_catch17hfe925d2c4cc976a2E�()	Unknown	Symbols loaded.
 	simpleservo.dll!std::panicking::try<(),std::panic::AssertUnwindSafe<closure-0>>(std::panic::AssertUnwindSafe<closure-0> f) Line 325	Unknown	Symbols loaded.
 	simpleservo.dll!std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,()>(std::panic::AssertUnwindSafe<closure-0> f) Line 394	Unknown	Symbols loaded.
 	simpleservo.dll!std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-0,()>(std::thread::{{impl}}::spawn_unchecked::closure-0) Line 474	Unknown	Symbols loaded.
 	simpleservo.dll!core::ops::function::FnOnce::call_once<closure-0,()>(std::thread::{{impl}}::spawn_unchecked::closure-0 *) Line 233	Unknown	Symbols loaded.
 	simpleservo.dll!_ZN3std3sys7windows6thread6Thread3new17h5ec4098bc2c5c4dcE�()	Unknown	Symbols loaded.
 	ntdll.dll!00007ffbb3169e18()	Unknown	No symbols loaded.
@jdm
Copy link
Member Author

@jdm jdm commented Jul 20, 2020

I submitted servo/webxr#186 which allows me to use the browser as expected after calling session.end().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
HoloLens
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.