Hello,
I'm updating an old app hopefully to stabalize it a bit (seems to go in endless loop sometimes on newer phones).
It's build on async streams and while I used a several try/catch blocks to intercept errors I'm trying to do it in a more clean way.
Now I noticed that the async stream _error function sometimes recieves a null object which makes my connection closing routine freak out on the .isInitilized check.
What's the right way to detect this null object so that I can skip the closing sub?
And why does it pass this null object and not the actual streaming one?
I'm updating an old app hopefully to stabalize it a bit (seems to go in endless loop sometimes on newer phones).
It's build on async streams and while I used a several try/catch blocks to intercept errors I'm trying to do it in a more clean way.
Now I noticed that the async stream _error function sometimes recieves a null object which makes my connection closing routine freak out on the .isInitilized check.
error:
05/03/2024 11:18:46 : 192.168.11.5 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean anywheresoftware.b4a.randomaccessfile.AsyncStreams.IsInitialized()' on a null object reference ( java.lang.NullPointerException: Attempt to invoke virtual method 'boolean anywheresoftware.b4a.randomaccessfile.AsyncStreams.IsInitialized()' on a null object reference
What's the right way to detect this null object so that I can skip the closing sub?
And why does it pass this null object and not the actual streaming one?