Android Question KeyValueStore v2.30 Error

TimN

Member
Licensed User
Longtime User
I am receiving this error. I have been using the KVS library with great success until today.

This error occurs when on this line of my code:

B4X:
Starter.KVS.Put("lstProduction", lstProduction)

Is the list getting too large?

B4X:
java.lang.StackOverflowError: stack size 8MB
    at java.util.zip.Deflater.deflate(Deflater.java:442)
    at java.util.zip.Deflater.deflate(Deflater.java:368)
    at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:254)
    at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:212)
    at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:189)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeByte(B4XSerializator.java:153)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:213)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:255)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeMap(B4XSerializator.java:256)
    at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
 

TimN

Member
Licensed User
Longtime User
I never worked with Serializing but the below code returns: 36034

If this is too large, what are other options?

B4X:
Dim data() As Byte
Dim ser As B4XSerializator
data = ser.ConvertObjectToBytes(lstProduction)
Log(data.Length)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…