Page MenuHome

Crash entering edit mode for "Object Font" instance mesh
Confirmed, NormalPublicBUG


System Information
Operating system: Linux-5.3.0-23-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: rBf1aa4d18d49d
Also broken: 2.83 alpha (2020-01-11) "blender-2.83-01d9a2f71b56-linux-glibc217-x86_64"
Worked: 2.80 (tested on Linux and macOS)

Short description of error
Crash on entering edit mode for mesh used as "Object Font" instance.

When using an object as "Object Font" for character instancing, entering edit mode for the instanced mesh crashes Blender.
I'm happy to inform you that the issue is really easy to reproduce! :)

I also noticed that if temporarily removing the "Object Font" property (object name prefix) while editing the instanced mesh object, the crash is kind of avoided, but when setting the "Object Font" property to the correct prefix again, the old mesh, before edits, is shown. Entering edit mode at this point crashes Blender again. This seems to be a related issue, but it's difficult to investigate as long as Blender crashes while exploring.

Exact steps for others to reproduce the error
Super quick reproducer:

  1. Open the attached .blend file
  2. Press Tab (enter "edit mode")

Re-create from scratch:

  1. Start with a new file
  2. Create a mesh object
  3. Name mesh object "font.a"
  4. Create a text object
  5. Enable Object -> Instancing -> Verts
  6. Under text/font properties enter "font." as Object Font
  7. Select object "font.a"
  8. Enter mesh edit mode (Tab)

Please tell me if there is anything else I can do to help. Thank you!

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Sun, Jan 12, 5:43 PM

Confirm crash in DRW_mesh_batch_cache_create_requested()

/* Sanity check. */
if ((me->edit_mesh != NULL) && (ob->mode & OB_MODE_EDIT)) {
  BLI_assert(me->edit_mesh->mesh_eval_final != NULL);
>	blender.exe!DRW_mesh_batch_cache_create_requested(Object * ob, Mesh * me, const Scene * scene, const bool is_paint_mode, const bool use_hide) Line 1069	C
 	blender.exe!drw_batch_cache_generate_requested(Object * ob) Line 3427	C
 	blender.exe!ghash_free_cb(GHash * gh, void(*)(void *) keyfreefp, void(*)(void *) valfreefp) Line 651	C
 	blender.exe!BLI_ghash_free(GHash * gh, void(*)(void *) keyfreefp, void(*)(void *) valfreefp) Line 1028	C
 	blender.exe!drw_duplidata_free() Line 807	C
 	blender.exe!DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * ar, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1575	C
 	blender.exe!DRW_draw_view(const bContext * C) Line 1486	C
 	blender.exe!view3d_draw_view(const bContext * C, ARegion * ar) Line 1533	C
 	blender.exe!view3d_main_region_draw(const bContext * C, ARegion * ar) Line 1558	C
 	blender.exe!ED_region_do_draw(bContext * C, ARegion * ar) Line 539	C
 	blender.exe!wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 628	C
 	blender.exe!wm_draw_window(bContext * C, wmWindow * win) Line 766	C
 	blender.exe!wm_draw_update(bContext * C) Line 946	C
 	blender.exe!WM_main(bContext * C) Line 424	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 520	C

The drawing code expects me->edit_mesh->mesh_eval_final to have been created by BKE_object_handle_data_update.

I'm not sure how this is meant to work with drw_batch_cache_generate_requested, relates to rB1d92888ee8e8abf7ba40c1875dedc84e0138be2c, assigning to @Clément Foucault (fclem).

Campbell Barton (campbellbarton) changed the subtype of this task from "Report" to "Bug".Mon, Jan 13, 8:47 AM

@Sergey Sharybin (sergey) I think it is a depsgraph or COW issue more than a drawing issue. In normal vertex instancing, the eval Mesh and EditMesh are shared accross all the instances and the edited object.

But here the dupli object is not sharing the mesh data and seems to be using an incomplete mesh copy.

editbmesh_build_data > obedit 0x7fe2d8fd8a08 em 0x7fe294632e08 mesh_eval_final 0x7fe28680a008
DRW_mesh_batch_cache_create_requested > me 0x7fe2974bc608 em 0x7fe294632e08
DRW_mesh_batch_cache_create_requested > me 0x7fe2942f0608 em 0x7fe29463b008 (dupli object)
Writing: /tmp/blender-crash.crash.txt

Do you have an idea of what could be wrong?

"Object Font" duplication also crashes with Curve objects in general:

(try typing a "b" here...)