Skip to main content
Inspiring
Jan 28, 2019 6:42 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
Rohit Guglani
Rohit GuglaniCorrect answer
Participating Frequently
Feb 13, 2019 4:21 PM UTC

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

2 replies

Rohit Guglani
Rohit GuglaniCorrect answer
Participating Frequently
Feb 13, 2019 4:21 PM UTC

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

Translate
PippoAppsAuthor
Inspiring
Feb 14, 2019 4:19 PM UTC

Thank you very much! I confirm this is fixed.

Translate