B4J Question Stub Error

rdkartono

Member
Licensed User
Longtime User
Today I opening an old B4J App using B4J version 9.30

And running it, immediately showing Stub Error message:

Error Stub Error:
Waiting for debugger to connect...
Program started.

java.lang.RuntimeException: Stub!
    at org.json.JSONTokener.<init>(JSONTokener.java:24)
    at anywheresoftware.b4j.objects.collections.JSONParser.Initialize(JSONParser.java:58)
    at anywheresoftware.b4j.objects.MenuItemWrapper$MenuBarWrapper.parseMenusJson(MenuItemWrapper.java:275)
    at anywheresoftware.b4j.objects.MenuItemWrapper$MenuBarWrapper.build(MenuItemWrapper.java:263)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.DynamicBuilder.build(DynamicBuilder.java:33)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:142)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:228)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:101)
    at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:101)
    at gtc.qzaclient.main._appstart(main.java:450)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:96)
    at gtc.qzaclient.main.start(main.java:38)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:185)
    at java.lang.Thread.run(Thread.java:750)
OS Name : Windows 11
OS Architecture : amd64
OS Version : 10.0
JVM Name : Java HotSpot(TM) 64-Bit Server VM

While app running, Menubar object become "Error JSON Parsing" , and some buttons are missing.
Screenshot 2022-07-11 134652.jpg

Designer Look, Menubar showing normal
designer look.jpg

Menubar content JSON :
Menubar JSON:
[
    {Text: "Database", Children:
        [
            {Text: "Audio Input", Tag: "audioinputform"},
            {Text: "Audio Output", Tag: "audiooutputform"},
            {Text: "Zone Grouping", Tag: "zonegroupform"},
            {Text: "User Account", Tag: "accountform"}
        ]
    },
    {Text: "Functions", Children:
        [
            {Text: "Music Broadcast", Tag: "bgmform"},
            {Text: "Timer", Tag: "timerform"},
            {Text: "PC Paging", Tag: "pagingform"},
            {Text: "Recording / Monitoring", Tag: "recordform"},
            {Text: "Pre Recording Files", Tag: "prerecord"},
            {Text: "External Audio Controller", Tag: "externalinput"}
        ]
    },
    {Text: "Configuration", Children:
        [
            {Text: "Clear All Data", Tag: "configclear"},
            {Text: "Volume Control", Tag: "volcontrol"},
            //{Text: "Adjust Delay", Tag: "adjustdelay"},
            {Text: "Broadcast Setting", Tag: "broadcastsetting"}
            //{Text: "Get From Server", Tag: "configget"},
            //{Text: "Set To Server", Tag: "configset"},
            //{Text: "Export To File", Tag: "configexport"},
            //{Text: "Import From File", Tag: "configimport"}
        ]
    },
    {Text: "Other", Children:
        [
            {Text: "App Version", Tag: "appversion"},
            {Text: "Show Data Path", Tag: "datapath"},
            {Text: "Log", Tag: "logform"}
        ]
    }
]

Libraries used:
libraries.jpg

What might wrong ?
Please advice.
 

rdkartono

Member
Licensed User
Longtime User
Sorry for late reply.
Did upgrade to 9.80 this morning, yet errror still found

1658197986709.png


Libraries Used :
1658198064201.png



Error Stub:
Waiting for debugger to connect...
Program started.
java.lang.RuntimeException: Stub!
    at org.json.JSONTokener.<init>(JSONTokener.java:24)
    at anywheresoftware.b4j.objects.collections.JSONParser.Initialize(JSONParser.java:58)
    at anywheresoftware.b4j.objects.MenuItemWrapper$MenuBarWrapper.parseMenusJson(MenuItemWrapper.java:275)
    at anywheresoftware.b4j.objects.MenuItemWrapper$MenuBarWrapper.build(MenuItemWrapper.java:263)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.DynamicBuilder.build(DynamicBuilder.java:33)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:141)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:227)
    at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:100)
    at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:101)
    at gtc.qzaclient.main._appstart(main.java:450)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
    at gtc.qzaclient.main.start(main.java:38)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:185)
    at java.lang.Thread.run(Thread.java:750)
OS Name : Windows 11
OS Architecture : amd64
OS Version : 10.0
JVM Name : Java HotSpot(TM) 64-Bit Server VM
Java Lib path : C:\B4X Java\jdk1.8.0_321\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\B4X Java\jdk1.8.0_321\bin;C:\Python\Python39\Scripts\;C:\Python\Python39\;C:\Python\Python27\;C:\Python\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\CMake\bin;C:\ant\bin;c:\adb;C:\apache-maven-3.6.3\bin;C:\SLC\SimpleLibraryCompiler;C:\GnuWin32\bin;C:\StrawberryPerl\c\bin;C:\StrawberryPerl\perl\site\bin;C:\StrawberryPerl\perl\bin;C:\MinGW\bin;C:\Program Files\Oracle\VirtualBox;C:\webOS_Signage_SDK\CLI\bin;C:\Users\rdkartono\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\Tailscale IPN;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\B4X Java\jdk1.8.0_321\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\C;C:\Users\rdkartono\AppData\Local\Microsoft\WindowsApps;C:\Users\rdkartono\AppData\Local\Programs\Microsoft VS Code\bin;C:\webOS_Signage_SDK\CLI\bin;C:\Users\rdkartono\.dotnet\tools;C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.1\bin;;C:\Users\rdkartono\AppData\Roaming\npm;C:\Program Files\JetBrains\WebStorm 2021.1.1\bin;;C:\Users\rdkartono\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Users\rdkartono\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;;.
Path Separator : [;]
Run Directory : C:\Users\RDKART~1\DOCUME~1\B4JPRO~1\QZC061~1\QZAGUI~1\Objects
User Home : C:\Users\rdkartono
User Directory : C:\Users\RDKART~1\DOCUME~1\B4JPRO~1\QZC061~1\QZAGUI~1\Objects
Windows 64bit

Any hints ?
 
Upvote 0
Top