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
System freezes (& fan stops!) after same line of gcode #5660
Comments
Same problem, freezes as out of memory... investigating also. |
Post your config files (not c/p please, link them) and around a 10 line snippet of the failing gcode line. Any serial output with debugging on would be helpful too ( |
Embarrassingly I still haven't figured out how to upload my changes to my public github branch, so I put the files here.
EDIT: I'm now going to try to trim the gcode to the minimum that still causes the fail. I removed a huge chunk earlier today and it still failed - maybe I can remove most of what's left. |
This is all the gcode needed to trigger the crash: G28 ; home all axes
M420 S1; re-enable bed leveling ;; ***no failure unless bed leveling is enabled***
;M111 S23; enable debug output
;G92 E0
;G1 Z1.200 F7000
G1 X-0.432 Y-61.985 E1.9508 F700
G1 X-0.432 Y15.215 E4.5184
; MARLIN FAILS AFTER RECEIVING THE ABOVE GCODE
G28 ; home all axes (if Marlin has not crashed) Additional data:
|
To be more succinct, this is all the code required on my system to kill Marlin: G28 ; home all axes
M420 S1; re-enable bed leveling ;; no failure unless bed leveling is enabled
G1 X-0.432 Y-61.985 E1.9508 F700
G1 X-0.432 Y15.215 E4.5184 |
Could you try a few different things? For instance, remove the E axis moves. Does it still crash? What about the Y axis moves? Very interesting that you have no Z moves and it still crashes with ABL on. I'm also following an interesting bug on another thread, could you try disabling leveling fade? |
Well, while However Z=0 is scraping my bed, so I'm changing that line to
Trying various F values in line 4: So F <= 909: FAIL Next, if I delete the E parameter from line 4 ( E threshold search (* means passed one time, failed another): PASS: 5.5184 4.5184 4.0 3.85 3.84 3.9 3.89 3.885* 3.884* 3.9 Numbers with asterisks mean that at first they failed but later they passed. Maybe the threshold drifts depending on previous commands. When a test value caused a crash, the printer has to be reset, so the next test value is starting with a reinitialized system. If a test value didn't cause a crash, I did not reset the printer to save time. Still it's clear that the E threshold seems to be around 3.885. X value sensitivity on line 4: Raw data (* means passed one time, failed another) PASS: 50 -50 30 25 24.8 24.7 24.6 24.5* 24.0* (after a few passes) 24.5* (immediately after a reboot) Hope this helps. EDIT: Also, I successfully printed 8 objects yesterday, each taking between 20 minutes and 2 hours, with no freezes. It only seems to fail under a surprisingly narrow set of conditions... |
N135978 G1 X47.221 Y128.563 E11.2216*109 And boom... |
This week I printed about 10 more parts (one at a time) over about 15 hours print time with this exact configuration - no problems. I haven't re-run the bed leveling (changing the leveling matrix) because I think there's a good chance it would make the problem disappear for these coordinates and maybe be impossible to recreate. But I just realized that I could re-run the leveling but not save the matrix - I'll try that when I get home in a few days... EDIT: I'll also try disabling leveling fade as manianac suggested. |
Not sure I have leveling fade enabled; there's no Added Z0 to G28 ; home all axes
M420 S1 Z0; re-enable bed leveling, set fade to 0
G1 X-0.432 Y-61.985 Z1.2 E1.9508 F7000
G1 X20.0 Y15.215 E4.5184 F700 Still crashes uC. Re-leveled bed with |
I've been printing a lot over the last month with RCBugFix and this bug did not appear. In fact I forgot this problem even existed...until it crashed again today 10 minutes into a 13 hour print. I rotated the model 90 degrees and resliced, and it froze on the exact same spot on the model. I'm using the RCBugfix changes as of 2/16/2007. Please let me know if there's anything else I can do to help find the problem. |
If the date of RCBugFix is right, you have #5829 included so we can eliminate that as a fault. @yonkiman, @shacal, is the following true for both of you:
I thinking about if the cause of this problem may be related to #5699, were bed leveling might also be the cause of the issue.. |
Correct on all 4 except I disabled leveling in gcode, not config file. Will try that now. |
If it's working when it's disabled over gcode that's enough to prove there is something wrong with bed leveling. @thinkyhead, who is the right person to name here regarding bed leveling code? |
Following |
@Sebastianv650 For this issue, as it causes an obvious crash, it should be fairly easy to narrow down, whether specific to bed leveling or only ancillary to it. I'll do some testing and see if I can locate the root cause. |
If you add #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (code_seen('Z')) set_z_fade_height(code_value_linear_units());
#endif |
@shacal Are you also running a delta with bilinear bed leveling? |
Yes, delta with 32x microstepping on all three (of course) axes. |
@yonkiman You're probably overtaxing your 16MHz AVR processor with so many steps-per-mm. Reduce your micro-steps to 16 and the problem should not appear. |
Maybe - it just seems odd that I'm able to print dozens of different objects with hundreds of thousands of lines of gcode but it's just this particular line (and one other that I didn't isolate) that causes a lockup. And why does it fail with slower feedrates (F <= 909) and work with faster rates (F >= 910) - shouldn't a slower feedrate increase the amount of time available to calculate each step?
I'll give that a try tomorrow. |
@thinkyhead Went to 16 microsteps and it still crashed with the same code: G28 ; home all axes
M420 S1; re-enable bed leveling ;; no failure unless bed leveling is enabled
G1 X-0.432 Y-61.985 Z1.2 E1.9508 F7000
G1 X20.0 Y15.215 E4.5184 F700
; MARLIN FAILS AFTER RECEIVING THE ABOVE GCODE
G28 ; home all axes (if Marlin has not crashed) |
I pulled the latest changes from RCBugFix before I compiled. All code (including the config files I'm using) is on my fork. |
What happens if you insert |
Still crashes. |
With a
|
I've re-jiggered the code so that Meanwhile I've redone your changes at rc_broken_abl_test (full diff), if you want to test it. Note that if you simply switch the connections on |
That did it. Thank you so much for tracking this down. I feel pretty stupid for ignoring the low memory warning - my printer came with a I also really appreciate you cleaning up |
W00t! Happy to help. Freezes are almost always a case of buffers / stack / vars getting corrupted, and low memory can certainly lead to that! |
D'OH! The original problem (with a slightly different gcode causing it) has come up again. It originally would fail with the original But tonight I was printing another object and it failed in the exact same way, but with This is using the build from 22 days ago. I pulled the latest RCBugFix changes into my repo but can't enable bed leveling, so I haven't been able to check with the latest fixes. This is just a heads-up that I don't think the original fix worked... |
How about a |
Thanks. Will give it a shot when I have more time to fix whatever I've done to my repository - can't compile the month-old build I've been using anymore, and haven't been able to make my printer work with the latest RCBugFix changes (I think due to a conflict with the hack I did to make the Z SLED probe work without sliding for my pivot/touch probe and the changes the community did to properly support pivot/touch probing. Maybe in a few weeks. |
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. |
Been running 1.1.0 RCBugFix for a few days. Have had no problem with small prints. Now trying to print something larger, and printer is freezing (stops moving, hot end fan stops, stepper motors lose power) on the exact same line of gcode, a few minutes into the first layer. The uC doesn't reset (watchdog fails or isn't enabled) so the printer stays in this 'dead' state as long as power stays on. Restarting Octoprint doesn't wake it up either - a power cycle seems to be the only thing that works.
After it happened twice I disabled
DEBUG_LEVELING_FEATURE
since it "Requires a lot of PROGMEM!" and recompiled, but it still froze on the same line. And that line isN1762 G1 X-0.432 Y15.215 E4.5184*118
.I shifted the parts on the bed, resliced, and it fails on the same edge of the same shape (
N1756 G1 X-3.930 Y8.108 E4.5185*79
). It's not a particularly high extrusion value, andE12.1892
worked earlier in the sequence).Not sure what to look at next...
EDIT: Tried printing just the part it freezes on, printer made it past the trouble spot.
Also verified that I have
USE_WATCHDOG
defined andWATCHDOG_RESET_MANUAL
undefined. Reading the comments about the watchdog: "If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever". I have a Mega2560, so I'm guessing the uC is crashing, the watchdog is firing, and I'm in the "hang forever" state.Going to try with
M100_FREE_MEMORY_WATCHER
enabled.EDIT: Inserting
M100 F
before the troublesome line makes the problem go away. Of course. Response isFound 886 bytes free at 0x1C9B
.Might be able to make it print now but want to find root cause...
The text was updated successfully, but these errors were encountered: