Page MenuHome

Blender crashes on opening "famous" demo files
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 411.31

Blender Version
Broken: version: 2.80 (sub 58), branch: master, commit date: 2019-04-23 07:16, hash: rB532f4366a571

Short description of error

Blender crashes on opening following (well known) 2.8 demo files:

wanderer.blend
race_spaceship.blend

Exact steps for others to reproduce the error

Open above files
Sometimes opening theese files seem to be successfull but if one tries to move/rotate view, it crashes

Error messages (starting blender with files given in cmd line):

wanderer:

Read prefs: C:\Users\peter\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
found bundled python: E:\DATA\PROG\blender-2.8-git\build_windows_Release_x64_vc15_Release\bin\Release\2.80\python
Read blend: E:\Dropbox\Prog\Dropbox_Blender\DEMOS\2.8\wanderer.blend
WARN (bke.customdata): e:\data\prog\blender-2.8-git\blender\source\blender\blenkernel\intern\customdata.c:4177 CustomData_verify_versions: .blend file read: removing a data layer that should not have been written
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF6F1ADC56D
Module : E:\DATA\PROG\blender-2.8-git\build_windows_Release_x64_vc15_Release\bin\Release\blender.exe

race_spaceship:

Read prefs: C:\Users\peter\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
found bundled python: E:\DATA\PROG\blender-2.8-git\build_windows_Release_x64_vc15_Release\bin\Release\2.80\python
Read blend: E:\Dropbox\Prog\Dropbox_Blender\DEMOS\2.8\race_spaceship.blend
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF6F1ADC56D
Module : E:\DATA\PROG\blender-2.8-git\build_windows_Release_x64_vc15_Release\bin\Release\blender.exe

Event Timeline

Jacques Lucke (JacquesLucke) triaged this task as Confirmed, High priority.Apr 23 2019, 1:28 PM
std::vector<DEG::IDNode*, std::allocator<DEG::IDNode*> >::size(const std::vector<DEG::IDNode*, std::allocator<DEG::IDNode*> > * const this) (/usr/include/c++/7/bits/stl_vector.h:671)
DEG_iterator_objects_begin(BLI_Iterator * iter, DEGObjectIterData * data) (/home/jacques/blender-git/blender/source/blender/depsgraph/intern/depsgraph_query_iter.cc:237)
DRW_cache_free_old_batches(Main * bmain) (/home/jacques/blender-git/blender/source/blender/draw/intern/draw_manager.c:995)
view3d_main_region_draw(const bContext * C, ARegion * ar) (/home/jacques/blender-git/blender/source/blender/editors/space_view3d/view3d_draw.c:1454)
ED_region_do_draw(bContext * C, ARegion * ar) (/home/jacques/blender-git/blender/source/blender/editors/screen/area.c:558)
wm_draw_window_offscreen(bContext * C, wmWindow * win, _Bool stereo) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:596)
wm_draw_window(bContext * C, wmWindow * win) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:732)
wm_draw_update(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:895)
WM_main(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:424)
main(int argc, const char ** argv) (/home/jacques/blender-git/blender/source/creator/creator.c:500)

Seems to be related to new batch garbage collection.

void DRW_cache_free_old_batches(Main *bmain)
{
  Scene *scene;
  ViewLayer *view_layer;
  static int lasttime = 0;
  int ctime = (int)PIL_check_seconds_timer();

  if (U.vbotimeout == 0 || (ctime - lasttime) < U.vbocollectrate || ctime == lasttime) {
    return;
  }

  lasttime = ctime;

  for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
    for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
      Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, false);                          <--- The depsgraph is NULL

      /* TODO(fclem): This is not optimal since it iter over all dupli instances.
       * In this case only the source object should be tagged. */
      int iter_flags = DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET |
                       DEG_ITER_OBJECT_FLAG_VISIBLE | DEG_ITER_OBJECT_FLAG_DUPLI;

      DEG_OBJECT_ITER_BEGIN (depsgraph, ob, iter_flags) {
        DRW_batch_cache_free_old(ob, ctime);
      }
      DEG_OBJECT_ITER_END;
    }
  }
}

Dependency graph might be NULL for the view layers which were never visible. So it is matter of adding NULL pointer check.

Please fix this right away and launch the buildbots, a lot of users are going to run into this.

You are sooo fast ! This is awsome guys !!