Skip to main content
itlancer
Inspiring
May 6, 2015 10:01 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

8 replies

itlancer
itlancerAuthor
Inspiring
Mar 2, 2020 8:29 AM UTC

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

Translate
itlancer
itlancerAuthor
Inspiring
Feb 29, 2016 7:29 AM UTC

Problem still exists with AIR 21.0.0.128 beta.

Translate
chris.campbell
Legend
Feb 29, 2016 7:40 PM UTC

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

Thanks,
Chris

Translate
itlancer
itlancerAuthor
Inspiring
Mar 1, 2016 10:34 AM UTC

Hi, Chris.

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

Translate
itlancer
itlancerAuthor
Inspiring
May 31, 2015 8:36 AM UTC

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.

Translate