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

iOS app crashes if a NetStream is referenced by a class variable when app is brought to foreground #50

Closed
PippoApps opened this issue Jan 11, 2019 · 2 comments

Comments

@PippoApps
Copy link

PippoApps commented Jan 11, 2019

Problem Description

Bug on iOS, tried with air 27, 31 and 32 on iOS 9 and 12, same behaviour. Consistent 100% of times.
Just create a NetConnection and a NetStream.
If class has a variable referencing the NetStream, if app is brought to background and then to foreground, it crashes immediately. If NetStream is not referenced, app doesn't crash.
Crash log infact reports a null pointer.

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000

If I comment: "_ns = ns;" App doesn't crash.

Here is a video showing behvior on both iOS 8 and 12: https://drive.google.com/file/d/14I_41rQnUA2z4pv9Ra06-84Hf9rsiN0W/view

Note that app works perfectly and for a long time if not brought to background and back to foreground again. Crashes only when brought back to foreground.

Bug on Adobe tracker: https://tracker.adobe.com/#/view/AIR-4198784

Steps to Reproduce

Basically there is only this (nothing else, no dependancies):

private var _ns:NetStream; // (this is in class definition of course)
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
/* THIS IS THE CULPRIT. COMMENT "_ns = ns" AND APP WILL NOT CRASH */
_ns = ns;

Bring app to background pushing twice the iPad home button.
Click again on reduced app to bring it back to foreground.
App crashes. All the times.
If you comment: "_ns = ns" doesn't crash!

Simple source to reproduce is here: https://drive.google.com/file/d/1s92-Wv99dechTZgqRxNMpf-C1SabxBNh/view

Known Workarounds

No workarounds. NetStream is unusable if not referenced anywhere.
In starling it gets referenced at least when creating video texture, so there is no workaround.

@PippoApps
Copy link
Author

Just an update, I have been contacted by someone in AIR team and they are working actively on a fix. Hopefully next AIR release.

@PippoApps
Copy link
Author

Fixed in today's update!
AIR 32.0.0.103 doesn't crash anymore.

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