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.26k stars 19.23k forks source link

[BUG] Random "Endstops" message #26276

Closed classicrocker883 closed 4 months ago

classicrocker883 commented 1 year ago

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

Yes, and the problem still exists.

Bug Description

Not sure exactly how it came about, I'll try to reproduce it.

So out of nowhere I get a status message on the printers LCD display saying "Endstops           chrP" - (it had many spaces inbetween)

I traced it to module/endstops.cpp line ~351

void Endstops::event_handler() { ...

    TERN_(HAS_STATUS_MESSAGE,
      ui.status_printf(0,
        F(S_FMT GANG_N_1(NUM_AXES, " %c") " %c"),
        GET_TEXT(MSG_LCD_ENDSTOPS),
        NUM_AXIS_LIST_(chrX, chrY, chrZ, chrI, chrJ, chrK, chrU, chrV, chrW) chrP
      )
    );

Screenshot 2023-09-12 213755

as you can see there is some sort of error popping up.

Bug Timeline

possibly old

Expected behavior

I'm guessing this should not have popped up??

Actual behavior

Popped up randomly

Steps to Reproduce

  1. Using JyersUI - may also show up with ProUI
  2. Have everything unplugged from the mainboard except power and LCD cable note: this is probably just a fluke due to everything unplugged. ie: no endstops were being registered.

but seeing the "error-type" in VSCode when hovering over the function in question made me submit this.

Version of Marlin Firmware

bugfix-2.1.x

Printer model

Voxelab Aquila

Electronics

G32 mainboard

Add-ons

No response

Bed Leveling

UBL Bilinear mesh

Your Slicer

None

Host Software

None

Don't forget to include

Additional information & file uploads

No response Marlin_Config.zip

ellensp commented 1 year ago

Please attach your configuration files.

classicrocker883 commented 1 year ago

I believe I have traced this to lcd/marlinui.h line ~514

the newer version:

  template<typename... Args>
  static void status_printf(int8_t level, FSTR_P const ffmt, Args... more) { status_printf_P(level, FTOP(ffmt), more...); }

an older version which didn't show the "error-type"

  static void status_printf(int8_t level, FSTR_P const fmt, ...);

edit:

this is why it is showing "error-type" void status_printf<Args...>(int8_t level, const FSTR_P ffmt, Args ...more)

removing the TERN_ actually got rid of the "error-type", maybe it will fix the random message popping up??

thisiskeithb commented 11 months ago

removing the TERN_ actually got rid of the "error-type", maybe it will fix the random message popping up??

How’d the test go?

classicrocker883 commented 11 months ago

removing the TERN_ actually got rid of the "error-type", maybe it will fix the random message popping up??

How’d the test go?

I haven't actually delved into this issue. it wasn't easy recreating the message for a benchmark. it could have come and gone for any other reason. I haven't had it pop up since, but what remains is the "error-type" in the status_printf. however that doesn't appear to cause an actual issue...maybe??

classicrocker883 commented 11 months ago

I wonder would changing the following have any benefit, perhaps such a complicated code it causes the issue "behind the scenes" ....

-     ui.status_printf(0,
-       F(S_FMT GANG_N_1(NUM_AXES, " %c") " %c"),
        GET_TEXT(MSG_LCD_ENDSTOPS),
        NUM_AXIS_LIST_(chrX, chrY, chrZ, chrI, chrJ, chrK, chrU, chrV, chrW) chrP
      );

+      FTOP(S_FMT GANG_N_1(NUM_AXES, " %c") " %c"),
+      FPSTR(S_FMT GANG_N_1(NUM_AXES, " %c") " %c"),

+     ui.status_printf_P(0,

the above code isn't verbatim, just as an example to replace F with FTOP or FPSTR, if with FTOP, then this must be ui.status_printf_P

classicrocker883 commented 11 months ago

or what about something like this?

ui.set_status_and_level(MString<30>(F(S_FMT GANG_N_1(NUM_AXES, " %c") " %c"), GET_TEXT_F(MSG_LCD_ENDSTOPS),NUM_AXIS_LIST_(chrX, chrY, chrZ, chrI, chrJ, chrK, chrU, chrV, chrW) chrP));
github-actions[bot] commented 5 months ago

Greetings from the Marlin AutoBot! This issue has had no activity for the last 90 days. Do you still see this issue with the latest bugfix-2.1.x code? Please add a reply within 14 days or this issue will be automatically closed. To keep a confirmed issue open we can also add a "Bug: Confirmed" tag.

Disclaimer: This is an open community project with lots of activity and limited resources. The main project contributors will do a bug sweep ahead of the next release, but any skilled member of the community may jump in at any time to fix this issue. That can take a while depending on our busy lives so please be patient, and take advantage of other resources such as the MarlinFirmware Discord to help solve the issue.

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