MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.27k stars 19.23k forks source link

[BUG] Ender 3v2 Reboots with media insert and scroll menu at the same time #24131

Closed dmitrygribenchuk closed 2 years ago

dmitrygribenchuk commented 2 years ago

Bug Description

Hello. Have a firmware crash when inserting media and scroll at the same time. For demonstration reasons make it very fast - in regular life have a normal speed and can reproduce.

Steps to Reproduce

1) Insert or remove media 2) Scroll a button

Version of Marlin Firmware

2.0.9.3

Printer model

Ender 3v2 (4.2.2)

Additional information & file uploads

https://user-images.githubusercontent.com/15670247/166811221-6bd7b379-8de2-410a-af17-a5fccd50429c.mp4

ellensp commented 2 years ago

Please test the bugfix-2.0.x branch to see where it stands. If the problem has been resolved then we can close this issue. If the issue isn't resolved yet, then we should investigate further.

dmitrygribenchuk commented 2 years ago

I try to reproduce it on bugfix-2.0.x branch it seems that need a little bit more time for that but still able.

ellensp commented 2 years ago

Since you seem to have the knack on triggering this, could you add #define WATCHDOG_DURATION_8S to the end of your your Configuration.h recompile and upload and see if the issue still occurs?

dmitrygribenchuk commented 2 years ago

I'm adding #define WATCHDOG_DURATION_8S to the end of my Configuration.h recompile and upload and the issue still occurs

ellensp commented 2 years ago

The watchdog is a timer that must be reset before the the time limit or it reboots. This is how you detect and get out of software crashes. That define doubles that time from 4 to 8 seconds. Since it made no difference. It probably not tripping the watchdog timer.

dmitrygribenchuk commented 2 years ago

Also I set WATCHDOGDURATION 1,2,4,8,16 - still crashed

ellensp commented 2 years ago

It doesn't work that way, Is used in code like this

#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 8000000) // 4 or 8 second timeout

So if WATCHDOG_DURATION_8S is set use 8000000, else use 4000000

Other WATCHDOGDURATION values are not checked for

mrbass21 commented 2 years ago

I don't know if it's related, but I've triggered a similar situation. I'm brand new to 3D printing and have an Ender 3 Pro (4.2.2 board, all stock for now). I started messing with upgrading Marlin late last night. I went from 2.0.8.2 to 2.1 and while printing, I constantly get beeps from the piezo and the display goes into a menu as though I pushed in on my button.

While I was printing I went to the Power Outage setting and clicked in on it, the software rebooted (crashed?) and the print was immediately stopped.

I'm still looking through tickets to see if anyone has the problem I do with the logic board constantly thinking I've interacted with the menu during a print. If I let it sit, sometimes it goes back through phantom selection, and sometimes it times out and goes away. Seemed maybe tangentially related. I'll keep looking at issues in the mean time to see if anyone else is having my problem.

github-actions[bot] commented 2 years ago

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

dmitrygribenchuk commented 2 years ago

Still can reproduce on 2.1.1

thisiskeithb commented 2 years ago

Since https://github.com/MarlinFirmware/Marlin/pull/24652 was patched a few days ago, please download bugfix-2.1.x to test with the latest code and let us know if you're still having this issue.

dmitrygribenchuk commented 2 years ago

Also reproduced on bugfix-2.1.x

github-actions[bot] commented 2 years ago

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

dmitrygribenchuk commented 2 years ago

Still reproduced on bugfix-2.1.x

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.