Why Microblocks IDE sometimes is very stuck when the program is large?

Issue #417 resolved
Tom Ming created an issue

@John Maloney

Hi John,

The biggest advantages of MicroBlocks is that debugging is very convenient and running parallel tasks are very easy.

But when the program becomes large, the program editing in Microblocks IDE sometimes is very stuck! I use windows 10 running MicroBlocks IDE with ESP32 Dev kit linked.

Wenjie says that this problem rarely appears on Mac.

Is this problem related to the operating system? How to solve this problem?

Thanks.

Comments (5)

  1. John Maloney repo owner

    I have sometimes seen the serial port becoming locked on low-end Windows computers (e.g. netbooks). The problem appears to be due to a bug in the low-level serial drivers for Windows. Since MicroBlocks has no control over the Windows serial drivers, the best we can do is to try to avoid triggering that bug by slowing down the serial communications. We have a mechanism to do that but, of course, we want serial communications to be be as fast as it can be while avoiding the problem.

    However, I'm not sure if that is what is going on in this case. We need more information. Ideally, we'd find a repeatable test case that fails consistently that we can use to isolate the problem and then verify that our fix solves it. But these serial problems can be difficult to reproduce and sometimes they only occur on specific computers.

    Do you have an example of a large program that often fails when loading? Does it fail on your computer? If it does not fail 100% of the time, how many times does it fail out of ten trials?

    What sequence of actions can you do to reproduce the problem? For example: "Open MicroBlocks in the Chrome browser, connect to an ESP32 board, load the program, ..."

    Another potential problem is that the program is too large to fit into the available memory. In that case, I would expect it the problem to be totally reproducible and to fail on both Mac and Windows computers.

    I would love to fix this problem but I need a way to reproduce it so I can debug.

  2. John Maloney repo owner

    We made some changes to the code saving mechanism in the pilot release stream in late October. I'm hoping those help with this problem. I'm going to close this issue but feel free to create a new issue if you still seeing the problems with v1.2.44 or later.

  3. Log in to comment