Crash on toggling "hide object" if "disable object" is driver controlled. #58888

Closed
opened 2018-12-06 20:56:15 +01:00 by Jonathan Mafi · 20 comments

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
**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
Author

Added subscriber: @JonathanMafi

Added subscriber: @JonathanMafi

#59863 was marked as duplicate of this issue

#59863 was marked as duplicate of this issue

#59875 was marked as duplicate of this issue

#59875 was marked as duplicate of this issue
Member

Added subscribers: @dfelinto, @lichtwerk

Added subscribers: @dfelinto, @lichtwerk
Dalai Felinto was assigned by Philipp Oeser 2018-12-07 12:38:58 +01:00
Member

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
    #58888.blend
    (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

@dfelinto: could you check on this one?

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 [#58888.blend](https://archive.blender.org/developer/F5869536/T58888.blend) (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 ``` @dfelinto: could you check on this one?
Dalai Felinto removed their assignment 2018-12-21 13:42:41 +01:00
Sergey Sharybin was assigned by Dalai Felinto 2018-12-21 13:42:41 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

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):

deg-animated-hidden.blend

@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.

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): [deg-animated-hidden.blend](https://archive.blender.org/developer/F6025446/deg-animated-hidden.blend) @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.

> 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.

@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?

@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 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 (c9df453ce7).

@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 (c9df453ce7).

@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 #58817 ?

@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 #58817 ?

Also, even on:

deg-animated-hidden.blend

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

Also, even on: [deg-animated-hidden.blend](https://archive.blender.org/developer/F6025446/deg-animated-hidden.blend) BKE_object_eval_flush_base_flags is not called upon frame change. Which I suppose it should.

@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?

@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: 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.
@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.

Added subscriber: @zdrapekk

Added subscriber: @zdrapekk

Added subscriber: @Khemadeva

Added subscriber: @Khemadeva

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Drivers/animation on visibility should work now with the fix for #56635 (Driver/Keyframes on object visibility do not update viewport).

Drivers/animation on visibility should work now with the fix for #56635 (Driver/Keyframes on object visibility do not update viewport).

Added subscriber: @jcbize

Added subscriber: @jcbize
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#58888
No description provided.