Android Question AStream_Terminated creating an endless loop

sorex

Expert
Licensed User
Longtime User
Hello,

In some strange situations with disabling wifi and socket (re)creations in a listener app to a broadcaster app
the broadcaster ends up in and endless loop of the _terminated event when you don't use a senderAsyncStream.close in the event.

Is this by design or shouldn't this event only be called once?

Even when disabling the wifi on the listener side the events keep getting called.

I was checking a list of streams for the stream object existence to clean close everything but it never got that far as the list was already empty from manually disconecting.
That's why the .close didn't happen in that specific case.

Edit: The result is a total freeze of the app/ui when that happends.
 
Last edited:

sorex

Expert
Licensed User
Longtime User
this also happends on the _Error event

B4X:
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
07:58 BROA> 0 connections in list > Ignoring clean close connection by stream obj.
07:58 BROA> Stream error > forced close of stream obj anywheresoftware.b4a.randomaccessfile.AsyncStreams@a1a7270
 
Upvote 0
Top