airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
206 stars 11 forks source link

[Windows] Camera.names cause app hang/crash with NVIDIA Broadcast without cameras #2018

Open itlancer opened 2 years ago

itlancer commented 2 years ago

Problem Description

Camera.names cause app hang/crash for Windows device without cameras with installed NVIDIA Broadcast (https://www.nvidia.com/en-us/geforce/broadcasting/broadcast-app/). This issue prevent to use Camera for any devices with NVIDIA Broadcast installed.

Tested with multiple AIR versions, even with latest AIR 33.1.1.889 with different 32-bit and 64-bit AIR applications. Same problem in all cases. It works fine with non-AIR applications that uses cameras. There is no such issue if device has at least one real camera (for example USB webcam).

Earlier AIR have some issues with cameras that were fixed: https://github.com/airsdk/Adobe-Runtime-Support/issues/988 https://github.com/airsdk/Adobe-Runtime-Support/issues/320 https://github.com/airsdk/Adobe-Runtime-Support/issues/53

Related issues (not the same): https://github.com/airsdk/Adobe-Runtime-Support/issues/906 https://github.com/airsdk/Adobe-Runtime-Support/issues/1959 https://github.com/airsdk/Adobe-Runtime-Support/issues/1926 https://github.com/airsdk/Adobe-Runtime-Support/issues/539

Steps to Reproduce

1) Launch code below with any Windows device. 2) Click anywhere on stage (it should trace connected cameras).

Application example with sources attached. camera_nvidia_broadcast_hang.zip

package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.media.Camera;
    import flash.events.MouseEvent;

    public class CameraNVIDIABroadcastHang extends Sprite {

        public function CameraNVIDIABroadcastHang() {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }

        private function init(e:Event):void {
            removeEventListener(Event.ADDED_TO_STAGE, init);

            stage.addEventListener(MouseEvent.CLICK, click);
        }

        private function click(e:MouseEvent):void {
            trace("cameras:", Camera.names);
        }
    }
}

Actual Result: Application hang without any errors in Scout or Windows Event Viewer.

Expected Result: You will see in traces cameras: Camera (NVIDIA Broadcast) (if NVIDIA Broadcast provide something that could work as a camera) or cameras: (if NVIDIA Broadcast doesn't provide anything that could work as a camera)

Known Workarounds

none

itlancer commented 1 year ago

Issue still exists with latest AIR 50.2.3.5. Tested with latest version NVIDIA Broadcast 1.4.0 and Windows 11 64-bit Home 22H2.