Android Question B4XTable problem in debugmode

Blueforcer

Well-Known Member
Licensed User
Longtime User
When i start my project in debug mode im getting this error. But it works on release.
i'm not doing anything in the table yet. Just loading the layout with the b4xTable in in.

B4X:
Error occurred on line: 121 (B4XTable)
java.lang.NullPointerException: Attempt to invoke virtual method 'void anywheresoftware.b4a.objects.B4XViewWrapper.setVisible(boolean)' on a null object reference
    at de.dinotec.netplus.b4xtable$ResumableSub_DesignerCreateView.resume(b4xtable.java:2502)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
    at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1748)
    at android.os.Handler.handleCallback(Handler.java:755)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6141)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
You didn't post your code. Please upload a sample project.
As already said, i only load my Layout. There is no code related to the B4Xtable.
According to the Stacktrace, the crash doesnt happen in my code nor is triggered by it.
I cannot recreate this issue in a empty project. Due NDA i cannot share my current project
 
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
Just because you don't know it doesn't mean that others don't understand the stacktrace better.
But even I can see that the “problem in the ResumableSub” is part of the library. And occurs when the designer wants to create the view.
I might use the same namespace for something etc. etc.
Maybe the developer of the lib can also say something about it, and maybe he also sees the possible cause in his code.

But we don't need to argue about that either. It's just the way it is, I can't give you any more information at the moment, except when smaller parts are requested that I might be able to contribute to debugging.
 
Last edited:
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
I dug a little deeper and deactivated the internal B4XTable lib and added the content of the b4xlib manually to my project.
Funnily enough, the project starts with this and also loads the layout correctly.
But I can't access the b4xtable object because it hasn't been initialized even the debugger pauses in the Initialize sub so its called.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Can you make a new project with the same issue to test?
 
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
Can you make a new project with the same issue to test?
Unfortunately not, even in my project I only load the layout which only contains the B4Xtable. Nothing more qich belongs to the B4Xtable lib.
And since my project currently contains 98 classes and tens of thousands of lines of code, it is difficult to find the error. I also don't know where to start looking. At least I would need this tip.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
I would start checking line 121 inside the B4XTable lib and verify if a variable name is involved and you have the same somewhere.
 
Upvote 0

Blueforcer

Well-Known Member
Licensed User
Longtime User
I would start checking line 121 inside the B4XTable lib and verify if a variable name is involved and you have the same somewhere.

So this is
SearchField.mBase.Visible = False
wich is a B4XFloatTextField
The name "SearchField" doesnt exist in my project anywhere else

I will continue my search on Monday.
First of all, thanks for your help. Have a nice weekend
 
Upvote 0
Top