HI, All
I have a complex layout, and before all was OK, but at some point, when the layout gots to be complex - the error is started to occur (non-crashing), at LoadLayout:
The layout file is attached.
I have a complex layout, and before all was OK, but at some point, when the layout gots to be complex - the error is started to occur (non-crashing), at LoadLayout:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
dd.Initialize
'The designer script calls the DDD class. A new class instance will be created if needed.
'In this case we want to create it ourselves as we want to access it in our code.
xui.RegisterDesignerClass(dd)
Root.LoadLayout("MainPage") 'error - at this point
What can it be ?Waiting for debugger to connect...
Program started.
java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -4 is negative
at java.base/java.lang.System.arraycopy(Native Method)
at anywheresoftware.b4a.keywords.Bit.ArrayCopy(Bit.java:192)
at b4j.example.bitmapcreator._fillhorizontalline(bitmapcreator.java:4370)
at b4j.example.bitmapcreator._drawrect2(bitmapcreator.java:2583)
at b4j.example.bitmapcreator._drawrectrounded2(bitmapcreator.java:2686)
at b4j.example.bitmapcreator._drawcanvasasync(bitmapcreator.java:1663)
at b4j.example.bitmapcreator$1.run(bitmapcreator.java:5075)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
The layout file is attached.