Skip to main content
Participant
May 4, 2012
Question

NetStream.close() freezes in Android

  • May 4, 2012
  • 11 replies
  • 3315 views

Hi,

Randomly (not always), when I close NetStream, the entire app just freezes.

Even performing a NetConnection.close() causes freezes.

I do not see any errors (even in the debug mode) so I cannot tell more.

Sometimes even simply renewing the current NetStream to "new NetStream()" or disposing it causes a freeze.

I am sure all this attributes to releasing resources and message passing between the client and FMS which probably ends up in a deadlock somewhere.

I'm not ruling out the possibility that this could also be a problem because of a slow internet connection.

What's the work around for that?

Instead of close() (if it's buggy i.e.) are there other alternatives to stop listening or sending media over netstreams?

If this is indeed a bug, I know Adobe won't let us know of it but I hope this is solved in the next AIR Release for Android.

I'm testing this on an Android 4.0 (Galaxy Nexus).

I've yet to try this on 2.3 or 3.x. Will update as soon as I try them.

Any leads?

Thank you very much.

Savio.

This topic has been closed for replies.

11 replies

Kalvyn Rasquinha
Community Manager
Community Manager
July 18, 2012

Hi guys. If the freeze you are observing is because the traffic with the server does not stop when you call close(), it will be fixed in the next version of AIR 3.4. Take a look at this thread http://forums.adobe.com/message/4563418#4563418. This is the bug that was fixed - https://bugbase.adobe.com/index.cfm?event=bug&id=3070987. The internal bug will get marked as closed soon and that should propogate up to this one.

Thanks

Kalvyn

Participant
June 21, 2012

I think Air 3.3 seems to have solved the close problem.

But opens another problem.

NOW ... ns.play() doesn't work. Audio works. Video freezes to the first frame or jst black screen for some reason.

Inspiring
June 12, 2012

Hi,

This bug is confirmed by Adobe.

I'd like to ask everyone affected by this issue to take a minute

and vote for the following bug.  It currently has zero votes:

https://bugbase.adobe.com/index.cfm?event=bug&id=3190676

See notes for more details.

Philippe

Inspiring
May 15, 2012

Hi,

Same problem on Asus Transformer with ICS 4.0.3 and on Android Emulator with AIR 3.3 and AIR 3.2

Vote for this bug and/or add a note:

https://bugbase.adobe.com/index.cfm?event=bug&id=3190676

Philippe

savimontyAuthor
Participant
May 15, 2012

Hi,

I wanted to add.

I noticed this happens only when the app's on debug mode. If I install a release version, the issue sort of goes away.

I cannot yet ascertain this behavior, but I will make certain in a day or two when I tested that behavior enough.

If this is true, I'm assuming that the debug version is trying to send a message back to the debugger on the computer whenever onclose happens and fails there or jst goes into some loop.

Just my assumption.

But, I'll update this thread soon enough.

Savio.

Inspiring
May 15, 2012

I also had some issues with Android 4. I managed to solve them by using AIR 3.2. If the problem goes away with with a release version, are you packaging it with a captive runtime? That would explain why the release is fine and the debug is not. Debug versions use whatever AIR version is installed. Just a thought...

Known Participant
May 5, 2012

Have you tried NetStream.dispose() (instead of .close())? I can't see any difference but .dispose() is recommended.

savimontyAuthor
Participant
May 12, 2012

Dispose had the same issue.

I wanted to add one more thing. This is on ICS (Android 4.0).

I've not really tried it that much on 3.x or 2.3.x

I also wanted to add that I had to call play twice to get the peer video. The first time wouldn't work.

Something is definitely buggy with Air for Android 4.

Savio.