Page MenuHome

Crash on toggling "hide object" if "disable object" is driver controlled.
Closed, ResolvedPublic

Description

System Information
Operating system: Linux Mint 18
Graphics card: 2x GTX 780 SLI

Blender Version
Broken: 2.80 (sub 35), branch: blender2.8, commit date: 2018-12-05 03:23, type: Release

Short description of error
Realising as i write this, that the issue is partially that the driver isn't hiding the object and therefore not making the eye icon disappear.

Exact steps for others to reproduce the error

  1. Create an cube
  2. Create a driver on the Disable Object icon in outliner
  3. Set driver to value 1 (so the object is disabled) Note the object doesn't disapear or eye icon close, like it should when you click with mouse.
  4. Click the eye icon - crashes

Details

Type
Bug

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.

Can confirm a crash [even though a bit different from what the report had as repro steps]:

  • add a driver for the viewport visibility [screen icon] driver value set to 1
  • click on eye icon


(note: for the crash to occur after file loading you have to click on the driven screen icon again [cube will then be visible?], then click the eye icon --> crash...)

we then assert here:
BLI_assert(base->object == object);
where base->object is the light, object is the cube...

1   raise					0x7ffff466a53f 
2   abort					0x7ffff4654895 
3   BKE_object_eval_flush_base_flags		object_update.c   442  0x2b38aa0      
4   std::__invoke_impl<void, void ( *&)(Depsgraph *, Scene *, int, Object *, int, bool), Depsgraph *, Scene *&, int&, Object *&, int&, bool&>		invoke.h          60   0x2f33697      
5   std::__invoke<void ( *&)(Depsgraph *, Scene *, int, Object *, int, bool), Depsgraph *, Scene *&, int&, Object *&, int&, bool&>			invoke.h          95   0x2f3241a      
6   std::_Bind<void ( *(std::_Placeholder<1>, Scene *, int, Object *, int, bool))(Depsgraph *, Scene *, int, Object *, int, bool)>::__call<void, Depsgraph *&&, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(std::tuple<Depsgraph *&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) functional        400  0x2f3100e      
7   std::_Bind<void ( *(std::_Placeholder<1>, Scene *, int, Object *, int, bool))(Depsgraph *, Scene *, int, Object *, int, bool)>::operator()<Depsgraph *, void>(Depsgraph *&&) 	functional        484  0x2f2f2f9      
8   std::_Function_handler<void (Depsgraph *), std::_Bind<void ( *(std::_Placeholder<1>, Scene *, int, Object *, int, bool))(Depsgraph *, Scene *, int, Object *, int, bool)>>::_M_invoke(std::_Any_data const&, Depsgraph *&&)                                             std_function.h    297  0x2f2c873      
9   std::function<void (Depsgraph *)>::operator()(Depsgraph *) const		std_function.h    687  0x2f4443d      
10  DEG::deg_task_run_func							deg_eval.cc       95   0x2f43af1      
11  handle_local_queue								task.c            420  0x2f07ec9      
12  BLI_task_pool_work_and_wait							task.c            906  0x2f07ec9      
13  DEG::deg_evaluate_on_refresh						deg_eval.cc       334  0x2f44384      
14  DEG_evaluate_on_refresh							depsgraph_eval.cc 70   0x2f1cdf9      
15  BKE_scene_graph_update_tagged						scene.c           1438 0x2b8eda1      
16  wm_event_do_depsgraph							wm_event_system.c 336  0x1c6bdf5      
17  wm_event_do_refresh_wm_and_depsgraph					wm_event_system.c 361  0x1c6beda      
18  wm_event_do_notifiers							wm_event_system.c 519  0x1c6c629      
19  WM_main									wm.c              430  0x1c68156      
20  main									creator.c         521  0x1c62e45

@Dalai Felinto (dfelinto): could you check on this one?

This is tricky. And you can see it coming even before the crash (as in, the object visibility in the viewport should change, which it does not).

Basically the depsgraph is not rebuilt upon driving this value. The simpler way to test it is to just keyframe this value and go back and forth (and see the object doesn't hide):

@Sergey Sharybin (sergey) what do you say? I'm not sure we should allow users to animate either value (hide_screen, hide_render). But we kind of did it on 2.7.

Basically the depsgraph is not rebuilt upon driving this value

Not sure what exactly that means. Adding the driver or animation should tag relations for update and tag ID for recalc. There is some smartness in the keyframing to avoid too many tags of relations update, so that might be a point of failure.

@Dalai Felinto (dfelinto), after looking into the file i am not actually sure what is the best use of me there. Changing frames does update the icon, so animation system and such is run. Is it a batch caches which are to be invalidated?

I also can not reproduce the crash. Is it fixed somehow or am i missing some step?

@Sergey Sharybin (sergey) if you change the initial frame to frame 2, save and re-open you will see that the icon doesn't change upon change frame.
And crash still happens with original instructions and HEAD (rBc9df453ce70b).

@Dalai Felinto (dfelinto), please be more specific. I do see at least 2 files attached here. What are the exact files and steps to reproduce crash and missing update?

Also, how's the visibility issue in this report different from T58817 ?

Also, even on:

BKE_object_eval_flush_base_flags is not called upon frame change. Which I suppose it should.

@Dalai Felinto (dfelinto) i am not quite sure why BKE_object_eval_flush_base_flags() is needed here. The animation uses object's hide_viewport RNA property which is using restrictflag DNA member. How's that BKE_object_eval_flush_base_flags which operates on base->flag and object->base_flag supposed to get missing update fixed?

@Sergey Sharybin (sergey): How to reproduce the crash

  • Create an cube
  • Create a driver on the hide_screen in outliner
  • Set driver to value 1 (so the object is disabled)
  • Click the hide_viewport (eye icon) it crashes.