Page MenuHome

blender crash when evaluated depsgraph object is created in invoke and referenced while redoing
Closed, ArchivedPublic


System Information
Operating system: Linux-4.13.10-041310-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.67

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-02 22:33, hash: rB50ccbe6bb233

Short description of error
I have an operator, that is invoked (because I need access to event).
I get the evaulated depsgraph object in the invoke function and store it in self.dg.

Invoke then runs the main function of the operator, which uses self.dg.
The operator also has an execute function, so it can be re-done. Execute also calls the main function, which again tries to reference self.dg. This however will crash Blender.

video demo

Exact steps for others to reproduce the error

  • open the blend
  • run the script and call the 'Crash' operator from the operator search menu
  • in the redo panel, click the Toggle button to do redo the op, Blender should crash
  • open the blend again, comment out the depsgraph line in invoke(), and uncomment the one in my_function()
  • again run the script and call the Crash op, then redo it, this should work

Note, that I'm perfectly fine doing it the second way. Not sure if this even a bug per se, or just a limitation of the depsgraph and undo, but felt it should be reported, due to the crash.

Probably for @Sergey Sharybin (sergey)



Event Timeline

MACHIN3 (MACHIN3) updated the task description. (Show Details)

Re-do is equivalent of re-loading file from scratch. This invalidates any possible pointer, such as object, vertex or dependency graph. You can not store them or re-use between operator re-executions.

Sebastian Parborg (zeddb) closed this task as Archived.Jul 5 2019, 10:29 AM
Sebastian Parborg (zeddb) claimed this task.