google / android-emulator-webrtc

Apache License 2.0
121 stars 27 forks source link

Touch events crashes Goldfish/Emulator #3

Closed danielmalmq closed 3 years ago

danielmalmq commented 3 years ago

Hey, I am currently trying to add touch event handling following an old issue: https://github.com/google/android-emulator-container-scripts/issues/113

However it seems to be broken in the latest stable and canary version (30.0.12 & 30.0.25) of Goldfish/QEMU as I get a crash as soon as I send even a simple touch event hooked in via onTouchStart for example:

        const protoTouch = new Proto.Touch();
        protoTouch.setX(50);
        protoTouch.setY(50);
        protoTouch.setIdentifier(0);
        protoTouch.setPressure(10);
        protoTouch.setTouchMajor(24);
        protoTouch.setTouchMinor(24);

        const requestTouchEvent = new Proto.TouchEvent();
        requestTouchEvent.setTouchesList([protoTouch]);
        const { jsep } = this.props;
        jsep.send('touch', requestTouchEvent);
pokowaka commented 3 years ago

Sorry for the late reply. Just noticed this issue. I can confirm that we crash and I'm investigating.

pokowaka commented 3 years ago

Fix is in:

https://android-review.googlesource.com/c/platform/external/qemu/+/1419132

It will likely hit canary next week.

danielmalmq commented 3 years ago

Nice thanks!

And awesome work with your entire container stack!