Fix #111212: Error running search if cursor is outside Blender window #111254
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111254
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ChrisLend:fix_main_window_search_crash"
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?
Fix the python poll function in
NewGeometryNodeGroupTool
so that itdoes not error if the mouse is outside of the blender window.
Pressing F3 to call the search menu when the cursor is outside the Blender window causes
CTX_wm_area(C)
to return anullptr
which results in an error message in the console from theNewGeometryNodeGroupTool
poll function ingeometry_nodes.py
. This PR updates that function to handle this situation by testing for lack ofcontext.space_data
.Fix #111212: Crash when running search in non-active main windowto Fix #111212: Crash when running search while cursor is outside Blender windowHey @ChrisLend, thanks for working on this.
The comment doesn't look quite right as the minimum to reproduce this error is to have a single window, and active, but then press F3 while your mouse is outside of that window. So doesn't require multiple windows or to have anything inactive.
Your fix works to stop the exception, but there is still an error shown in the console from the NewGeometryNodeGroupTool python poll function:
Note that C/C++ always does short-circuit evaluation, which can simplify the code a bit. A solution that seems to fix everything could look like this:
@Harley fixed the Geometry node tool as well
Works Great!
Yikes! Only saw this after committing
56781c80b7
and scrolling over the report again - too easy to miss PR attachments on Gitea... My fix does the same in effect, just a bit more elegant I'd say. Feel free to commit the node tool fix included here, that should be committed separately anyway (and looks fine).Yours looks like it would fix the reported error, in that it will work (and return false) if the ScrArea is null, as we get when the mouse is outside the window. However, it appears to reverse the current test there, changing from !SPACE_GRAPH to SPACE_GRAPH. From the comment above it looks like it meant to return false if in graph editor so that a more specific operator can do this instead.
Good catch, thanks! Clearly weekend time o/ (Committed
211d631428
)@ChrisLend
As noted above,
main
now contains a working fix forscreen_ops.cc
in place. So we're hoping that you can update this PR to include only the changes togeometry_nodes.py
and then merge without need for further approval - Julian said "looks fine".Thanks!
Fix #111212: Crash when running search while cursor is outside Blender windowto Fix #111212: Error when running search while cursor is outside Blender windowFix #111212: Error when running search while cursor is outside Blender windowto Fix #111212: Error running search if cursor is outside Blender window@ChrisLend
The issue that this PR originally was addressing was fixed in
56781c80b7
. The remaining change is a bit too unrelated to the original issue, and I don't want to just retitle since we'll still have a funny history.Instead I will make a new PR for the change to geometry_nodes.py and merge with you as author. Then I'll close this one.
Committed the remaining part of this solution in
468584f5e7
Closing this as mentioned earlier.
Committed the remaining part of this solution in
468584f5e7
Closing this as mentioned earlier.
Pull request closed