Crash when using a linked background scene and a scene camera from another (local) scene #97262

Closed
opened 2022-04-12 04:42:58 +02:00 by Luke Graybill · 8 comments

System Information
Operating system: Windows-10-10.0.22593-SP0 64 Bits (actually Windows 11, but Blender auto-populated with Windows 10 info for some reason)
Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.20

Blender Version
Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: cc66d1020c

Short description of error
Blender crashes when using a linked scene (see attached bg.blend) as a background scene in scene 1, then creating a scene 2 that uses scene 1 as background and the scene camera from scene 1 without linking the camera into scene 2.

Here is the crash log: fg.crash.txt

This is hard to explain the setup, so I will try to use screenshots, and attach minimal .blend files that illustrate the problem.

  • A simple scene named "BG Scene" is saved in bg.blend:
{F12997195}
  • In a second file, fg.blend, everything has been removed except the camera and then the scene from bg.blend is linked in and set as the background scene for local "Scene 1":
{F12997212}
  • A second scene is added to fg.blend, called "Scene 2" and it is set to use the Camera from Scene 1 (which is not linked into Scene 2) and also to use Scene 1 as it's background scene:
{F12997219}

Saving and reopening fg.blend from this point on will produce a crash. If I repetitively attempt to open the file, eventually it'll open correctly maybe once after every 5 or 6 crashes.

Additionally, if I link the Camera from Scene 1 into Scene 2, the crash goes away:
image.png

Exact steps for others to reproduce the error

  1. Download attached bg.blend and fg.blend
  2. Open fg.blend, and observe crash.
  3. Very occasionally, it will load correctly without crashing, but subsequent loads (or File > Revert) will crash.

bg.blend

fg.blend

**System Information** Operating system: Windows-10-10.0.22593-SP0 64 Bits *(actually Windows 11, but Blender auto-populated with Windows 10 info for some reason)* Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.20 **Blender Version** Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: `cc66d1020c` **Short description of error** Blender crashes when using a linked scene (see attached bg.blend) as a background scene in scene 1, then creating a scene 2 that uses scene 1 as background and the scene camera from scene 1 without linking the camera into scene 2. Here is the crash log: [fg.crash.txt](https://archive.blender.org/developer/F12997235/fg.crash.txt) This is hard to explain the setup, so I will try to use screenshots, and attach minimal .blend files that illustrate the problem. - A simple scene named `"BG Scene"` is saved in `bg.blend`: ``` {F12997195} ``` - In a second file, `fg.blend`, everything has been removed except the camera and then the scene from `bg.blend` is linked in and set as the background scene for local `"Scene 1"`: ``` {F12997212} ``` - A second scene is added to `fg.blend`, called `"Scene 2"` and it is set to use the Camera from Scene 1 (which is not linked into Scene 2) and also to use Scene 1 as it's background scene: ``` {F12997219} ``` Saving and reopening `fg.blend` from this point on will produce a crash. If I repetitively attempt to open the file, eventually it'll open correctly maybe once after every 5 or 6 crashes. Additionally, if I link the Camera from Scene 1 into Scene 2, the crash goes away: ![image.png](https://archive.blender.org/developer/F12997229/image.png) **Exact steps for others to reproduce the error** 1. Download attached bg.blend and fg.blend 2. Open fg.blend, and observe crash. 3. Very occasionally, it will load correctly without crashing, but subsequent loads (or File > Revert) will crash. [bg.blend](https://archive.blender.org/developer/F12997232/bg.blend) [fg.blend](https://archive.blender.org/developer/F12997233/fg.blend)
Author

Added subscriber: @Luke.Coop

Added subscriber: @Luke.Coop
Member

Added subscribers: @lichtwerk, @PratikPB2123

Added subscribers: @lichtwerk, @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Thanks for the report. I can reproduce crash.

@lichtwerk hi, which project should be tagged here? #dependency_graph or #core ?

Stack trace:
blender.exe         :0x00007FF61FFC84F0  BKE_object_eval_eval_base_flags C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\object_update.c:411
blender.exe         :0x00007FF620214FD0  std::_Func_impl_no_alloc<<lambda_a91119d7f28e1e2f0bb371b7e2644610>,void,Depsgraph *>::_Do_call C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\functional:921
blender.exe         :0x00007FF62020C160  blender::deg::`anonymous namespace'::evaluate_node C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:104
blender.exe         :0x00007FF62020C110  blender::deg::`anonymous namespace'::deg_task_run_func C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:116
blender.exe         :0x00007FF620C7DAC0  BLI_task_pool_push C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\task_pool.cc:471
blender.exe         :0x00007FF62020C200  blender::deg::`anonymous namespace'::schedule_node_to_pool C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:63
blender.exe         :0x00007FF62020B9E0  blender::deg::`anonymous namespace'::schedule_children<void __cdecl(blender::deg::OperationNode *,i C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:283
blender.exe         :0x00007FF62020B9E0  blender::deg::`anonymous namespace'::schedule_children<void __cdecl(blender::deg::OperationNode *,i C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:290
blender.exe         :0x00007FF620C7DBE0  BLI_task_pool_work_and_wait C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\task_pool.cc:486
blender.exe         :0x00007FF62020BC90  blender::deg::deg_evaluate_on_refresh C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:385
blender.exe         :0x00007FF61FE68270  scene_graph_update_tagged C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\scene.cc:2597
blender.exe         :0x00007FF61FDAF050  wm_event_do_depsgraph C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:418
blender.exe         :0x00007FF61FD9DC30  wm_file_read_post C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_files.c:717
blender.exe         :0x00007FF61FD9BA70  WM_file_read C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_files.c:960
blender.exe         :0x00007FF61FD9B080  wm_open_mainfile_exec C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_files.c:2645
blender.exe         :0x00007FF61FDB4350  wm_operator_invoke C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:1389
blender.exe         :0x00007FF61FDB3A70  wm_operator_call_internal C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:1627
blender.exe         :0x00007FF61FDACC00  WM_operator_name_call_ptr_with_depends_on_cursor C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:1834
blender.exe         :0x00007FF6200E68A0  ui_apply_but_funcs_after C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:1008
blender.exe         :0x00007FF6200F5360  ui_popup_handler C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:11488
blender.exe         :0x00007FF61FDB2EC0  wm_handlers_do_intern C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:3097
blender.exe         :0x00007FF61FDB2520  wm_handlers_do C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:3219
blender.exe         :0x00007FF61FDAF1D0  wm_event_do_handlers C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:3788
blender.exe         :0x00007FF61FD99BD0  WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:626
blender.exe         :0x00007FF61FD95390  main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:552
blender.exe         :0x00007FF620D63FC4  __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
KERNEL32.DLL        :0x00007FFBE7B77020  BaseThreadInitThunk
ntdll.dll           :0x00007FFBE8402630  RtlUserThreadStart
Thanks for the report. I can reproduce crash. @lichtwerk hi, which project should be tagged here? #dependency_graph or #core ? ```lines=18 Stack trace: blender.exe :0x00007FF61FFC84F0 BKE_object_eval_eval_base_flags C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\object_update.c:411 blender.exe :0x00007FF620214FD0 std::_Func_impl_no_alloc<<lambda_a91119d7f28e1e2f0bb371b7e2644610>,void,Depsgraph *>::_Do_call C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\functional:921 blender.exe :0x00007FF62020C160 blender::deg::`anonymous namespace'::evaluate_node C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:104 blender.exe :0x00007FF62020C110 blender::deg::`anonymous namespace'::deg_task_run_func C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:116 blender.exe :0x00007FF620C7DAC0 BLI_task_pool_push C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\task_pool.cc:471 blender.exe :0x00007FF62020C200 blender::deg::`anonymous namespace'::schedule_node_to_pool C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:63 blender.exe :0x00007FF62020B9E0 blender::deg::`anonymous namespace'::schedule_children<void __cdecl(blender::deg::OperationNode *,i C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:283 blender.exe :0x00007FF62020B9E0 blender::deg::`anonymous namespace'::schedule_children<void __cdecl(blender::deg::OperationNode *,i C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:290 blender.exe :0x00007FF620C7DBE0 BLI_task_pool_work_and_wait C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenlib\intern\task_pool.cc:486 blender.exe :0x00007FF62020BC90 blender::deg::deg_evaluate_on_refresh C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\depsgraph\intern\eval\deg_eval.cc:385 blender.exe :0x00007FF61FE68270 scene_graph_update_tagged C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\scene.cc:2597 blender.exe :0x00007FF61FDAF050 wm_event_do_depsgraph C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:418 blender.exe :0x00007FF61FD9DC30 wm_file_read_post C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_files.c:717 blender.exe :0x00007FF61FD9BA70 WM_file_read C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_files.c:960 blender.exe :0x00007FF61FD9B080 wm_open_mainfile_exec C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_files.c:2645 blender.exe :0x00007FF61FDB4350 wm_operator_invoke C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:1389 blender.exe :0x00007FF61FDB3A70 wm_operator_call_internal C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:1627 blender.exe :0x00007FF61FDACC00 WM_operator_name_call_ptr_with_depends_on_cursor C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:1834 blender.exe :0x00007FF6200E68A0 ui_apply_but_funcs_after C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:1008 blender.exe :0x00007FF6200F5360 ui_popup_handler C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:11488 blender.exe :0x00007FF61FDB2EC0 wm_handlers_do_intern C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:3097 blender.exe :0x00007FF61FDB2520 wm_handlers_do C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:3219 blender.exe :0x00007FF61FDAF1D0 wm_event_do_handlers C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.c:3788 blender.exe :0x00007FF61FD99BD0 WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:626 blender.exe :0x00007FF61FD95390 main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:552 blender.exe :0x00007FF620D63FC4 __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 KERNEL32.DLL :0x00007FFBE7B77020 BaseThreadInitThunk ntdll.dll :0x00007FFBE8402630 RtlUserThreadStart ```

Added subscribers: @Sergey, @dr.sybren, @mont29

Added subscribers: @Sergey, @dr.sybren, @mont29

It should also most definitely be tagged as depsgraph issue...

I am not sure this setup should be allowed tbh (setting a scene to use a camera object that is not instanced in that scene). But if we want to support this, I guess depsgraph needs to be updated to properly deal with dependencies (would bet the crash is caused by the fact that current scene and its camera get evaluated before/in parallel with evaluation of the background scene?). Think this is something for @dr.sybren or @Sergey to check?

It should *also* most definitely be tagged as depsgraph issue... I am not sure this setup should be allowed tbh (setting a scene to use a camera object that is not instanced in that scene). But if we want to support this, I guess depsgraph needs to be updated to properly deal with dependencies (would bet the crash is caused by the fact that current scene and its camera get evaluated before/in parallel with evaluation of the background scene?). Think this is something for @dr.sybren or @Sergey to check?

This issue was referenced by 31b2b84b3c

This issue was referenced by 31b2b84b3c788bfae2ced046d05c39c56f8056f0

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sergey Sharybin self-assigned this 2022-04-14 14:58:52 +02:00
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
5 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#97262
No description provided.