Skip to main content
itlancer
Inspiring
May 6, 2015
Question

[Android] Read "position" property of the async opened FileStream after writing data from Socket cause application crash

  • May 6, 2015
  • 3 replies
  • 1670 views

Here is the bugbase ticked: Bug#3982883 - [Android] Read "position" property of the async opened FileStream after writing data from Socket cause app…

Read "position" property of the async opened FileStream after writing data from Socket cause application crash.

It has been tested with AIR 14.0.0.178, AIR 16, AIR 17.0.0.144 and AIR 18.0.0.109 beta with Android 4.4.2 and Android 5.0.2 with different devices. Same problem in all cases. That works fine with Windows.

Steps to Reproduce:

1) Open file for writing via openAsync method.

2) Receive data from socket connection (as a client via Socket ProgressEvent.SOCKET_DATA event) and read it to temp ByteArray.

3) Write temp ByteArray to opened file.

4) Read FileStream "position" property (trace it, for example). There will be application crash.

I'd like to ask everyone affected by this issue to take a minute and vote for the following bug.

Thanks.

This topic has been closed for replies.

3 replies

itlancer
itlancerAuthor
Inspiring
March 2, 2020

With latest AIR 33.1.0.50 it works fine for Android and iOS.

itlancer
itlancerAuthor
Inspiring
February 29, 2016

Problem still exists with AIR 21.0.0.128 beta.

chris.campbell
Community Manager
Community Manager
February 29, 2016

I'm asking the team to take a look, does this still occur with the 21.0.0.150 beta?

Thanks,
Chris

itlancer
itlancerAuthor
Inspiring
March 1, 2016

Hi, Chris.

It works a little bit better with latest AIR 21.0.0.150 beta, but it still crashes.

itlancer
itlancerAuthor
Inspiring
May 31, 2015

The same problem if you try to call addEventListener or close methods instead of read FileStream position.
So, async opened FileStream with writing bytes from Socket completely unusable with Android.
Please fix it ASAP.