3
$\begingroup$

When I'm rendering an animation Blender will regularly crash, it seems to happen randomly as when I re-open Blender and resume from the crashed frame it renders fine until the next time it crashes. This happens across different projects and lots of different Blender files.

I assume it may have something to do with my computer set up or configuration, but I don't have the time to go trouble shooting.

What I would like to know is if it's possible to have Blender or Windows notify me when a crash occurs so I can just go back to Blender and restart it? Ideally it would notify me via my phone?

This is my system. Blender 3.6.4 Windows 11 Pro

11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz

RTX3070 integrated laptop GPU

32GB memory.

Blender is set up for GPU rendering using OptiX and Cycles

$\endgroup$

1 Answer 1

2
$\begingroup$

You could write a separate Python script to check if Blender is running. Here is one example:

import psutil #this needs to be installed (pip install psutil)
import http.client
import urllib
import time
from datetime import datetime

def running(name):
    print("Testing...")
    for proc in psutil.process_iter():
        if name in proc.name():
            return True       
    return False

def send_notification(text="Blender not running"):
    print("Sending notification...")
    text += datetime.now().strftime(' %Y-%m-%d %H:%M:%S')
    conn = http.client.HTTPSConnection("api.pushover.net:443")
    conn.request("POST", "/1/messages.json",
      urllib.parse.urlencode({
        "token": "Your Token",
        "user": "Your User Key",
        "message": text,
      }), { "Content-type": "application/x-www-form-urlencoded" })
    conn.getresponse()
    
while True:
    if not running("blender"):
        send_notification()
        break
    print("Blender running.")
    time.sleep(120)

This uses https://pushover.net/ to send notifications, there is an app you can download for the phone and you need to register, I think it costs something like $5 after trial. You can use something else.

$\endgroup$
2
  • 1
    $\begingroup$ SImplePush.io is a free alternative to pushover.net. Their free plan doesn't support a lot of pushes, but might be enough for this use case. I have no affiliation with this awesome service. $\endgroup$ Nov 13, 2023 at 21:09
  • $\begingroup$ Many ways to do it. One could use Telegram as well: stackoverflow.com/questions/75116947/… $\endgroup$ Nov 13, 2023 at 22:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .