The good old DX error

That is totally uncommon. A typical 'large' Project using several Virtual Screens would be 2000 to 3000 Blocks.

13,100 Blocks suggests there is some room for code optimization.

Oliver, if your Project is going to be rescued, you will have to make it available to the Power Users.

That is not the root cause, it is one of the causes of too many Blocks.

Also "get component" delivers the ID of one component, so your 'and' logic is not correct.

What I mean to be clear is that instead of using all the triggers one by one, if we can program a single trigger in a block (when any Button.Click), you won't get a DX error. I have seen and proved with a very long study that the excessive number of blocks does not cause DX either.

The first example will not work... a component can't be Button1 and Button2 at the same time... you have to use the OR operation...

Taifun

1 Like

ok.

correction, or.

I just wanted to give a quick example.

Could you show us the study, so we could repeat it ourselves?

Now that's interesting - can you post a copy of your study that we can pass-on to the MIT team?

1 Like

I can't share the aia file, it's posted, but I'm ready to help.

There is no need to share an aia for this topic.

Pixel Sketch & Pixel Animation – Apps bei Google Play

The information I got:

  • I used 1050 buttons & 5545 blocks in this application.

Note: I don't use dynamic components as I don't use plugins. Because as soon as IOS support comes, I want to install my applications on IOS. If you ask how to make an application without plug-ins, I learned excel by myself because I was an operator in some online games before I learned block programming. Also, my second field is mathematics teaching. So it's okay for me to generate the most complex block codes.

  • As you can see, I created this application in a design model using a phone, tablet and monitor.

First in phone mode, I was able to use all button triggers. When I switch to tablet mode this requires about 400 buttons, although I sometimes get DX error, it still worked in the end.

However, it is not possible to use more than 1000 button triggers individually in monitor mode. It gives an error right away. This created the following enlightenment for me, the number of components is not important, the important thing for android is to keep the number of triggers low.

You usually talk about 2000 - 3000 blocks in an application, I used 9000 blocks in the application below and I noted my work with numerous storyboards so as not to repeat myself.

This application is at such a limit that the DX error is inevitable when the first button is added.

I didn't get any errors in my memory implementation with 15k blocks below. Within these 15k blocks, a single procedure consists of 9k blocks and only gives the logical inference of the following move: If the cards are turned for the 2nd time without finding the memory cards match, the game is over. This 9k block is triggered on every card click.

What I mean is this:
1- The root cause of this DX error is too many triggers not keeping up with the build.
2- Prediction: Connection errors cause an error in the aia file in Mit App Inventor 2.
3- Naming the procedure files incorrectly and without copy-pasting causes conflicts with other procedures.
4- Programming with the browser and insufficient space on the disk where windows is installed.
5- Modems that have not been reset regularly and computers without an ethernet connection. (I wrote that I was an operator.)

If I had programmed the pixel game above for smart boards and placed the 3k buttons one by one, the application would have worked. This is not proof, it's prediction. I am usually not wrong in such predictions.

2 Likes

Thank you for the app details and your observations.

They open up a few areas of inquiry:

  • how much data traffic between the user PC and MIT happens during a build?
  • how much of the build happens on the user PC?
  • is the choice (phone/tablet/monitor) used to tune memory during a build?

Which build environment(s) do you use?

  • ai2.appinventor.mit.edu
  • code.appinventor.mit.edu
  • one of the offline servers (_______)

..... that could instead be cells of an HTML Table, looking at your App (nice App).

1 Like

What component type is used for the cards? Buttons? Images? I wonder if the issue is specific to component type too, not just event.

http://ai2.appinventor.mit.edu/

I meant only browser and internet related problems. The first question you ask is about the number of blocks. Compiling has nothing to do with the computer, but internet quality has a lot to do with recording transactions or not.

Phone/tablet/monitor: just to be used on these devices. The memory problem is one of the problems associated with navigating a lot, using high resolution image files, and repetition too much. I say without hesitation: The memory problem is the problem of new users.

image

The number of components is unimportant.

I wrote the cause and solution of the DX error.


image

..... Component type though, of the types that have an associated event (such as click event)?

.... Was your solution with those buttons to use an 'any component' Block, effectively 1 event instead of 1000? Interestingly, Oliver reported in Post#22:

@ewpatton, Profi's findings concerning the DX error are very interesting - it seems to point to an App Inventor limitation that perhaps should not be there.

1 Like

I can't say anything without Oliver sharing the block pictures.

1 Like

Builds are performed on dedicated servers at MIT (sometimes AWS). The only part of the build process that happens on the user's computer is the generation of the YAIL (Scheme) files from the corresponding Designer/Blocks files. Once the YAIL files are saved to the App Inventor server, the server packages up the project and sends it to the buildserver for processing. The client simply checks back in with the App Inventor servers for status updates every second or two to update the progress bar until the build has completed and the APK (or IPA for iOS builds) has been sent back to the App Inventor servers, at which point the dialog is shown with the QR code (APK/IPA only).

Maybe I missed it in this thread, but is there an actual AIA for us to look at?

2 Likes

Hi Evan, I have asked Oli to let you see his file.

1 Like

Hi @ewpatton

please find attached my aia below.

Some explanation: The project, as it is packaged in this attached AIA, does not build for me.
It shows the DX error in the screenshot here:

If I deactivate the red marked "Join" statement (it has a lot of blocks below), the project builds successfully for me.
But I do not see a pattern that exactly THIS join statement has an error, e.g. I can have it activated and deactivate something else instead, then it also builds.
All strange... :wink:

Thanks for your help in advance
KR, Oliver

[Mod Edit: AIA removed, contains paid extension]