Error d8 failed

The app has a Bluetooth connection with a machine and controls this machine. All subpages are part of screen 1. The subpages show various setting parameters of the machine. These parameters can be changed and sent to the machine via Bluetooth. therefore I need the Bluetooth connection.

thank you so much for this info Anke

But 12000 blocks can't possibly be almost all related to Bluetooth.

That's correct. Not all blocks within a subpage require Bluetooth. But within each subpage there is at least one command that is sent to the machine. I'll try to sort this out better. Thanks for your help

Can anyone also privately message the .aia file, so that I can try to check?

  • Reduce your block count:
    • Use parametrized procedures for common code
    • Use Media text files instead of big clumps of text blocks
    • Use generic blocks instead of repeating component event blocks
    • Encode repeating decision patterns into lookup tables loaded from Media csv text files (does your blocks image look like a box of combs?)
    • You don't need a component for every data instance. Reuse those components.
    • If you can't fit data into a ListView or List Picker, show a small subset of the data in an Arrangement and slide it across the larger list of data.

The size of my app or number of blocks cannot be the problem. Because:
1: I have now deleted entire pages as well as blocks but the error message still comes.
2: on January 17, 2024 I was able to convert my app to apk without any problems. 3: I have this problem since the release nb195b (January 19, 2024).
I can't convert any of my apps to APK.
So it can only be due to the release nb195b

I think there is no need to think too much about the d8 error. After updating to java11, it replaced the popular dx error. There's simply too much of something and the project needs to be optimized in terms of resources, blocks and components on the screen.

Then please explain to me why I can no longer convert an app from January 2023 to apk.
If the number of blocks or other limitations were the problem, then it should have already been the case in January 2023.

Without a copy of the AIA it is hard to say. I would want to run it through a version of the buildserver with verbose logging on to see what the underlying issue d8 is throwing.

I had to fix some errors on Screen2, remove "AboutScreen" and then imported the app into AI2Offline and the APK was built successfully:

I have now deleted screen 2, exported the app as aia, then imported it. unfortunately no improvement.
what do you mean by "imported the app into AI2Offline" I'm not a long-term user. I appreciate your help.
Can you send me back your aia version?

I think I have identified the issue. Some part of the d8 process (which sadly Google has obfuscated) is resulting in a fairly deep call stack resulting in the process throwing a StackOverflowError. Increasing the stack size in the child process appears to fix the issue.

2 Likes

How can I do that?

So I installed AI2Offline and got this message
image

Ich werde dir morgen antworten. Offenbar wurde das Problem von @ewpatton (MIT Team) identifiziert. Also warte einfach ab ...

You can import your project into the server at ai2-test.appinventor.mit.edu and try compiling it there. That build server has the proposed fix for the d8 process.

2 Likes

Checked, it works.

My project is very large so i can't import to ai2-test.appinventor.mit.edu