1.) every second some text over a day or two => bluescreen
2.) Some init prints but the Uno oder esp32 stalls directly thereafter so the device reboots
and print its init messages again very quickly and loops endlessly.
bluescreen after less than 2 minutes maybe earlier - after some seconds.
I remember the error on the bluescreen reads : IRQL_NOT_LESS_OR_EQUAL
I think its a new problem because a half year ago or so i dont had any such problems with the ide.
edit:115kbit serial speed, 2 IDEs open, two devices attached but only one is printing/stalling
I cant check it at the moment. I am developing other stuff and cant stop at the moment.
And everytime it hurts me while hoping that windows does not some harm to important structures.
But ive seen my "usual" stalls after println of init data as described as well.
And no - I've not seen any other stalls for a long time (some years i guess) except now when this ide prints lots of data. (No offense intended, just for description)
The reason I am asking about this is because there is a known bug that causes Arduino IDE hang when a huge quantity of data is printed to a single line in Serial Monitor, as is done by the first test sketch I provided:
This fault does not occur when when the any amount of data with reasonable line lengths are printed.
Although the bug report only mentions that the IDE becomes unresponsive, I believe that it also causes it to use an excessive amount of computing resources, and this might produce the conditions that cause the BSOD on your computer.
Even when the sketch code uses Serial.println, it is still possible for it to cause extremely long lines to be printed to Serial Monitor if the baud rate setting in Serial Monitor doesn't match the baud rate used by the sketch. In this case, the data is corrupted and so Serial Monitor doesn't recognize the line breaks in the received data so you can end up with a single long line of gibberish in Serial Monitor.
The Serial Monitor view is a tab in the bottom panel of the Arduino IDE window, and the bottom panel can also contain other tabbed views such as the "Output" view that opens whenever you compile or upload. So even when you aren't actively using Serial Monitor, you might still have it open and not notice it, and thus still be subject to the Serial Monitor bug I mentioned in my previous reply.
Hi @phunkz. I did a bit more research on the subject and I have an alternative hypothesis about the possible cause. And if this is the cause then there is a simple workaround.
I'll need some additional information in order to check my hypothesis. Please tell us which USB to serial bridge chip your Arduino board has. This is a black chip near the USB socket.
The chip will usually be identified by writing on the top. This might say something like "WCH CH340G" or "SILABS CP2102".
If it isn't clear, alternatively you can provide the link to where you bought the board from and we'll see if we can determine the chip from the product listing.
Yes i also think it could be an usb driver problem. But how to grab it?
The first board is an esp 12e(or f, just unsure, but there is no profile for f in the ide) on a cheap 4x relais board. This has only a serial interface which is connected via a cheap "ebay" usb-bridge. A blue connector with some standard chip in it. I had some trouble to get it to work.
But the hello test runs on the second board.
Is an aduino uno R3 with an micro-usb-port and CH340 (icant confirm if its a c or g but it look a little more like g.
These two communicate via i2c which i try to debug.
Even when the sketch code uses Serial.println, it is still possible for it to cause extremely long lines to be printed to Serial Monitor if the baud rate setting in Serial Monitor doesn't match the baud rate used by the sketch. In this case, the data is corrupted and so Serial Monitor doesn't recognize the line breaks in the received data so you can end up with a single long line of gibberish in Serial Monitor.
I know this but thats seem not the be the case.
The Serial Monitor view is a tab in the bottom panel of the Arduino IDE window, and the bottom panel can also contain other tabbed views such as the "Output" view that opens whenever you compile or upload. So even when you aren't actively using Serial Monitor, you might still have it open and not notice it, and thus still be subject to the Serial Monitor bug I mentioned in my previous reply.
At the moment all bsod happened when the ide was the active window and the serial monitor was visible. It dont know if happens it the serial monitor is (edit) hidden but i would guess so.
Your best bet might be Windows event viewer. I have no idea where in the event viewer I would search and I can't guarantee that it will reveal anything.
Now i know the exact time of the unexpected shutdown and when i stopped the crashdump.
Before the time only some unrelated warnings. Nothing regarding usb or so.
Select View > Devices by type from the Device Manager menus.
Open the "View" menu.
If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
Open the "Ports (COM & LPT)" section of the Device Manager tree.
You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
Select the "Drivers" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
Now please reply here on the forum thread to tell us the version number you saw after "Driver Version" field in that "USB-SERIAL CH340 (COMn) Properties" dialog.
We received a report that, after the recent CH340 driver update, printing large amounts of data to Serial Monitor causes a BSoD on Windows 10 machines:
You have verified that you are using the problematic driver version (3.9.2024.9). So it should be possible to work around the bug by installing an older version of the driver. I'll provide instructions you can follow to do that:
Select View > Devices by type from the Device Manager menus.
Open the "View" menu.
If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
Open the "Ports (COM & LPT)" section of the Device Manager tree.
You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
You will see a "Roll Back Driver" button in the dialog. If it is not clickable, perform the following instructions:
Click the "Update driver" button.
An "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog will open.
Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
You should now see the driver installation wizard update the driver. Wait for the update to finish, as indicated by the message "Windows has successfully updated your drivers" in the dialog. It is possible you will instead see the message "The best drivers are already installed". If so, please stop following the instructions here and reply on the forum thread to let me know. I'll provide alternative instructions you can follow.
Click the "Close" button in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
The dialog will close.
Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
The "Driver Package rollback" dialog will open.
Click the radio button next to "My apps don't work with this driver" in the "Driver Package rollback" dialog .
Click the "Yes" button.
The "Driver Package rollback" dialog will close.
Click the "Close" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
Now start Arduino IDE again and try the "hello" test sketch again. Hopefully this time the BSoD will not occur.
Please let us know whether that fix works for you. This information will be useful to the developers when investigating whether there a problem in the Arduino IDE Serial Monitor is a factor in this fault, and the information will allow us to more effectively support others who report being affected.
This is normal. The reason is that the driver supports both the CH340 and the CH341 and so WCH arbitrarily chose "341" to use in the filenames.
I followed your instructions until he told me that the best drivers are already installed
Then i uninstalled the drivers using the same setup tool with its uninstall button. Which worked fine.
Then install again.
et voila!
Excessive printing of "hello" worked.
With and without line feed!
From my experience, if you don't perform a "roll back" then Windows will later update the driver back to the problematic version once again and the problem will just come back. So keep this in mind and if the problem does come back then you can perform the instructions once again, this time making sure to follow them exactly.
Great news! Thanks for taking the time to post an update with your results. That is very valuable information.
As you stated: shortly after beeing happy the failing driver has be reinstalled by windows and the Win 10 computer crashed again. But then (after reboot) it has been possible to rollback the driver. (The german option is called "Vorheriger Treiber") which seemed greyed out all the time, but now it was possible to click. Done, gave the reason and got the working driver back.
But yesterday it stalled again. After rebooting i saw the 2024 Driver but no chance to rollback. So i uninstalled it and installed the 2022 driver again. But i was suspicious and kept the driver dialog open.
I stopped working and put the pc to enery saving to resume work next day.
After waking up the driver was replaced again by the 2024 driver which the open dialog shows and rollback was possible.
I rolled back, gave the reason and got the 2022 driver back.
But...
is this an endless game? Do i get sometimes the buggy driver back with no other way then keeping the driver dialog open (which is updated while open) and an eye on it.
Can i remove it from the system finally and/or mark it as malicious?