Error:Printer halted. kill() called! after starting a print

What is the problem?

I can't start a print with octoprint, after starting it it only executes the commands to set the bed and hotend temperature and then the printer returns an error that makes the printer stop and turn it off accordingly (I have a relay module that turns off when the printer instructs him to do so)

What did you already try to solve it?

i tried to change the timeout times but i didn't fix anything. apparently the printer returns this error: Recv: echo: cold extrusion prevented
Recv: Error: Printer halted. kill () called!

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Complete Logs

serial.log (8.2 KB)
octoprint.log (54.0 KB)

i use ideamaker as a slicer and this file as example to print:
Bowden_extruder_mount2.gcode (3.7 MB)

Hello @nictronik99!

Do you have a Gcode script in OctoPrint at Before print job starts?

The Serial log does not fit to the Gcode file you shared:


2021-01-05 22:03:35,077 - Changing monitoring state from "Operational" to "Starting"
2021-01-05 22:03:35,140 - Send: N0 M110 N0*125
2021-01-05 22:03:35,144 - Recv: ok
2021-01-05 22:03:35,158 - Send: N1 M221 T0 S100.00*11
2021-01-05 22:03:35,160 - Recv: ok
2021-01-05 22:03:35,165 - Send: N2 M140 S70.00*126
2021-01-05 22:03:35,167 - Recv: ok
2021-01-05 22:03:35,171 - Send: N3 M190 S70.00*114
2021-01-05 22:03:35,177 - Recv:  T:17.86 /0.00 B:17.50 /70.00 @:0 B@:0 W:?
2021-01-05 22:03:36,294 - Recv: echo: cold extrusion prevented

Gcode file:

M221 T0 S100.00
M140 S70.00
M104 T0 S224.00
G28 ; home all axes
M420 S1
G1 Z5 F5000 ; lift nozzle
1 Like

i've just updated the correct file

the problem lies in the pause commands after the activation of the heating (M190 ED M109) .... after these commands it goes into error. I had a backup of octoprint dating back to yesterday, before doing the update that came out today on some plugins if I'm not mistaken or directly on octoprint. I restored that backup and it makes the same mistake but if you delete the M190 and M109 commands everything works except obviously the fact that the print starts before the temperature reaches the target.

kill() can only ever be called by the printer, and it does this to shut down ASAP when it detects there is something wrong. OctoPrint has nothing to do with calling this, so you need to look at the printer. Check all of the connections, particularly the heaters and the thermistors, since the errors seem to be temperature rated.

Oh, and if it is a Creality board with their firmware, then it could be a firmware bug.

1 Like

is a self-built printer with skr1.4 and latest version Marlin firmware. the error is recalled by the printer yes but it does it only with octoprint, from sd it does not give errors, from repetier host connected with usb it does not give errors ... I suspect that octoprint starts after the wait commands (M190 and M109) to send the extrusion commands and obviously the printer returns that error. the suspicion becomes almost certain from the moment I have enabled cold extrusions and actually the extruder motor starts spinning and immediately afterwards the printer stops calling up the error. so i don't think it's the firmware but octoprint

in a nutshell after I start printing, the printer activates the heating, begins to raise the Z axis and extrude (I don't know why you start extruding) and immediately afterwards the printer returns the cold extrusion error

Do you have some code in the OctoPrint gcode scripts?

And do you have a recent serial.log?

now yes but not before. The problem exists both with and without these scripts. The script simply sets the absolute coordinates and runs the homimg and runs fine.

What about the serial.log?

serial (5).log (4.9 KB)

Send: N9 M109 T0 S224*33
Recv: T:15.18 /224.00 B:23.00 /0.00 @:127 B@:0 W:?
Recv: echo: cold extrusion prevented

THESE are the offending lines .... I don't understand what W :? means? in the second line

if I write manually on the terminal m190 s70 the printer stops immediately and returns the same error that can be read in the logs so it is a problem with this command. in addition, with the command m109 t0 s220 the printer starts moving the Z axis up and immediately after it stops and turns off

So, how many extruders do you have on your machine?

2021-01-06 10:49:32,804 - Send: N7 M221 T0 S100.00*13

This M221 has a certain purpose? It's BFB only.

I found the problem, it was the power loss that sent the printer into error, probably a firmware bug because this problem does not have it when printing from sd. probably doesn't know where to save the power loss data when printing from serial. thanks everyone for the support

1 Like

And we all searched into the wrong direction :face_with_raised_eyebrow:

Great you found it! So could you please:

1 Like

at this point the question arises, in case of power loss how do you behave with octoprint? save the data somewhere to resume printing?

Only a very few boards can detect a power loss in time (like the board on the Prusa MK3). These need a special signal from the power supply to indicate this.
If you suffer from a power issue in that way, that the 12V (or 24V) drop significantly under load - mostly it is enough for the 5V rail on the printer board - the logic still runs and the firmware detects no heating, but it does not know why. So the firmware pulls the emergency break. OctoPrint in the end is quite helpless.

1 Like

OctoPrint can't do anything to help with power loss unfortunately, due to buffering on both OctoPrint's side and the printer's firmware, only the printer knows exactly where it is. Power loss recovery will only work when printing from the SD card, the only thing you could do for this is get a good UPS that would send a power panic signal to OctoPrint so it can stop sending, let the buffer run empty, save the data and then shut down. In reality, this is impractical for most and would require a custom plugin for the signals from the UPS supply.