Blender will not start if referencing bpy.context.scene.render.fps with expression in startup file #89046

Closed
opened 2021-06-11 02:04:50 +02:00 by Joshua Worley · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.63

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-19 16:30, hash: 0456223cde
Worked: Unsure if ever worked

Short description of error
Saving the startup file with an expression referencing bpy.context.scene.render.fps disallows Blender to start. If it's not the startup file, the .blend file can be loaded just fine. Tested with the shader editor only, as well as only that attribute. Other drivers or attributes referenced may potentially reproduce the behavior.

Exact steps for others to reproduce the error

  • Start Blender
  • Create new material
  • Enter shader editor for material
  • Create a new node (in this case we'll make a Value)
  • Drive the value via the expression #frame/bpy.context.scene.render.fps
  • Save Startup File
  • Restart Blender
  • Blender won't start
  • Blender won't even start if you try to load a .blend directly
  • Delete startup file

Blender will start

Extra Notes
After frustratingly trying to figure out what was causing my Blender to crash on startup, I did not test other variables. I would assume that referencing anything in bpy.context.scene would cause the issue, but I'm not sure. The #frame may not be necessary in the example above, but that was my exact input to make the startup fail.

blender.crash.txt
BadStartup.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.63 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-19 16:30, hash: `0456223cde` Worked: Unsure if ever worked **Short description of error** Saving the startup file with an expression referencing `bpy.context.scene.render.fps` disallows Blender to start. If it's *not* the startup file, the .blend file can be loaded just fine. Tested with the shader editor only, as well as only that attribute. Other drivers or attributes referenced may potentially reproduce the behavior. **Exact steps for others to reproduce the error** - Start Blender - Create new material - Enter shader editor for material - Create a new node (in this case we'll make a Value) - Drive the value via the expression `#frame/bpy.context.scene.render.fps` - Save Startup File - Restart Blender - Blender won't start - Blender won't even start if you try to load a .blend directly - Delete startup file # Blender will start **Extra Notes** After frustratingly trying to figure out what was causing my Blender to crash on startup, I did not test other variables. I would assume that referencing anything in `bpy.context.scene` would cause the issue, but I'm not sure. The `#frame` may not be necessary in the example above, but that was my exact input to make the startup fail. [blender.crash.txt](https://archive.blender.org/developer/F10173484/blender.crash.txt) [BadStartup.blend](https://archive.blender.org/developer/F10173485/BadStartup.blend)
Author

Added subscriber: @Toxijuice-3

Added subscriber: @Toxijuice-3
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

2.93.0 Beta, branch: master, commit date: 2021-05-19 16:30, hash: 0456223cde

Thanks for the report.

Not tested yet but is the case same for 2.93.0LTS? Can you check with that? (https://www.blender.org/download/releases/2-93/)

Also if crash reappears in 2.93.0 then make sure to attach crash logs (refer: https://docs.blender.org/manual/en/latest/troubleshooting/crash.html)

>2.93.0 Beta, branch: master, commit date: 2021-05-19 16:30, hash: 0456223cde Thanks for the report. Not tested yet but is the case same for 2.93.0LTS? Can you check with that? (https://www.blender.org/download/releases/2-93/) Also if crash reappears in 2.93.0 then make sure to attach crash logs (refer: https://docs.blender.org/manual/en/latest/troubleshooting/crash.html)
Author

Sure thing. Problem also occurs for 2.93.0 LTS.
I've attached crash file as well as a .blend file that should be okay to open normally, but cause the crash if set as startup file.

Also, no crash log for this one, but I can confirm that this occurs on the 3.0.0 Alpha, cycles-x branch, hash: 94caae981738

blender.crash.txt
BadStartup.blend

Sure thing. Problem also occurs for 2.93.0 LTS. I've attached crash file as well as a .blend file that should be okay to open normally, but cause the crash if set as startup file. Also, no crash log for this one, but I can confirm that this occurs on the **3.0.0 Alpha, cycles-x branch**, hash: **94caae981738** [blender.crash.txt](https://archive.blender.org/developer/F10173484/blender.crash.txt) [BadStartup.blend](https://archive.blender.org/developer/F10173485/BadStartup.blend)
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm.

1   take_gil    ceval_gil.h          229  0xe262f7e  
2   PyEval_RestoreThread     ceval.c              467  0xe26344e  
3   PyGILState_Ensure          pystate.c            1378 0xe29cf3c  
4   BPY_driver_exec              bpy_driver.c         493  0x470193d  
5   evaluate_driver_python     fcurve_driver.c      1263 0x3b9c092  
6   evaluate_driver         fcurve_driver.c      1300 0x3b9c13e  
7   evaluate_fcurve_driver         fcurve.c             2214 0x3b98ced  
8   calculate_fcurve        fcurve.c             2270 0x3b98e2f  
9   BKE_animsys_eval_driver      anim_sys.c           3443 0x3b165aa  
10  operator()                  deg_builder_nodes.cc 1159 0xe167764  
... <More>   

also getting:

Read blend: /T89046/BadStartup.blend
	BPY_driver_eval() - restricted access disallows name 'context', enable auto-execution to support

Error in Driver: The following Python expression failed:
	'frame/bpy.context.scene.render.fps'
Can confirm. ``` 1 take_gil ceval_gil.h 229 0xe262f7e 2 PyEval_RestoreThread ceval.c 467 0xe26344e 3 PyGILState_Ensure pystate.c 1378 0xe29cf3c 4 BPY_driver_exec bpy_driver.c 493 0x470193d 5 evaluate_driver_python fcurve_driver.c 1263 0x3b9c092 6 evaluate_driver fcurve_driver.c 1300 0x3b9c13e 7 evaluate_fcurve_driver fcurve.c 2214 0x3b98ced 8 calculate_fcurve fcurve.c 2270 0x3b98e2f 9 BKE_animsys_eval_driver anim_sys.c 3443 0x3b165aa 10 operator() deg_builder_nodes.cc 1159 0xe167764 ... <More> ``` also getting: ``` Read blend: /T89046/BadStartup.blend BPY_driver_eval() - restricted access disallows name 'context', enable auto-execution to support Error in Driver: The following Python expression failed: 'frame/bpy.context.scene.render.fps' ```

This issue was referenced by 497bc4d199

This issue was referenced by 497bc4d19977abc7b9e2c0f5024a23057e680954

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2021-08-12 07:01:20 +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#89046
No description provided.