Crash when adding a new scene with empty #57390
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#57390
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 10
Blender Version
Broken: Blender 2.8 Alpha 2
70d73ff500
Short description of error
Blender crashes if you add an empty, then create a new scene. The crash occurs in buttons_context_compute when CTX_data_active_object returns null.
Exact steps for others to reproduce the error
Blender will crash
Added subscriber: @MalDuffin
I've added a fix for this, I just need to get permissions set up to push it to the repo.
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -647,7 +647,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
Added subscribers: @antoniov, @brecht, @lichtwerk
Can confirm this fixes the crash.
@MalDuffin : for maximum convenience, could you create a diff here ?
Regarding commit rights, see https://wiki.blender.org/wiki/Process/Commit_Rights.
Not sure though if there is a better fix for this [there might be an underlying issue still]
Even with the patch we are still getting an error from UI code:
So something is wrong with the buttons context when adding a "New" scene. We shouldnt actually be getting to this part of the code for a context without active object?
2.79 would have changed to the Scene context
BCONTEXT_SCENE
(and its relating panels) in Properties Editor automatically when you were in e.g. Object context. 2.8 however doesnt do this, it sticks the object context and its panels -- "Transform" etc.Might just be a refresh/notifier/messagebus thingie, havent looked deeper (will happily do so if the following want me to)
@antoniov: you've added the dependency on active object in that part of the code: have an idea?
@brecht: does the missing refresh (or whatever cause it actually is) ring a bell?
This special exception for the grease pencil icon should be removed, it seems to work fine without. It's wrong to base the icon on the object type, it is possible to pin just the grease pencil data without an object.
For the refresh issue, there is a problem in the context path computation in
buttons_context_compute()
and the various functions that it calls. It should not useCTX_data_scene
,CTX_data_view_layer
andCTX_data_active_object
, because that will read from the (previous) path with the old scene. Instead it should useWM_window_get_active_scene
andWM_window_get_active_view_layer
(and get the active object from that view layer too).@brecht: thanx for the explanation, let me see if I can put that together
The dependency to ob->type was a code I added, but testing now it's not needed as Brecht commented bcause the icon is get above.
@lichtwerk Do you want I remove this unneeded code?
I have removed the code related to object in commit:
bd7cb42f3d
D3866 should fix the refresh.
Noticed issues with greasepencil pinning [but will move that to a fresh report...]
This issue was referenced by
36b9ee1277
Changed status from 'Open' to: 'Resolved'