aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.51k stars 3.92k forks source link

Hololens fails to exitVR successfully #3881

Open rc1 opened 5 years ago

rc1 commented 5 years ago

Description:

Given I am using a Hololens in immersive mode,
When I leave the immersive mode,
Then the aframe stops rendering (the browser window only display a white background and not the scene).

The reason the rendering is stops is due to an error being thrown within a component's tick. I haven't been able to track down the component. This happens with a blank scene.

The error is as follows;

TypeError: Unable to get property 'pressed' of undefined or null reference at tick (eval code:65:5) at tick.value (https://server/aframe/aframe-master.js:73647:11) at render.value (https:/server/aframe/aframe-master.js:73695:31) at bound (https:/server/aframe/aframe-master.js:77038:7) at animationLoop (https://server/aframe/aframe-master.js:27442:4)

As an aside, it would be great if component and system ticks were wrapped within a try catch. The catch could log the error via console.error and provide information of which component was being rendered rather than throwing and stopping the rendering.

wmurphyrd commented 5 years ago

The pressed property name is used in tracked controls for gamepad button state. Does you still experience the issue if you don't enable your hololens gesture code?

rc1 commented 5 years ago

Yeah

On Sat, Dec 15, 2018, 18:46 Will Murphy <notifications@github.com wrote:

The pressed property name is used in tracked controls for gamepad button state. Does you still experience the issue if you don't enable your hololens gesture code?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aframevr/aframe/issues/3881#issuecomment-447589546, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKMAyYQFRaeGdNln5DMGebMf2ZQDCF6ks5u5UOOgaJpZM4Y2DQb .

dmarcos commented 5 years ago

@wmurphyrd Any recommendation on what we should do here?

wmurphyrd commented 5 years ago

@dmarcos starting work on a controller component for the hololens gesture. The odd thing hololens does that is probably causing the problem is it creates gamepad entries when detecting a gesture and then deletes the gamepad when the gesture ends. I'll find a way to work around it and include in the controller PR

3DataWill commented 5 years ago

@dmarcos are individual controller components going to be obsolete with WebXR/A-Frame 0.9?

dmarcos commented 5 years ago

@3DataWill No. WebXR is still evolving and will include a mechanism to identify individual controllers. https://github.com/immersive-web/webxr/pull/479

Thanks for helping with this.