-
-
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] Emergency Parser M410 crashes board STM32F1 #19490
Comments
I just tried this on a STM32F103RET6 small system board core board (ie a development board, same MPU) Before... Send M410 try M119 again after M410 Controller is still talking. |
Same for LPC1769 M410 crash and reboot board! need not reboot to do a power loss recovery from host to clean queue and save energy please solve |
what do you mean? |
M410 produce a crash that reboot the board |
what do you mean with "please solve" ? |
Mean guru of Marlin please come to fix this bug, I'll immensely greatfull to who have ability tho understand what's going wrong after stopping motors occurs. |
To get back on track, does anyone have any suggestions on what I could look into to debug this further? It is a real issue, but I don't have the experience in Marlin to know what could be crashing this. |
Did you tried with the current bugfix? is it only happen while printing? |
I had tried it on the latest when ellensp said it wasn't reproing for her, I can try the latest master in marlin and see if it fixed it. It happens with pretty minimal comands from boot I had it reproing with this: G28 |
Here is the full communication from turn on until it crashes:
And I never get a response again. It is clearly handling the M108, but M410 fails. I am able to hack the code to make it so M410 works as a normal command and M108 is in the emergency parse and that works for what I need. I am willing to help debug further if someone has any ideas, but this is not a blocker for me any more |
is the watchdog enabled? |
Which env are you using? Emergency parser is not supported in USB Serial in stm32f1 without usb composite. Or enabled usb composite, or use hardware serial (not -1). I just send a PR for that: #19745 |
Last bugfix and happen in every state of machine, |
I'm seeing the same thing on a GTR V1.0 (STM32F407IG). After a |
Fixed there: #19752 Can you test it? |
Yep that works for me! I'm not sure if this is expected or not, but it doesn't get me out of a homing command if I try to kill during it. Its fine with my implementation, but it isn't as immediate as I would imagine. |
do M112 gives the same behaviour? |
Nope M112 stops immediately. |
are you using the my lasts commits? Because M112 and M410 are being executed in the exactly same place...
|
Ah played around with it a bit more, and what is happening is it cancelling one move in the homing command, but there are a whole bunch of moves called from home so it is not stopping the rest of them. |
Ok, so this a new issue, something like: "M410 don't stop when homing"... Can you close this issue, and open another, relating that behaviour? It's another type of fix, as we would need to make a more robust M410. |
Ok well this bug still exists until your PR is in, since the emergency parser doesn't work without it. |
I'm going to do a bit more testing and then post the other bug as well |
After testing this same bug doesn't exist without emergency parser because it won't try to intercept in the middle of the command. It won't kill the homing, but it doesn't kill it half way, which is much worse, so all I can see with my board is that it breaks with your fix. |
Breaks with my fix? The bug is: M410 crash board. Reason: it was executed inside a IRQ. Fix: execute out of a IRQ. With my fix, M410 will run properly, always. Now, if M410 don't work with homing, it is not related with my fix, neither with this issue report. It's M410 that never worked with homing. This issue is solved. Please open other issue about homing + M410, and there we will find a fix for that. |
This issue will be solved when your fix is in I agree. Your fix accomplishes that, but you don't close a bug until it has a merged in fix. I can't be the one to open the other bug since I can't repro it on the bugfix branch, I can only repro it on your branch. If you are correct about the behavior, other people will be able to repro it and file the bug, but if I post a bug people will ask me to try it on the latest bugfix, which obviously won't work due to this issue still existing on the branch, I personally cannot confirm that your fix is not the cause of this new issue, even if I am pretty sure it is not. |
This issue is fixed with that PR, whole feature is still not in a usable state though :/ |
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. |
Bug Description
When using the EMERGENCY_PARSER flag after I send a M410 the board stops responding immediately.
The other emergency commands work just fine, and if I don't have EMERGENCY_PARSER M410 works fine, so it is something specific to that command.
My Configurations
Marlin.zip
Steps to Reproduce
Expected behavior: [What you expect to happen]
Board continues to function after stopping all movement.
Actual behavior: [What actually happens]
Board becomes unresponsive, likely crashing.
Additional Information
This is specific to this experience, as if I don't have EMERGENCY_PARSER it is able to work normally,
After testing I found out that I can call
planner.quick_stop(); without it crashing, but as soon as I call any of the other lines in quickstop_stepper() the board crashes immediately without any additional logging output.
This is on the latest Bugfix-2.0 branch since EMERGENCY_PARSER is not available on the main branch
The text was updated successfully, but these errors were encountered: