Android Question Strange behaviour when running in debug mode - Wobble Menu

pliroforikos

Active Member
Licensed User
Hello,
I'm using Wobble menu and i have a strange situation when trying to run to debug mode. Program breaks and show the message:

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 77 (B4XMainPage)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1055)
at b4a.eParousiesParents.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1065)
at b4a.eParousiesParents.b4xpagesmanager._showpage(b4xpagesmanager.java:422)
at b4a.eParousiesParents.b4xpagesmanager._addpage(b4xpagesmanager.java:250)
at b4a.eParousiesParents.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:264)
at b4a.eParousiesParents.b4xpagesmanager._initialize(b4xpagesmanager.java:170)
at b4a.eParousiesParents.main._activity_create(main.java:423)
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:144)
at b4a.eParousiesParents.main.afterFirstLayout(main.java:105)
at b4a.eParousiesParents.main.access$000(main.java:17)
at b4a.eParousiesParents.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
... 24 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
... 25 more
Caused by: java.lang.RuntimeException: Class instance was not initialized (wobblemenu)
at anywheresoftware.b4a.debug.Debug.shouldDelegate(Debug.java:242)
at b4a.eParousiesParents.wobblemenu._settabtexticon(wobblemenu.java:107)
at b4a.eParousiesParents.b4xmainpage._createmenu(b4xmainpage.java:166)
at b4a.eParousiesParents.b4xmainpage._b4xpage_created(b4xmainpage.java:119)
... 27 more
** Activity (main) Resume **

Also there are no problems when i'm running in release mode. I recreated the menu from designer and write again the code without any success.
Any idea please?

B4X:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Public  WobbleMenu1 As WobbleMenu
    'B4xPages
    Public pg1 As B4XPage1
    Public pg2 As B4XPage2
    Public pgSettings As B4XPageSettings
End Sub

Public Sub Initialize

End Sub


'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    
    pgSettings.Initialize
    B4XPages.AddPage("pgSettings", pgSettings)
    
    pg1.Initialize
    B4XPages.AddPageAndCreate("pg1", pg1)
    pg2.Initialize
    B4XPages.AddPageAndCreate("pg2", pg2)
    createMenu
End Sub

' ******************** Wobble Menu *****************************************
Private Sub createMenu()
    WobbleMenu1.SetTabTextIcon(1,"Πρόγραμμα",Chr(0xF009),Typeface.FONTAWESOME)
    WobbleMenu1.SetTabTextIcon(2,"Παρουσίες",Chr(0xF0CA),Typeface.FONTAWESOME)
    WobbleMenu1.SetTabTextIcon(3,"Οικονομικά",Chr(0xF0EC),Typeface.FONTAWESOME)
End Sub

Sub WobbleMenu1_Tab1Click
End Sub

Sub WobbleMenu1_Tab2Click
    WobbleMenu1.SetCurrentTab(2)
    B4XPages.ShowPageAndRemovePreviousPages("pg1")
End Sub

Sub WobbleMenu1_Tab3Click
    WobbleMenu1.SetCurrentTab(3)
    B4XPages.ShowPageAndRemovePreviousPages("pg2")
End Sub
' ******************** Wobble Menu Ends Here***********************************
 
Top