Bug? ERROR CONVERTING B64String to BYTE

Gianni Sassanelli

Active Member
Licensed User
Longtime User
I have this error when i try to convert a long b64string to byte
the error is the following
java.lang.OutOfMemoryError
at anywheresoftware.b4a.agraham.encryption.Base64.DecodeBtoB(Base64.java:330)
at anywheresoftware.b4a.agraham.encryption.Base64.DecodeStoB(Base64.java:355)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA$2.run(BA.java:328)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
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:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)

B4X:
    Dim B64 As Base64
    Dim by() As Byte
    by = B64.DecodeStoB(mapJOB.Get("fieldcontainsab64data"))
  'if lenght of mapJOB.Get("fieldcontainsab64data") is lover then 2MB is all right
  ' if my file greather than 2Mb i have error
  'any suggestion for resolve this?

thank's a lot

GOOD YEAR at all
 
Top