It is indeed not clear what caused the error. This is not the compiler limitation that some users reach in debug mode with huge subs. It looks like a bug in the one of the packager tools.
In many cases you can use anchors instead of designer script. It will simplify things.
All is well, Erel. I think the problem is definitely not caused by B4J itself. It is caused by the integrated packager. Strictly speaking, it is not even a malfunction, but a limitation within Java. Seen in this way, it is not really an error but the reaching of a limit within the structure.
The only problem is that there is no indication of where someone is actually justifiably shooting from. So you change the structure and it works. Ultimately, this is a programming sin that has manifested itself over the years. I am now rebuilding the programme step by step, dividing parts of the programme into new layouts, which then have an identical, but then layout-specific designer script. In this way I was able to relieve the designer script in the main layout already in 10%. There is air again.
You are absolutely right about anchoring. But with the anchors, it's also one of those things. Do I anchor an object or do I assign script commands to it? In my opinion, anchoring makes a lot of sense, especially with several objects of the same size and type. With a rather "asymmetrical" design of many different objecttypes, I have always been on the safe side with a script and have generally opted for it. Then I know exactly where I have to change in order to get the desired result and don't have to think about whether the object is simply anchored or controlled via a script.
The disadvantage of this method is, of course, that you create gigantic designer scripts this way. Again, not good, but you can get used to it and above all rely on it. I am more of an advocate of script design for complex views.
But it's good to know where the limit is for such a script and how the error then becomes noticeable. As already mentioned, neither in debug nor in release mode, but when packing with obfuscator in release mode via the integrated packager. It wasn't the obfuscator either, you can switch it off. It was definitely the designerscript. And the workaround for it ultimately makes the structure of the programme more systematic and clearer. If I exported the error-generating script into a text file, saved it and then looked at the size of the file, it was a near 60kByte. A dangerous size and ultimately something like "madness grown over time".
Problem recognised. I mark the thread as <solved>. Maybe someday there will be someone who makes the same mistake I did. and reads this.
Thanks to all of you for the great ideas and help, especially Emexes and you Erel. I hope the current situation in your country will soon change for the better. That is better for everyone. Take care of yourself, your family and your friends. All of us here in the forum, no matter where we come from or how old, we need you too.
Best regards from Berlin, BV