Page MenuHome

Blender 'randomly' crashes after a while
Closed, DuplicatePublic

Description

System Information
Operating system: Linux-5.8.0-7630-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.32.03

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-02 08:36, hash: rB356c62fe3226
Worked: (newest version of Blender that worked as expected)

Short description of error
Random crashes in a specific file. Often on trying to move the viewport. My wild guess is that it's something with the dependency graph.

I ran it through a debug build and here is where it crashes:

#0  0x000000000e36a1f6 in ghash_keyhash (key=0x7fffffffd580, gh=0x0) at /media/data/blender_guest/blender_master/source/blender/blenlib/intern/BLI_ghash.c:148
#1  ghash_lookup_entry (key=0x7fffffffd580, gh=0x0) at /media/data/blender_guest/blender_master/source/blender/blenlib/intern/BLI_ghash.c:427
#2  BLI_ghash_lookup (gh=0x0, key=0x7fffffffd580) at /media/data/blender_guest/blender_master/source/blender/blenlib/intern/BLI_ghash.c:805
#3  0x0000000003563711 in BKE_scene_get_depsgraph (scene=0x7fffbb0b2408, view_layer=0x7fff8ec76448) at /media/data/blender_guest/blender_master/source/blender/blenkernel/intern/scene.c:3462
#4  0x0000000003ce849c in DRW_cache_free_old_batches (bmain=0x7fff950cee08) at /media/data/blender_guest/blender_master/source/blender/draw/intern/draw_manager.c:994
#5  0x0000000004c21a5f in view3d_main_region_draw (C=0x7ffff470bee8, region=0x7fffba822e48) at /media/data/blender_guest/blender_master/source/blender/editors/space_view3d/view3d_draw.c:1626
#6  0x00000000044e3a46 in ED_region_do_draw (C=0x7ffff470bee8, region=0x7fffba822e48) at /media/data/blender_guest/blender_master/source/blender/editors/screen/area.c:558
#7  0x0000000003a0345b in wm_draw_window_offscreen (C=0x7ffff470bee8, win=0x7fffba973788, stereo=false) at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_draw.c:731
#8  0x0000000003a03a1d in wm_draw_window (C=0x7ffff470bee8, win=0x7fffba973788) at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_draw.c:872
#9  0x0000000003a04069 in wm_draw_update (C=0x7ffff470bee8) at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm_draw.c:1073
#10 0x0000000003a00694 in WM_main (C=0x7ffff470bee8) at /media/data/blender_guest/blender_master/source/blender/windowmanager/intern/wm.c:643
#11 0x00000000033eb805 in main (argc=1, argv=0x7fffffffe568) at /media/data/blender_guest/blender_master/source/creator/creator.c:522

Exact steps for others to reproduce the error
Don't know how to reproduce from scratch.
With the file:
Also no reliable trigger, but usually for me it crashes after about half a minute of doing anything.

Related Objects

Event Timeline

Looking at the code and the trace it seems as though scene->depsgraph_hash was null. The function BKE_scene_get_depsgraph makes sure that the scene has a view layer but just assumes that the depsgraph_hash exists. That is just stating the obvious though. The question is why that pointer was null.

There is a comment that suggests that this can be the case:

/* In some cases, e.g. when undo has to perform multiple steps at once, no depsgraph will be built so this pointer may be NULL. */

So the solution may be as simple as checking that scene->depsgraph_hash is not null or calling BKE_scene_ensure_depsgraph_hash. @Sergey Sharybin (sergey) any ideas?

@Falk David (filedescriptor) That does seem to be the case, see the ticket I've merged this one into. You might want to post your comment there as well.