Operating system: Linux-5.2.18-129.current-x86_64-with-glibc2.9 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.50
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e
Short description of error
For automation I created a script from a sequence of actions which works great if I run it in the blender console window, or if i Run Script in a text editor.
But when I run this script through the command line without the graphical shell of the blender - he crashed.
If I exclude bpy.ops.object.material_slot_assign (), the script succeeds, except that the materials are not used.
Problem is repeated regardless of the platform, Windows or Linux, regardless of the PC used (3 different PCs).
Exact steps for others to reproduce the error
./blender -b -P /home/convert/script.txt
The error is reproduced even in the simplest example
import bpy bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='SELECT') bpy.context.object.active_material_index = 0 bpy.ops.object.material_slot_assign()
In a full script, everything is executed until it reaches the line bpy.ops.object.material_slot_assign ()
Without this line, the script completes successfully and the result is saved.
And it does not depend on the assigned material.
I also attach an automatically generated file when the blender falls: