Page MenuHome

GPencil: Crash on Making Materials zero user
Closed, ResolvedPublic


System Information
Operating system: Linux-4.15.0-55-generic-x86_64-with-Ubuntu-18.04-bionic 64 Bits
Graphics card: GeForce GTX 980/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116

Blender Version
Broken: version: 2.81 (sub 3), branch: master, commit date: 2019-08-27 09:20, hash: rB666be7d8860b

Short description of error
Blender crashes when Shift+Clicking on the X in the material ID field in the material properties of a grease pencil object (doesn't seem to happen on regular meshes).

Also, interestingly enough it only happens when trying to shift+delete the first material, not with the second or others.

Exact steps for others to reproduce the error

  • Open attached .blend file
  • Shift+Click on the X icon in the material ID field of a grease pencil object.


Event Timeline

bug confirmed with stroke and monkey primitives, does not happen with a blank grease pencil object

I guess is related to drawing, let me check.

Antonio Vazquez (antoniov) renamed this task from Crash on Making Grease Pencil Materials zero user to GPencil: Crash on Making Materials zero user.Aug 27 2019, 3:53 PM

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) @Pablo Vazquez (pablovazquez) here is something pending with this bug. Now, when you remove the material, the stroke has disappeared from the viewport, but it's in the file. If you add a new material, the stroke backs again.

We have two options:
a) Keep it as now, the stroke backs when you create a material.
b) Remove the stroke when no materials in the material list. The stroke is removed and cannot be recovered.

Some months ago, when you remove a material, all strokes assigned were removed, but now are assigned to the next material, but here we haven't materials.

What option do you like more?

@Antonio Vazquez (antoniov) we should have a default (internal) material to be used in these cases. Hiding the strokes is a bad solution in my opinion.

See Material defmaterial; and init_def_material in material.c.

I'm working in a different the strokes with Edit Lines only and Pink color (as missing textures).

A test file with all materials:

And after deleting one material.