Android Question AudioStreamer v 1.63 Error Upon initialization: java.lang.NegativeArraySizeException: -2

Isa Paine

Member
Licensed User
Longtime User
Within the Activity_Create event here is the code to initialize the AudioStreamer:

B4X:
If FirstTime Then
        streamer.Initialize("streamer", 44100, False, 16, streamer.VOLUME_MUSIC)
        buffers.Initialize
        timer1.Initialize("timer1", 1)
        timer1.Enabled = False
End If

I don't know why I'm getting the following error upon Initialization.

I'm using the Emulator, Android 4.2.2 - API Level 17, Intel Atom (x86)

B4X:
LogCat connected to: emulator-5554
** Activity (main) Create, isFirst = true **


android.database.sqlite.SQLiteException: table Item already exists (code 1): , while compiling: CREATE TABLE Item (ItemName TEXT, TargetTemperature INTEGER, TemperatureRange TEXT , Duration INTEGER, DurationUOM TEXT, TemperatureUOM TEXT, Meridiem TEXT, PRIMARY KEY(ItemName, Meridiem))
android.database.sqlite.SQLiteException: table Manager already exists (code 1): , while compiling: CREATE TABLE Manager (Name TEXT, PRIMARY KEY(Name))
android.database.sqlite.SQLiteException: table ItemTransaction already exists (code 1): , while compiling: CREATE TABLE ItemTransaction (TransactionDateTime INTEGER, ItemName TEXT, TargetTemperature INTEGER, TemperatureMeasured INTEGER, TemperatureRange INTEGER, TargetDuration INTEGER, DurationUOM TEXT, TemperatureUOM TEXT, Meridiem TEXT, Manager1 TEXT, Manager2 TEXT, PRIMARY KEY(TransactionDateTime, ItemName))


(Main, 97) FullScreen or IncludeTitle properties in layout file do not match the activity attributes settings. (warning #1004)


java.lang.NegativeArraySizeException: -2


    at anywheresoftware.b4a.audio.AudioStreamer.Initialize2(AudioStreamer.java:77)
    at anywheresoftware.b4a.audio.AudioStreamer.Initialize(AudioStreamer.java:65)
    at b4a.iTemp.main._activity_create(main.java:419)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at b4a.iTemp.main.afterFirstLayout(main.java:98)
    at b4a.iTemp.main.access$100(main.java:16)
    at b4a.iTemp.main$WaitForLayout.run(main.java:76)
    at android.os.Handler.handleCallback(Handler.java:725)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5039)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Create, isFirst = true **


java.lang.NegativeArraySizeException: -2


    at anywheresoftware.b4a.audio.AudioStreamer.Initialize2(AudioStreamer.java:77)
    at anywheresoftware.b4a.audio.AudioStreamer.Initialize(AudioStreamer.java:65)
    at b4a.example.main._activity_create(main.java:330)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at b4a.example.main.afterFirstLayout(main.java:98)
    at b4a.example.main.access$100(main.java:16)
    at b4a.example.main$WaitForLayout.run(main.java:76)
    at android.os.Handler.handleCallback(Handler.java:725)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5039)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)


    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    at dalvik.system.NativeStart.main(Native Method)
java.lang.NegativeArraySizeException: -2


** Activity (main) Pause, UserClosed = true **
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…