Android Question code module is null?

leitor79

Active Member
Licensed User
Longtime User
Hi,

Is this OK?
sshot-853.png

"Config" is a code module. Why is null? That line gives me the following exception:

java.lang.Exception: java.lang.reflect.InvocationTargetException

Besides, the exception is not intercepted in the catch shown in the image, but in the catch block of the ActualizarSinLeer caller.

This code block is part of a class.


Regards,
 

leitor79

Active Member
Licensed User
Longtime User
Hi Erel, Hi Eme, thanks for your answer.
This is the full error:

Error occurred on line: 377 (clsConversacion)
java.lang.NullPointerException
at anywheresoftware.b4a.debug.RDebugUtils.setLastException(RDebugUtils.java:17)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:742)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:265)
at eitorteam.privapp.config._mensajerecibido(config.java:665)
at eitorteam.privapp.starter._objmqtt_messagearrived(starter.java:400)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA$2.run(BA.java:328)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)

And this is the code of GetSQL:

B4X:
Public Sub GetSQL() As SQL
   
    Dim rSQL As SQL
   
    Try
       
        If oSQL=Null Or oSQL.IsInitialized=False Then
            oSQL.Initialize(File.DirInternal, "dbfile", False)
        End If
               
        rSQL=oSQL

    Catch
        Log("Config - GetSQL - " & LastException.Message)
    End Try

    Return rSQL
   
End Sub

oSQL is declared as Public oSQL As SQL at module's Process_Globals.

Thank you very much!
 
Upvote 0

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
oSQL is declared as Public oSQL As SQL at module's Process_Globals.

Hi,

oSQL is Public? But you are declaring oSQL again.
See the image of the first post. Just below m.put ("...

Sorry if this is not the case.
 
Upvote 0
Top