Crash entering edit mode for "Object Font" instance mesh #73045

Closed
opened 2020-01-11 15:49:27 +01:00 by Peter Lönnebring · 12 comments

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: f1aa4d18d4
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:

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

blender-crash.blend

Re-create from scratch:

  • Start with a new file
  • Create a mesh object
  • Name mesh object "font.a"
  • Create a text object
  • Enable Object -> Instancing -> Verts
  • Under text/font properties enter "font." as Object Font
  • Select object "font.a"
  • Enter mesh edit mode (Tab)

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

**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: `f1aa4d18d4` 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: - Open the attached .blend file - Press Tab (enter "edit mode") [blender-crash.blend](https://archive.blender.org/developer/F8269878/blender-crash.blend) Re-create from scratch: - Start with a new file - Create a mesh object - Name mesh object "font.a" - Create a text object - Enable Object -> Instancing -> Verts - Under text/font properties enter "font." as Object Font - Select object "font.a" - Enter mesh edit mode (Tab) Please tell me if there is anything else I can do to help. Thank you!

Added subscriber: @peter.lonnebring

Added subscriber: @peter.lonnebring

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

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
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 ```

Added subscribers: @fclem, @ideasman42

Added subscribers: @fclem, @ideasman42
Clément Foucault was assigned by Campbell Barton 2020-01-13 08:47:09 +01:00

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 1d92888ee8, assigning to @fclem.

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 1d92888ee8, assigning to @fclem.

Added subscriber: @Sergey

Added subscriber: @Sergey

@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?

@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?
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

"Object Font" duplication also crashes with Curve objects in general:
T73045_curves.blend
(try typing a "b" here...)

"Object Font" duplication also crashes with Curve objects in general: [T73045_curves.blend](https://archive.blender.org/developer/F8279790/T73045_curves.blend) (try typing a "b" here...)

This issue was referenced by 0936f2f52c

This issue was referenced by 0936f2f52c584ba623ba6ec722d1581dea97f1f3

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#73045
No description provided.