Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
[Linux] `NativeWindow` creation cause crash without adl in some cases
Problem Description
NativeWindow
creation cause crash without adl usage in some cases for some Linux devices.
I can reproduce it with making main window visible, turn it to fullscreen and launching Worker
before. Sample below. Happens in 25-50% of launches.
Reproduced with AIR 50.2.4.5 with multiple different Ubuntu 22.04.1 LTS x86_64 devices with different applications. Cannot test with AIR 50.2.5.1 because of https://github.com/airsdk/Adobe-Runtime-Support/issues/3195 There is no such issue when launch app via adl. Crash happens only with bundled application. There is no such issue with Ubuntu 20.10 x86_64 devices. There is no such issue using 51.0.0.4 (but in 5-10% cases there is another crash, see below). There is no such issue with Windows.
Related issues: https://github.com/airsdk/Adobe-Runtime-Support/issues/3166 https://github.com/airsdk/Adobe-Runtime-Support/issues/3195 https://github.com/airsdk/Adobe-Runtime-Support/issues/2523 https://github.com/airsdk/Adobe-Runtime-Support/issues/2548
Steps to Reproduce
Package application with code below (as bundled app, without adl!), launch on any Ubuntu 22.04.1 LTS x86_64 device and click anywhere on stage.
Application example with sources and crash logs attached. linux_create_nativewindow_crash.zip
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.NativeWindowInitOptions;
import flash.display.NativeWindow;
import flash.display.StageDisplayState;
import flash.system.Worker;
import flash.system.WorkerDomain;
public class LinuxCreateNativeWindowCrash extends Sprite {
public function LinuxCreateNativeWindowCrash() {
if (Worker.current.isPrimordial) {
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
} else {
trace("worker");
}
}
private function addedToStage(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
var window:NativeWindow = stage.nativeWindow;
window.visible = true;
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
var worker:Worker = WorkerDomain.current.createWorker(this.loaderInfo.bytes);
worker.start();
stage.addEventListener(MouseEvent.CLICK, click);
}
private function click(e:MouseEvent):void {
trace("click");
var windowOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
new NativeWindow(windowOptions);//This line cause crash
}
}
}
Actual Result:
With AIR 50.2.4.5 application crash in 25-50% of launches (full crash log crash_50.2.4.5.log
in zip archive above):
(linux_create_nativewindow_crash:31161): GLib-CRITICAL **: 22:11:08.737: Source ID 15 was not found when attempting to remove it
Application crashed with an unhandled SIGSEGV
With AIR 51.0.0.4 application crash in 5-10% of launches just after start (without click) (full crash log crash_51.0.0.4.log
in zip archive above):
(linux_create_nativewindow_crash:31254): GLib-CRITICAL **: 22:12:22.705: Source ID 15 was not found when attempting to remove it
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
linux_create_nativewindow_crash: ../../src/xcb_io.c:175: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Application crashed with an unhandled SIGABRT
Expected Result:
NativeWindow
will be created (without activation) without crash.
Known Workarounds
none