Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Application crash on fast application exit with AIR 33 and StageVideo with some videos playback #250

Closed
itlancer opened this issue Mar 2, 2020 · 1 comment

Comments

@itlancer
Copy link

itlancer commented Mar 2, 2020

Problem Description

Application crashes on fast application exit with AIR 33 and StageVideo with some videos playback by Windows devices. You can reproduce it via NativeApplication.nativeApplication.exit() or by closing via Alt+F4 just after application start.

It has been tested with latests AIR 33.0.2.338 and AIR 33.1.0.50 with many different Windows devices.
Same problem in all cases with some videos.
I have reproduce it with video file from issue #88

It works fine with AIR 32.0.0.89 and below.
There is no such crash with macOS and AIR 33.1.0.50.
NetStream::useHardwareDecoder=false doesn't help. Video doesn't work at all because of that: #155

Related issues (not the same):
#224
#211
#155
#139
#98
#89
#88
#80

Steps to Reproduce

Launch code below with Windows devices.

Application example with sources and example of video attached.
stagevideo_close_crash.zip

package {
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.NetConnection;
	import flash.net.NetStream;
	import flash.media.StageVideo;
	import flash.geom.Rectangle;
	import flash.events.NetStatusEvent;
	import flash.desktop.NativeApplication;
	
	public class StageVideoCloseCrash extends Sprite {
		private var nc:NetConnection;
		private var ns:NetStream;
		
		public function StageVideoCloseCrash() {
			addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			nc = new NetConnection();
			nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
			nc.connect(null);
		}
		
		private function netStatusHandler(event:NetStatusEvent):void {
			trace(event.info.code);
			switch (event.info.code){
				case "NetConnection.Connect.Success":
					ns = new NetStream(nc);
					ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
					ns.client = {onMetaData:getMeta, onPlayStatus:onPlayStatus};
					var sv:StageVideo = stage.stageVideos[0];
					sv.viewPort = new Rectangle(0,0, 1280, 800);
					sv.attachNetStream(ns);
					ns.play("video.mp4");
					break;
				case "NetStream.Play.StreamNotFound":
					trace("Stream not found");
					break;
				case "NetStream.Buffer.Full":
					NativeApplication.nativeApplication.exit();//This line cause crash. If crash doesn't reproduced then comment this line and close application by Alt+F4 just after start to reproduce it.
					break;
				default:
					break;
			}
		}
		
		private function getMeta(mdata:Object):void { }
		
		private function onPlayStatus(infoObject:Object):void { }
	}
}

Actual Result:
Application crash.

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	adl.exe
  Application Version:	33.1.0.50
  Application Timestamp:	5e4e2cf2
  Fault Module Name:	Adobe AIR.dll
  Fault Module Version:	33.1.0.50
  Fault Module Timestamp:	5e4e3637
  Exception Code:	c0000005
  Exception Offset:	0054951a
  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

or

Faulting application name: stagevideo_close_crash.exe, version: 0.0.0.0, time stamp: 0x5e4e2de8
Faulting module name: ntdll.dll, version: 10.0.14393.3503, time stamp: 0x5e344dc4
Exception code: 0xc0000409
Fault offset: 0x000834d0
Faulting process id: 0xd0c
Faulting application start time: 0x01d5f069d30a8518
Faulting application path: C:\stagevideo_close_crash.app\stagevideo_close_crash.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 1765782b-fac6-460d-93a4-5dd4aabf8609

Expected Result:
Application correctly exit without crashes.

Known Workarounds

none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants