Skip to main content
Inspiring
January 28, 2019
Answered

iOS app crashes when going to background if a NetStream is referenced.

  • January 28, 2019
  • 1 reply
  • 1020 views

Hello there,

this has ben testedby several people on several versions of AIR.

Source code here: https://tracker.adobe.com/api/jira/issue/AIR-4198784/attachment/3439791

On iOS, if a netstream is referenced to a variable, once the app goes to background, then crashes when brought to foreground again. It seems like a null pointer exception on iOS side. Apple console shows a null reference exception.

Just a few lines are enough to cause the bug:

  1. private var _ns:NetStream; // This is in class constructor
  2. var nc:NetConnection = new NetConnection(); 
  3. nc.connect(null); 
  4. var ns:NetStream = new NetStream(nc); 
  5. /* THIS IS THE CULPRIT. COMMENT "_ns = ns" AND APP WILL NOT CRASH */ 
  6. _ns = ns;  // If this is commented, app doesn't crash.

Just bring the app to background, then foreground again, and on iOS it will crash (all works fine on other platforms).

Cheers

This topic has been closed for replies.
Correct answer Rohit Guglani

Hello ,

We have done a AIR beta today, you can download it from Adobe AIR 32 Beta | application development - Adobe Labswhich contains the fix for this issue.

Regards,

Rohit

1 reply

Rohit Guglani
Adobe Employee
Rohit GuglaniCorrect answer
Adobe Employee
February 13, 2019

Hello ,

We have done a AIR beta today, you can download it from Adobe AIR 32 Beta | application development - Adobe Labswhich contains the fix for this issue.

Regards,

Rohit

PippoAppsAuthor
Inspiring
February 14, 2019

Thank you very much! I confirm this is fixed.