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.18k stars 19.21k forks source link

[BUG] ExtUI doesn't receive M701 load notification when EMERGENCY_PARSER and HOST_PROMPT_SUPPORT is enabled #21748

Closed Sebazzz closed 3 years ago

Sebazzz commented 3 years ago

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

When doing a filament load M701, and EXTENSIBLE_UI and EMERGENCY_PARSER and HOST_PROMPT_SUPPORT is enabled, ExtUI gets no notification to allow the filament load loop to continue. This causes

Bug Timeline

Started with #21671

Expected behavior

ExtUI::onUserConfirmRequired is called wait_on_user can be set to false and allows load_filament to exit

Actual behavior

ExtUI is not called, an user must manually exit the loop with M108 gcode. Host software shows "paused for user"

Steps to Reproduce

  1. Invoke M701
  2. [Filament extrudes]

Version of Marlin Firmware

2.0.8

Printer model

Creality CR-6 SE

Electronics

BTT SKR CR6 board; filament sensor (stock)

Add-ons

No response

Your Slicer

No response

Host Software

Pronterface

Additional information & file uploads

Possible solutions:

Short-term:

Longer term:

thinkyhead commented 3 years ago

I'm not sure how #21671 would be involved. It attempts to add functionality that didn't exist at all before. So, you can try reverting all the changes from that PR to see whether it fixes the issue. The only thing I can see that I would change is…

-   } while (TERN0(M600_PURGE_MORE_RESUMABLE, show_lcd && pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE));
+   } while (TERN0(M600_PURGE_MORE_RESUMABLE, pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE));

Since you didn't include your configurations, we have no way to test whether others of your settings may be involved in causing your issue.

Sebazzz commented 3 years ago

I'm not sure how #21671 would be involved. It attempts to add functionality that didn't exist at all before.

It is, because M600_PURGE_MORE_RESUMABLE is set when ADVANCED_PAUSE_FEATURE and BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT). If you happened to have that enabled and an ExtUI based implementation, ExtUI does not know when a user confirmation is required, and also not able to set pause_menu_response. It is hanging (from the user perspective) indefinitely, waiting on a response from the user.

github-actions[bot] commented 3 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.

github-actions[bot] commented 3 years 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.