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 when brought to foreground #1050

Closed
PippoApps opened this issue Jan 10, 2019 · 4 comments
Closed

iOS app crashes when brought to foreground #1050

PippoApps opened this issue Jan 10, 2019 · 4 comments

Comments

@PippoApps
Copy link

PippoApps commented Jan 10, 2019

Hello folks,
On iOS app works fine, can be used over and over with stable memory and great performance.
BUT if I play a video using Texture.fromNetStream(), or I do any other intense activity, even though the video has finished playing, texture disposed, NetStream and NetConnection closed and disposed, bringing the app back to foreground makes it crash. Doesn't matter how long earlier I played the video, app still crashes. Even just after navigating a few sections, going back to foreground makes it crash.
Consistently with:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Any idea?
Cheers

@PippoApps PippoApps reopened this Jan 10, 2019
@PippoApps PippoApps changed the title iOS app crashes when brought to foreground, only if a video Texture.fromNetStream() has been played iOS app crashes when brought to foreground Jan 10, 2019
@PippoApps PippoApps reopened this Jan 10, 2019
@PrimaryFeather
Copy link
Contributor

Does it happen only with the video, or even without? (As you wrote 'any other intense activity'.)
Are you using any ANEs?

@PippoApps
Copy link
Author

PippoApps commented Jan 12, 2019

No ANEs. I managed to narrow this to a very simple test. Tried with AIR 27, 31 and 32 on both iOS 9 and 12.
It is a NetStream problem, not related to Starling. Consistently, if a new NetStream is referenced, on iOS app crashes once brought to foreground again.
Basically:

private var _ns:NetStream; // This is of course in class constructor
var c:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream();
// All fine so far, just add next line:
_ns = ns; // This creates the crash. If this is omitted, no crash.

You can imagine how long it took me to narrow this down :D

I have created an app with just this, and the crash happens consistently. On both Apple devices, compiling on different machines. Comment _ns = ns, and it doesn't crash. Preatty weird right?

It is something related to reference not kept when the app is restored. Infact the error seems to be a null pointer reference.

If you want to give it a go, source code for the app is here (it's only a main class with about 10 lines of code, including creation of an output textfield): https://drive.google.com/open?id=1s92-Wv99dechTZgqRxNMpf-C1SabxBNh

Actually would be great if someone else tested this. I filed a bug also on Gamua's and Adobe's tracker.

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

@PrimaryFeather
Copy link
Contributor

I can reproduce the problem!

You can imagine how long it took me to narrow this down :D

Oh yeah, I can imagine ...! Thanks a lot for biting the bullet and getting to the root of this! Let's hope Adobe can fix it quickly.

@PrimaryFeather
Copy link
Contributor

PrimaryFeather commented Mar 8, 2019

Since Adobe apparently fixed this, I'll close this issue! Thanks to everyone involved.

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