Hi All,
I created a system for the exchange of objects (lists) with the server developed with B4j.
If amount of objects bigger than 2mb, you get this error.
B4XSerializator use for data exchange.
Some advice to solve the problem?
thank you
Errors
java.lang.OutOfMemoryError: Failed to allocate a 28 byte allocation with 11 free bytes and 11B until OOM
at java.lang.String.<init>(String.java:233)
at java.lang.String.<init>(String.java:206)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:326)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:345)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readList(B4XSerializator.java:244)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:343)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:110)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.ReadB4XObject(RandomAccessFile.java:323)
at dev.meta.sb.cclientsync._readobject(cclientsync.java:278)
at dev.meta.sb.cclientsync._jobdone(cclientsync.java:204)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available
Errore: java.lang.Exception: java.lang.OutOfMemoryError: Failed to allocate a 28 byte allocation with 11 free bytes and 11B until OOM java.lang.OutOfMemoryError: Failed to allocate a 28 byte allocation with 11 free bytes and 11B until OOM
at java.lang.String.<init>(String.java:233)
at java.lang.String.<init>(String.java:206)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:326)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:345)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readList(B4XSerializator.java:244)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:343)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:110)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.ReadB4XObject(RandomAccessFile.java:323)
at dev.meta.sb.cclientsync._readobject(cclientsync.java:278)
at dev.meta.sb.cclientsync._jobdone(cclientsync.java:204)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
I created a system for the exchange of objects (lists) with the server developed with B4j.
If amount of objects bigger than 2mb, you get this error.
B4XSerializator use for data exchange.
Some advice to solve the problem?
thank you
Errors
java.lang.OutOfMemoryError: Failed to allocate a 28 byte allocation with 11 free bytes and 11B until OOM
at java.lang.String.<init>(String.java:233)
at java.lang.String.<init>(String.java:206)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:326)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:345)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readList(B4XSerializator.java:244)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:343)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:110)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.ReadB4XObject(RandomAccessFile.java:323)
at dev.meta.sb.cclientsync._readobject(cclientsync.java:278)
at dev.meta.sb.cclientsync._jobdone(cclientsync.java:204)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available
Errore: java.lang.Exception: java.lang.OutOfMemoryError: Failed to allocate a 28 byte allocation with 11 free bytes and 11B until OOM java.lang.OutOfMemoryError: Failed to allocate a 28 byte allocation with 11 free bytes and 11B until OOM
at java.lang.String.<init>(String.java:233)
at java.lang.String.<init>(String.java:206)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:326)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:345)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readList(B4XSerializator.java:244)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:343)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readMap(B4XSerializator.java:229)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:273)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:355)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:110)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.ReadB4XObject(RandomAccessFile.java:323)
at dev.meta.sb.cclientsync._readobject(cclientsync.java:278)
at dev.meta.sb.cclientsync._jobdone(cclientsync.java:204)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)