You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you set StageWebView::stage property to null (stageWebView.stage = null) and then set StageWebView instance to null (stageWebView = null) it cause application crash with MSHTML.dll Application Error with Windows devices.
Sometimes it couldn't be reproducible 100%, just try again.
I think it could be Garbage Collection problem or something like that.
Also this issue causes big problems for high load applications with many StageWebView instances (only 1 displaying in one moment).
Tested with multiple AIR versions even with latests AIR 32.0.0.89, AIR 32.0.0.144 beta and AIR 33.0.2.338 with multiple Windows devices with different OS versions with 32-bit and 64-bit AIR applications with captive runtime.
Same problem in all cases.
It works fine with macOS, Android and iOS.
package {
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.Sprite;
import flash.events.Event;
import flash.media.StageWebView;
import flash.geom.Rectangle;
public class StageWebViewStageCrash extends Sprite {
private var stageWebView:StageWebView;
public function StageWebViewStageCrash() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
stageWebView = new StageWebView(true);
stageWebView.loadURL("https://airsdk.harman.com/");
stageWebView.viewPort = new Rectangle(100, 100, 640, 480);
stageWebView.stage = stage;
var timer:Timer = new Timer(3000, 1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, timeout);
timer.start();
}
private function timeout(e:TimerEvent):void {
stageWebView.stop();
//stageWebView.dispose();//Workaround: use this line instead of line below
stageWebView.stage = null;//This line cause crash
stageWebView = null;
}
}
}
Actual Result:
Application crashes with MSHTML.dll Application Error:
Problem signature:
Problem Event Name: APPCRASH
Faulting application name: adl.exe
version: 33.0.2.338
time stamp: 5dec5530
Faulting module name: MSHTML.dll
version: 11.0.9600.17239
time stamp: 53d26078
Exception code: c0000005
Fault offset: 0045b406
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1049
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: d1d9
Additional Information 4: d1d94a13d3609d6b740644c12508f581
Expected Result: StageWebView correctly removed from stage without crashes.
It works better with latest AIR versions (less crashes) with packaged application and happens in complex cases (not isolated sample).
But with isolated sample crash still reproducible by launching for test with Adobe Animate and even using <UseWebView2>true</UseWebView2>.
Problem Description
When you set
StageWebView::stage
property to null (stageWebView.stage = null
) and then setStageWebView
instance tonull
(stageWebView = null
) it cause application crash with MSHTML.dll Application Error with Windows devices.Sometimes it couldn't be reproducible 100%, just try again.
I think it could be Garbage Collection problem or something like that.
Also this issue causes big problems for high load applications with many
StageWebView
instances (only 1 displaying in one moment).Tested with multiple AIR versions even with latests AIR 32.0.0.89, AIR 32.0.0.144 beta and AIR 33.0.2.338 with multiple Windows devices with different OS versions with 32-bit and 64-bit AIR applications with captive runtime.
Same problem in all cases.
It works fine with macOS, Android and iOS.
Related issues:
https://tracker.adobe.com/#/view/AIR-3915039
https://forum.starling-framework.org/d/15593-windows-stagewebviewstagenull-cause-crash
https://community.adobe.com/t5/air/windows-setting-stagewebview-instance-to-null-after-stagewebview-stage-null-cause-crash/td-p/6774486
Steps to Reproduce
Launch code belowand wait 3 seconds (
stage
property ofStageWebView
will be set tonull
andStageWebView
instance nulled).Application example with sources attached.
stagewebview_stage_crash.zip
Actual Result:
Application crashes with MSHTML.dll Application Error:
Expected Result:
StageWebView
correctly removed from stage without crashes.Known Workarounds
Workaround (with Josh Tynjala help):
https://forum.starling-framework.org/topic/windows-stagewebviewstagenull-cause-crash?replies=4#post-114036
Use
stageWebView.dispose()
instead ofstageWebView.stage=null
.The text was updated successfully, but these errors were encountered: