Bug? possible unhandled exception in audio streamer library


Well-Known Member
Licensed User
Longtime User

I have published a small Phone Recorder App using the excellent audio streamer library.

And I have a rather strange behavior when another Phone recorder is installed (for example this one)

The first App to capture the stream is the "other" App
Mine is coming a little after when "shaking" the phone

At this exact time I execute these lines (found with debugger)

                ToastMessageShow("unable to access to audio stream", True)
            End Try

Due to probably a conflict to access the audio stream an exception is rized, I should thus catch the exception.
But instead the App crashes.

What I see in the debugger is :

LogCat connected to: B4A-Bridge: LGE Nexus 5-358240052381506
--------- beginning of /dev/log/main


The Phone State is: OFFHOOK
shake detected
java.lang.NegativeArraySizeException: -3
    at anywheresoftware.b4a.audio.AudioStreamer$Recorder.run(AudioStreamer.java:147)
    at java.lang.Thread.run(Thread.java:841)

I must say that I do not understand why my "try catch" block doesn't catch the exception...

Any idea please ?

Thank you