Bug? QR Reader that works only on the main page

Luciano Veneziano

Active Member
Licensed User
Longtime User
Hello everyone.
I wanted to use a page to read the QR code.
The application, created by the excellent LucaMs works perfectly if it is set as the main page.
Put it as a secondary page, (with the help of LucaMs) the app crashes brutally.
After a day of emails with LucaMs, whom I warmly thank for his patience, I'm starting this thread
the problem.

Compiler 12.0 with the updates recommended by Erel (the machine was formatted with win 10 if necessary
and contains only the B4A).


I attach the file that doesn't work, the log and the screenshot of the error screen (it doesn't change if I'm under debug)

Great stuff everyone.
1670179641478.png


Logger connesso a: Xiaomi Redmi 7
--------- beginning of crash
--------- beginning of system
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Error occurred on line: 142 (clsScannerPage)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1057)
at lm.qrtest.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1071)
at lm.qrtest.b4xpagesmanager._showpage(b4xpagesmanager.java:428)
at lm.qrtest.b4xpages._showpage(b4xpages.java:58)
at lm.qrtest.b4xmainpage._btnopenscanner_click(b4xmainpage.java:76)
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:146)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7161)
at android.view.View.performClickInternal(View.java:7138)
at android.view.View.access$3500(View.java:811)
at android.view.View$PerformClick.run(View.java:27419)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:221)
at android.app.ActivityThread.main(ActivityThread.java:7542)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
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)
... 25 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
... 26 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
at lm.qrtest.clsscannerpage._createdetector(clsscannerpage.java:182)
at lm.qrtest.clsscannerpage._b4xpage_created(clsscannerpage.java:93)
... 28 more
 

Attachments

  • QRTest.zip
    16.2 KB · Views: 67

Luciano Veneziano

Active Member
Licensed User
Longtime User
Hi all!
The solution is the one proposed by Erel
Thanks!!!
 
Top