When a compile, upload, or burn bootloader operation is triggered by the Arduino IDE user, command line tool(s) (e.g., avr-gcc, AVRDUDE) are invoked. It is these tools that actually perform the compilation, upload, or burn the bootloader.
π The button is misleading, since the user is sure to have the reasonable expectation that the tool process will be canceled.
π This can cause very confusing problems when the user triggers a new operation and it has a collision with the process that was still running from the canceled operation. Normally the existence and status of an ongoing process would be communicated to the user via the Arduino IDE UI, but after using the "cancel" feature, there is no such communication. So it will be difficult for the user (and those who support their report) to understand why this is happening.
To reproduce
Equipment
Any board or other hardware that produces a serial port.
Demo
Select File > New Sketch from the Arduino IDE menus.
Select the port from Arduino IDE's Tools > Port menu.
Select Tools > Board > Arduino AVR Boards > Arduino Duemilanove or Diecimila from the Arduino IDE menus.
β This board was chosen arbitrarily as one that is installed by default and likely to produce a relatively long duration upload process (in order to ensure it will still be running when the second upload is triggered). But the fault is not limited to this board.
Select Sketch > Upload from the Arduino IDE menus.
Wait for the "Uploading..." notification to appear.
Click the "CANCEL" button in the notification.
Select Sketch > Upload from the Arduino IDE menus.
π The upload fails with an unexpected "Access is denied." error. The reason is that the avrdude process from the first upload operation that was triggered at step (4) was still running, even though that operation was canceled.
Expected behavior
The process is killed when the "CANCEL" button is clicked.
- OR -
If it is not possible to kill the process, then remove the misleading "CANCEL" button.
Arduino IDE version
2.3.3
Operating system
Linux
Windows
Operating system version
Ubuntu 24.04
Windows 11
Additional context
I used the collision of port usage in the demo as a simple and dramatic way to show that the avrdude process from the "canceled" upload was still running. However, you can also use a tool such as ps -e on POSIX systems or Windows Task Manager to verify that the process continues running even after the operation is canceled.
Describe the problem
When a compile, upload, or burn bootloader operation is triggered by the Arduino IDE user, command line tool(s) (e.g., avr-gcc, AVRDUDE) are invoked. It is these tools that actually perform the compilation, upload, or burn the bootloader.
A "CANCEL" button was added to the compile, upload, and burn bootloader progress notifications (https://github.com/arduino/arduino-ide/pull/2334 / https://github.com/arduino/arduino-ide/commit/2a325a5b74a7ea80645cd2da74588f706292f4ff). Clicking this button cancels the operation in the Arduino IDE GUI, but doesn't kill the tool process. The tool process continues to run just as it would have done if the button had not been pressed
π The button is misleading, since the user is sure to have the reasonable expectation that the tool process will be canceled. π This can cause very confusing problems when the user triggers a new operation and it has a collision with the process that was still running from the canceled operation. Normally the existence and status of an ongoing process would be communicated to the user via the Arduino IDE UI, but after using the "cancel" feature, there is no such communication. So it will be difficult for the user (and those who support their report) to understand why this is happening.
To reproduce
Equipment
Demo
π The upload fails with an unexpected "
Access is denied.
" error. The reason is that theavrdude
process from the first upload operation that was triggered at step (4) was still running, even though that operation was canceled.Expected behavior
The process is killed when the "CANCEL" button is clicked.
- OR -
If it is not possible to kill the process, then remove the misleading "CANCEL" button.
Arduino IDE version
2.3.3
Operating system
Operating system version
Additional context
I used the collision of port usage in the demo as a simple and dramatic way to show that the
avrdude
process from the "canceled" upload was still running. However, you can also use a tool such asps -e
on POSIX systems or Windows Task Manager to verify that the process continues running even after the operation is canceled.Related: https://github.com/arduino/arduino-ide/issues/1199
Issue checklist