Page MenuHome

Blender 2.8 not showing image as planes meshes, then crashing on render
Closed, ArchivedPublic

Description

System Information
Operating system:
Graphics card:

Blender Version
Broken:2.8 46ac288a9306

When rendering via the viewport the images as planes meshes don't appear before Blender crashes. Based on this blender file: (also from https://www.dropbox.com/s/zhlgcexryalhkvg/A-NC%20Learning%20Circle.blend?dl=0 )

Open Blender.
Select the mesh 352 in Brochures collection.
Switch to render in viewport
Notice that the mesh is not visible
Wait a short while and then blender will crash.

Based on the default startup or an attached .blend file (as simple as possible).

Details

Type
Bug

Event Timeline

Sebastian Parborg (zeddb) triaged this task as Needs Information from User priority.

I can not reproduce this on my end. The planes are shown (as pink because of missing textures, but show up fine if I assign images to them to) in rendered view.
And I do not get any crashes.

Can you see if you still have problems with the latest blender beta?

  1. textures are missing
  2. texture is jpg but trying to use alpha as factor.
Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Confirmed, Medium.

We have many missing data with that file (fonts it’d seem), but here on linux with current master I get a crash from drawcode when trying to open it, so will assign to @Clément Foucault (fclem) first.

Backtrace of the issue:

==8313==ERROR: AddressSanitizer: heap-use-after-free on address 0x6100007bc654 at pc 0x5639b44e88e8 bp 0x7ffff3e85230 sp 0x7ffff3e85228
READ of size 4 at 0x6100007bc654 thread T0
    #0 0x5639b44e88e7 in GPU_texture_bound_number /home/i74700deb64/blender/__work__/src/source/blender/gpu/intern/gpu_texture.c:1352
    #1 0x5639b4590b72 in bind_texture /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager_exec.c:904
    #2 0x5639b4592cb4 in draw_shgroup /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager_exec.c:1105
    #3 0x5639b4594e2d in drw_draw_pass_ex /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager_exec.c:1329
    #4 0x5639b459525c in DRW_draw_pass /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager_exec.c:1369
    #5 0x5639b465bb1b in workbench_deferred_draw_scene /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_deferred.c:1107
    #6 0x5639b4651a68 in workbench_solid_draw_background /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/solid_mode.c:65
    #7 0x5639b45743a9 in drw_engines_draw_background /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1078
    #8 0x5639b457663f in DRW_draw_render_loop_ex /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1533
    #9 0x5639b4575c28 in DRW_draw_view /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1433
    #10 0x5639b28e44c6 in view3d_draw_view /home/i74700deb64/blender/__work__/src/source/blender/editors/space_view3d/view3d_draw.c:1332
    #11 0x5639b28e45be in view3d_main_region_draw /home/i74700deb64/blender/__work__/src/source/blender/editors/space_view3d/view3d_draw.c:1353
    #12 0x5639b34ebf12 in ED_region_do_draw /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/area.c:508
    #13 0x5639b25bd418 in wm_draw_window_offscreen /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:573
    #14 0x5639b25bdf3b in wm_draw_window /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:705
    #15 0x5639b25be971 in wm_draw_update /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:859
    #16 0x5639b25b6b5a in WM_main /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm.c:424
    #17 0x5639b25ac0b5 in main /home/i74700deb64/blender/__work__/src/source/creator/creator.c:505
    #18 0x7fc07e2e009a in __libc_start_main ../csu/libc-start.c:308
    #19 0x5639b25ab5f9 in _start (/home/i74700deb64/blender/__work__/build_master_debug/bin/blender+0x356e5f9)

0x6100007bc654 is located 20 bytes inside of 184-byte region [0x6100007bc640,0x6100007bc6f8)
freed by thread T0 here:
    #0 0x7fc0890a6fd0 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe8fd0)
    #1 0x5639b5f09d20 in MEM_lockfree_freeN /home/i74700deb64/blender/__work__/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:156
    #2 0x5639b44e9f1a in GPU_texture_free /home/i74700deb64/blender/__work__/src/source/blender/gpu/intern/gpu_texture.c:1490
    #3 0x5639b44b23a3 in gpu_free_image_immediate /home/i74700deb64/blender/__work__/src/source/blender/gpu/intern/gpu_draw.c:1137
    #4 0x5639b44b2483 in GPU_free_image /home/i74700deb64/blender/__work__/src/source/blender/gpu/intern/gpu_draw.c:1152
    #5 0x5639b4c343d8 in BKE_image_free_buffers_ex /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/image.c:255
    #6 0x5639b4c34454 in BKE_image_free_buffers /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/image.c:267
    #7 0x5639b4c47568 in image_load_image_file /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/image.c:3697
    #8 0x5639b4c4aaaa in image_acquire_ibuf /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/image.c:4159
    #9 0x5639b4c4b34b in BKE_image_acquire_ibuf /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/image.c:4227
    #10 0x5639b466c425 in workbench_material_shgroup_uniform /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_materials.c:261
    #11 0x5639b4658fc1 in get_or_create_material_data /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_deferred.c:826
    #12 0x5639b465a385 in workbench_deferred_solid_cache_populate /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_deferred.c:930
    #13 0x5639b4651a16 in workbench_solid_cache_populate /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/solid_mode.c:52
    #14 0x5639b4574190 in drw_engines_cache_populate /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1043
    #15 0x5639b45764c8 in DRW_draw_render_loop_ex /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1510
    #16 0x5639b4575c28 in DRW_draw_view /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1433
    #17 0x5639b28e44c6 in view3d_draw_view /home/i74700deb64/blender/__work__/src/source/blender/editors/space_view3d/view3d_draw.c:1332
    #18 0x5639b28e45be in view3d_main_region_draw /home/i74700deb64/blender/__work__/src/source/blender/editors/space_view3d/view3d_draw.c:1353
    #19 0x5639b34ebf12 in ED_region_do_draw /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/area.c:508
    #20 0x5639b25bd418 in wm_draw_window_offscreen /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:573
    #21 0x5639b25bdf3b in wm_draw_window /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:705
    #22 0x5639b25be971 in wm_draw_update /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:859
    #23 0x5639b25b6b5a in WM_main /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm.c:424
    #24 0x5639b25ac0b5 in main /home/i74700deb64/blender/__work__/src/source/creator/creator.c:505
    #25 0x7fc07e2e009a in __libc_start_main ../csu/libc-start.c:308

previously allocated by thread T0 here:
    #0 0x7fc0890a7538 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9538)
    #1 0x5639b5f0a1a5 in MEM_lockfree_callocN /home/i74700deb64/blender/__work__/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:274
    #2 0x5639b44e47e6 in GPU_texture_from_bindcode /home/i74700deb64/blender/__work__/src/source/blender/gpu/intern/gpu_texture.c:905
    #3 0x5639b44ad0e1 in GPU_texture_from_blender /home/i74700deb64/blender/__work__/src/source/blender/gpu/intern/gpu_draw.c:289
    #4 0x5639b466c57f in workbench_material_shgroup_uniform /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_materials.c:265
    #5 0x5639b4658fc1 in get_or_create_material_data /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_deferred.c:826
    #6 0x5639b465a385 in workbench_deferred_solid_cache_populate /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/workbench_deferred.c:930
    #7 0x5639b4651a16 in workbench_solid_cache_populate /home/i74700deb64/blender/__work__/src/source/blender/draw/engines/workbench/solid_mode.c:52
    #8 0x5639b4574190 in drw_engines_cache_populate /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1043
    #9 0x5639b45764c8 in DRW_draw_render_loop_ex /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1510
    #10 0x5639b4575c28 in DRW_draw_view /home/i74700deb64/blender/__work__/src/source/blender/draw/intern/draw_manager.c:1433
    #11 0x5639b28e44c6 in view3d_draw_view /home/i74700deb64/blender/__work__/src/source/blender/editors/space_view3d/view3d_draw.c:1332
    #12 0x5639b28e45be in view3d_main_region_draw /home/i74700deb64/blender/__work__/src/source/blender/editors/space_view3d/view3d_draw.c:1353
    #13 0x5639b34ebf12 in ED_region_do_draw /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/area.c:508
    #14 0x5639b25bd418 in wm_draw_window_offscreen /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:573
    #15 0x5639b25bdf3b in wm_draw_window /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:705
    #16 0x5639b25be971 in wm_draw_update /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_draw.c:859
    #17 0x5639b25b6b5a in WM_main /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm.c:424
    #18 0x5639b25ac0b5 in main /home/i74700deb64/blender/__work__/src/source/creator/creator.c:505
    #19 0x7fc07e2e009a in __libc_start_main ../csu/libc-start.c:308

The crash happens because the same ImBuf is acquired using 2 different image users. The second acquire frees all GPU textures for that given Image. I have no clue to why that happens. @Brecht Van Lommel (brecht) any idea? Is this because of the depsgraph / Image sequence hack ? Bisecting lead to this commit rBc6ca842e234024b0276e5b294455ed2dbbe998e0 but I think it only expose the symptom rather than creating the problem.

Clément Foucault (fclem) lowered the priority of this task from Confirmed, Medium to Needs Information from User.Jul 3 2019, 6:47 PM

I cannot reproduce the crash when opening the file anymore. So hopefully this is fixed.

About the original bug report, we need a version of the test file with the the texture packed.

Bastien Montagne (mont29) closed this task as Archived.Tue, Jul 23, 3:58 PM

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.