-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ADVANCED_OK returns additional info #20946
Comments
Just a curious bystander here, I looked up the code that actually outputs the advanced OK line:
I can't see how that could possibly produce that output, definitely weird! The |
I have a feeling it may be a buffer overflow.... |
Looking closer, it seems like every character is prefixed by another unrelated character:
That would correspond with it outputting line number N613. |
(Or perhaps suffixed -- the |
@X-Ryl669 - This wouldn't be related to the recent serial refactor by chance, would it? |
I dug further and am pretty sure this is a bug introduced by 3f01b22. It refactors serial functionality, and the new functionality for outputting a single character (
Basically, it says, "if there's no base defined, just output the character", and then it also says "output the character as a number in the specified base", but it doesn't say "only do the second one if not the first one". I'm actually surprised this isn't causing hard crashes, because |
Here's the pre-refactor code:
|
It's not my codebase, but in my opinion, the new code is being far too "clever" for no real gains. I mean, |
Yep, that PR is definitely bundling a fix for this bug with the actual build issue fix. |
Yes. I've forgotten to write else statement in the code. The PR #20932 is currently collecting the issues like these and providing a fix for all of them. You can try it, it's a work in progress and should solve each issue one after the other. |
I searched the codebase prior to the refactor and found a more comprehensive and readable implementation. I posted it earlier in this discussion. I think it is much more sensible code personally :-) |
I see all the discussion and follow-up commits on the other PR, I do think that the more fully-written-out form is better code in a number of ways. :-) |
Please test with latest bugfix, it should be resolved. If so, please close the issue. Thanks! |
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. |
Board is a SKR Mini E3 v2.0
Configs:
https://github.com/MarlinFirmware/Configurations/tree/import-2.0.x/config/examples/Creality/Ender-3%20Pro/BigTreeTech%20SKR%20Mini%20E3%202.0
Enable ADVANCED_OK and compile.
Build is from bugfix-2.0.x on Jan 28 2021.
Output from USB Serial:
I'm not sure what the
WN\x856m1h3j
etc parts are.... Probably a bug...The text was updated successfully, but these errors were encountered: