"Unknown chunk index" error and interaction problems

Issue #398 resolved
xixicarry created an issue

Hello, John! This is Yongyu speaking. Last time, I raised the problem that the program was too big to burn. According to your professional opinion, we all suggested that the school teacher divide the long program into multi-segment functions. MIcroBlocks V1.2.25 has also been found to have some glitches and interaction issues.

The first is that the program sometimes pops up an "unknown chunk index" error message, and the program cannot be burned to the development board. At this time, re-open the program file, and then connect the motherboard to burn it. But there are still occasional errors. There is another operation is to drag the block, this time the program will also be re-burned to the development board. This error message will occasionally appear, I hope John can do some optimization in this respect.

The other is the interaction issue, since MIcroBlocks V1.2.25 has accelerated the burning speed, teachers have praised. May be used to the process of burning the program in the past, there is a progress bar displayed on the top right. Now after speeding up the burning speed, MIcroBlocks does not display the progress bar when repeatedly plugging and unplugging the data cable burning program. Teachers and students are very confused, my program really burned to the development board? I have a little suggestion for this, but I wonder if it will work. The progress bar can be retained, although it flashes, which also reflects the improvement of our burning speed, and also dispelled the doubts of teachers. If a pop-up message "Upload success! That's even better.

Comments (6)

  1. John Maloney repo owner

    since MIcroBlocks V1.2.25 has accelerated the burning speed, teachers have praised

    I'm happy to hear that!

    The first is that the program sometimes pops up an "unknown chunk index" error message, and the program cannot be burned to the development board. At this time, re-open the program file, and then connect the motherboard to burn it. But there are still occasional errors.

    I am sorry to hear that. This error can be caused by communication errors, perhaps due to a loose USB cable. It can also be caused if the user deleted a script that is still in use.

    It could also be caused a program that exceeds the amount of Flash memory. Are these errors happening more often with one type of board than another (e.g. with ESP32 boards vs.. micro:bits)? Do you happen to have a MicroBlocks program that always causes the error or some other way to reproduce the error?

    I have a little suggestion for this, but I wonder if it will work. The progress bar can be retained, although it flashes, which also reflects the improvement of our burning speed, and also dispelled the doubts of teachers.

    That is a good idea. Thank you!

    A variation of your idea is amenu command to verify that the program has been correctly loaded and re-download it if not. That command might be run if the "unknown chunk index" error is encountered.

  2. YongYu

    I am also trying to repeat this error recently, which usually occurs when connecting to the programming platform multiple times, i.e. inserting and unplugging the data cable to the microblocks multiple times while debugging the program. The USB cable is securely connected, and the connection icon is always green. The amount of code in the program is not out of the set range, it does not pop up prompts. This error can occasionally occur, even with programs that use a small amount of code. Currently using the ESP32 development board, no such issues have been found on the micro:bit.

  3. John Maloney repo owner

    We made some improvements to the downloading process in recent pilot releases. Have you gotten errors with the latest pilot release (v1.2.42)?

    Pressing the stop button in the IDE now verifies that the code on the board matches what is in the IDE.

    If the verification process finds a problem, it re-downloads the code that doesn't match. So if you do see an "unknown chunk index" error, clicking the stop button should fix it -- assuming you have good communications with the board.

    Note that other applications -- e.g. another blocks programming tool, like Makecode, or another instance of MicroBlocks -- attempting to communicate with the board can disrupt communications and lead to "unknown chunk index" errors. A bad USB port (e.g. on an old laptop) or a bad USB cable can also disrupt communications.

  4. John Maloney repo owner

    I believe this problem was fixed in v1.2.42. Feel free open another issue if you see this problem with v1.2.42 or later.

  5. Log in to comment