I am trying to modify a working app but it fails to compile in the regular debug mode. Works ok in the Release mode. It compiles fine in Debug when Legacy Debugger option is selected under IDE Options-
B4A Version: 11.80
Parsing code. (0.42s)
Java Version: 11
Building folders structure. (0.01s)
Compiling code. (0.61s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.02s)
(AndroidX SDK)
Compiling resources (0.75s)
Linking resources (0.32s)
Compiling debugger engine code. (4.47s)
Compiling generated Java code. (3.72s)
Finding libraries that need to be dexed. (0.01s)
Dex code Error
Compilation failed with an internal error.
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 16
at com.android.tools.r8.ir.regalloc.h.a37)
at com.android.tools.r8.ir.regalloc.a.a1326)
at com.android.tools.r8.ir.regalloc.a.a801)
at com.android.tools.r8.ir.regalloc.a.a938)
at com.android.tools.r8.ir.regalloc.a.b117)
at com.android.tools.r8.ir.conversion.O.a998)
at com.android.tools.r8.ir.conversion.O.a961)
at com.android.tools.r8.ir.conversion.O.a906)
at com.android.tools.r8.ir.conversion.O.a426)
at com.android.tools.r8.ir.conversion.O.b53)
at com.android.tools.r8.ir.conversion.O.a102)
at com.android.tools.r8.ir.conversion.O.a51)
at com.android.tools.r8.graph.C.b31)
at com.android.tools.r8.ir.conversion.O.b35)
at com.android.tools.r8.utils.V0.a32)
at com.android.tools.r8.utils.V0.a30)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1448)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Appreciate any suggestions.