Bug? cursor1.GetBlob("pic").length is missing

Alexander Stolte

Expert
Licensed User
Longtime User
Hello,

for example:
B4X:
log(cursor1.GetBlob("pic").length)
the ".length" is not displayed in the preview and if I want to print this through the log, then this error comes:
B4X:
Error occurred on line: 2344 (Main2)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
    at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:621)
    at anywheresoftware.b4a.shell.Shell.getField(Shell.java:700)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:369)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA$2.run(BA.java:365)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6753)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 

mcqueccu

Well-Known Member
Licensed User
Longtime User
Create a Variable to receive the result then check the length.


B4X:
Dim pic as string
pic = cursor1.GetBlob("pic")
log(pic.length)
 
Top