Page MenuHome

Changing to Solid View crashes Blender
Closed, ResolvedPublic

Description

Blender Version
Broken: c58de2f632e

Short description of error
In specific files switching between lookdev/rendered view back to solid view causes Blender to crash. If not then once other options are used such as wireframe or xray.

Example file in spring svn: /media/data/spring/lib/props/tree_falling.blend
(Revision 1462)

Event Timeline

Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 50.Aug 16 2018, 7:40 PM

@Clément Foucault (fclem), can you look at this one? It's not clear to me how the ownership of this draw data works.

Here's a simplified .blend file, just switch to solid mode and it should crash.

==25250== Invalid read of size 8
==25250==    at 0x1DD757A: DRW_drawdata_get (draw_manager.c:815)
==25250==    by 0x1DD75EA: DRW_drawdata_ensure (draw_manager.c:832)
==25250==    by 0x1E2C32F: get_or_create_material_data.isra.3 (workbench_deferred.c:607)
==25250==    by 0x1E2D5CC: workbench_deferred_solid_cache_populate (workbench_deferred.c:768)
==25250==    by 0x1DD6E90: drw_engines_cache_populate (draw_manager.c:956)
==25250==    by 0x1DD8B84: DRW_draw_render_loop_ex (draw_manager.c:1440)
==25250==    by 0x18669B6: view3d_draw_view (view3d_draw.c:1259)
==25250==    by 0x18669B6: view3d_main_region_draw (view3d_draw.c:1280)
==25250==    by 0x1A9F550: ED_region_do_draw (area.c:529)
==25250==    by 0x177CAA0: wm_draw_window_offscreen (wm_draw.c:537)
==25250==    by 0x177CAA0: wm_draw_window (wm_draw.c:663)
==25250==    by 0x177CAA0: wm_draw_update (wm_draw.c:817)
==25250==    by 0x177AC2F: WM_main (wm.c:418)
==25250==    by 0x16EC874: main (creator.c:525)
==25250==  Address 0x37bbd810 is 32 bytes inside a block of size 4,104 free'd
==25250==    at 0xA7ABD3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25250==    by 0x22165C5: mempool_chunk_free (BLI_mempool.c:281)
==25250==    by 0x22165C5: mempool_chunk_free_all (BLI_mempool.c:290)
==25250==    by 0x22165C5: BLI_mempool_destroy (BLI_mempool.c:773)
==25250==    by 0x1DD5988: DRW_instance_data_free (draw_instance_data.c:305)
==25250==    by 0x1DD5988: DRW_instance_data_list_free_unused (draw_instance_data.c:412)
==25250==    by 0x1DD5D31: drw_viewport_cache_resize (draw_manager.c:456)
==25250==    by 0x1DD8B4C: DRW_draw_render_loop_ex (draw_manager.c:1570)
==25250==    by 0x18669B6: view3d_draw_view (view3d_draw.c:1259)
==25250==    by 0x18669B6: view3d_main_region_draw (view3d_draw.c:1280)
==25250==    by 0x1A9F550: ED_region_do_draw (area.c:529)
==25250==    by 0x177CAA0: wm_draw_window_offscreen (wm_draw.c:537)
==25250==    by 0x177CAA0: wm_draw_window (wm_draw.c:663)
==25250==    by 0x177CAA0: wm_draw_update (wm_draw.c:817)
==25250==    by 0x177AC2F: WM_main (wm.c:418)
==25250==    by 0x16EC874: main (creator.c:525)
==25250==  Block was alloc'd at
==25250==    at 0xA7AAB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25250==    by 0x2400157: MEM_lockfree_mallocN (mallocn_lockfree_impl.c:318)
==25250==    by 0x2215BDE: mempool_chunk_alloc (BLI_mempool.c:204)
==25250==    by 0x2215BDE: BLI_mempool_alloc (BLI_mempool.c:361)
==25250==    by 0x1DD76EC: DRW_drawdata_ensure (draw_manager.c:851)
==25250==    by 0x1E2C32F: get_or_create_material_data.isra.3 (workbench_deferred.c:607)
==25250==    by 0x1E2D5CC: workbench_deferred_solid_cache_populate (workbench_deferred.c:768)
==25250==    by 0x1DD6E90: drw_engines_cache_populate (draw_manager.c:956)
==25250==    by 0x1DD8B84: DRW_draw_render_loop_ex (draw_manager.c:1440)
==25250==    by 0x18669B6: view3d_draw_view (view3d_draw.c:1259)
==25250==    by 0x18669B6: view3d_main_region_draw (view3d_draw.c:1280)
==25250==    by 0x1A9F550: ED_region_do_draw (area.c:529)
==25250==    by 0x177CAA0: wm_draw_window_offscreen (wm_draw.c:537)
==25250==    by 0x177CAA0: wm_draw_window (wm_draw.c:663)
==25250==    by 0x177CAA0: wm_draw_update (wm_draw.c:817)
==25250==    by 0x177AC2F: WM_main (wm.c:418)
==25250== Invalid read of size 8
==25250==    at 0x1DD77C0: DRW_drawdata_free (draw_manager.c:876)
==25250==    by 0x1FD0112: BKE_object_free (object.c:468)
==25250==    by 0x227D9EC: DEG::deg_free_copy_on_write_datablock(ID*) (deg_eval_copy_on_write.cc:1004)
==25250==    by 0x2283075: DEG::IDDepsNode::destroy() (deg_node_id.cc:157)
==25250==    by 0x2268684: DEG::Depsgraph::clear_id_nodes_conditional(std::function<bool (ID_Type)> const&) (depsgraph.cc:345)
==25250==    by 0x2268739: DEG::Depsgraph::clear_id_nodes() (depsgraph.cc:356)
==25250==    by 0x2268818: DEG::Depsgraph::~Depsgraph() (depsgraph.cc:108)
==25250==    by 0x2268DDD: DEG_graph_free (depsgraph.cc:577)
==25250==    by 0x220D816: ghash_free_cb (BLI_ghash.c:650)
==25250==    by 0x220E8BD: BLI_ghash_free (BLI_ghash.c:1016)
==25250==    by 0x201F068: BKE_scene_free_ex (scene.c:496)
==25250==    by 0x1F81844: BKE_libblock_free_ex (library_remap.c:989)
==25250==  Address 0x37bbd818 is 40 bytes inside an unallocated block of size 4,176 in arena "client"