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

Looping VideoTexture Causing AIR to Crash #16

Closed
esidegallery opened this issue Aug 25, 2017 · 6 comments
Closed

Looping VideoTexture Causing AIR to Crash #16

esidegallery opened this issue Aug 25, 2017 · 6 comments

Comments

@esidegallery
Copy link

esidegallery commented Aug 25, 2017

Problem Description

A VideoTexture set to loop indefinitely, in this case via a seek operation on 'NetStream.Play.Complete' status, will eventually cause the running application to crash.

  • AIR SDK used: 26.0
  • Environment: AIR for Windows (Captive runtime and otherwise). Windows 7, 8 & 10; 32-bit & 64-bit confirmed.
  • Adobe Bug Tracker Issue

The issue is discussed in this Starling thread and is reproducable by at least 4 other users on the thread.

Steps to Reproduce

  1. Create an application that plays a video from a local file using VideoTexture
  2. Cause the video to loop e.g. by listening for the "NetStream.Play.Complete" play status and calling seek(0)
  3. Run the app. Usually within 15 hours, it will have crashed.

Here is a minimal application that exhibits the problem. This zip file can be imported directly into Flash Builder.

Here are compiled versions of the above app that can be run straight away:

To minimise dependencies, and to rule out framework bugs, this app does not use Starling, but the same behaviour is exhibited when Starling is used.

More Info

Known Workarounds

For some, using the appentBytes method on an embedded FLV can prevent (or perhaps postpone) the crash, which suggests it could be a file pointer issue. However, for others this method still eventually causes a crash. This workaround is not suitable for all applications however and has been found to exhibit a different bug.

@PrimaryFeather
Copy link
Contributor

Thanks a lot for the excellent (i.e. very detailed) report!

@rquinones84
Copy link

I fixed it by changing my video player flow to:
Create a "VideoManager" class.
Add function "InstantiateVideo" where you create instance of "VideoPlayer" class and its Texture.
Add a "VideoEnd" Event Listener in "VideoManager" class attached to "VideoPlayer" class.
Assign a video file and play till the end.
On video Finished, Clear the stream and send "VideoEnd" event.
From the "VideoManager" class function tied to "VideoEnd" Tell the "VideoPlayer" class to delete its texture, null reference to video file, and then null the "VideoPlayer" class instance reference from "VideoManager".
Add 5 second timer here.
Then call "InstantiateVideo".

This is deployed in the field and has up time of over 2 weeks since we last checked, with no memory leak.

@esidegallery
Copy link
Author

Nice one @rquinones84! Will try what you have suggested soon. If this really fixes the issue I will be very happy indeed!

@itlancer
Copy link

For me this issue finally fixed with AIR 32.0.0.83 beta. Thanks for Adobe!

@PrimaryFeather
Copy link
Contributor

That's great news! Can anyone else who experienced this run a test? Then we could safely close this issue for good.

From me, as well, a big thanks to Adobe for finally tackling this!

@esidegallery
Copy link
Author

I'll set up a test machine and let you know! I can confirm that the related Issue #17 appears fixed. Was able to run three days straight without freezing. Fingers crossed for this one too!

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

4 participants