Bug in RerunDesignerScript

MaxApps

Active Member
Licensed User
Longtime User
Hi

It looks like there is a bug in RerunDesignerScript.
I had a script, that was running without any problems.
But then I deleted a button, removed it from the script and then I started getting an error message, saying :

java.lang.runtimeexeption btnXXX was not found

But I have removed it completely - from script, design and main code.

Any ideas?

Kind regards
Jakob
 

MaxApps

Active Member
Licensed User
Longtime User
Version 2.22
Can I send the project to your email or another NON-puclic way? (35Mb)
Its a full commercial project, that I was updating.

Kind regards
Jakob
 

MaxApps

Active Member
Licensed User
Longtime User
Hi Erel

I have checked the script and cannot find references, to the button, that I removed.
I have made sure, that everything is dim´ed - I have generated members and made sure, that ALL is selected.

I have Cleaned the project several times
I have deleted the whole Objects folder.
I have saved the layout file with a new name.
I have removed the layout with the old name.

and it still does not work.
I have actually seen this with another app, where I had the same problem. With that app, I decided, that I had done something wrong and started over from scratch.
But this time, I am pretty sure, that I did not do anything wrong.

I have included the log:


B4X:
** Activity (main) Resume **
** Activity (main) Resume **


** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
main_pnlddve_touch (B4A line: 1234)


Activity.RerunDesignerScript("main2", 100%x, 100%y)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException


   at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:140)
   at anywheresoftware.b4a.objects.ActivityWrapper.RerunDesignerScript(ActivityWrapper.java:205)
   at dk.maxapps.nataly.main._pnlddve_touch(main.java:2866)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
   at anywheresoftware.b4a.BA$2.run(BA.java:266)
   at android.os.Handler.handleCallback(Handler.java:615)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4898)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
   at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
   at anywheresoftware.b4a.keywords.LayoutBuilder.runScripts(LayoutBuilder.java:175)
   at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:132)
   ... 15 more
Caused by: java.lang.NullPointerException
   at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:125)
   at anywheresoftware.b4a.keywords.LayoutBuilder.scaleView(LayoutBuilder.java:194)
   at anywheresoftware.b4a.keywords.LayoutBuilder.scaleAll(LayoutBuilder.java:190)
   at dk.maxapps.nataly.designerscripts.LS_main2.LS_general(LS_main2.java:13)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.keywords.LayoutBuilder.runScripts(LayoutBuilder.java:164)
   ... 16 more
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException

Kind regards
Jakob
 

MaxApps

Active Member
Licensed User
Longtime User
It does not say it in this log.
The 1st time it came up with an error, it did say btnDonate was missing.
And this problem started, when I removed that button (the only change).

If I remove the "Activity.RerunDesignerScript("main", 100%x, 100%y)" I do not get any errors.

Kind regards
Jakob
 

MaxApps

Active Member
Licensed User
Longtime User
Hi Erel

I just re-tried, with a copy of a similar app, to see if I could trace the exact step, where the error occurs and it seems, that the problem comes, when I add AutoScaleAll and not when I remove the button.
I was sure, that I added AutoScaleAll and tested that it worked and then removed the button. But I must have done it the other way round.
I am very sorry for this mixup. :eek:

So I guess it is not possible to rerun script when it contains autoscale?

Kind regards
Jakob
 

MaxApps

Active Member
Licensed User
Longtime User
The latest link is 2.30
I am running 2.25 - will upgrade NOW.
Thank you very much :)

Kind regards
Jakob
 
Top