Fix #124161: Interacting During Startup Can Crash Blender #124258

Open
Harley Acheson wants to merge 1 commits from Harley/blender:Fix24161 into blender-v4.2-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

If you left-button drag your mouse while Blender is loading (on the
empty grey screen) it can cause crashes in File Browser, Asset Browser,
and Outliner. This PR just adds error checking to avoid this in every
way I could make this occur.

If you left-button drag your mouse while Blender is loading (on the empty grey screen) it can cause crashes in File Browser, Asset Browser, and Outliner. This PR just adds error checking to avoid this in every way I could make this occur.
Harley Acheson added 1 commit 2024-07-05 20:18:42 +02:00
If you left-button drag your mouse while Blender is loading (on the
empty grey screen) it can cause crashes in File Browser, Asset Browser,
and Outliner. This PR just adds error checking to avoid this in every
way I could make this occur.
Harley Acheson added this to the Module: User Interface project 2024-07-05 20:18:58 +02:00
Harley Acheson requested review from Hans Goudey 2024-07-05 20:19:05 +02:00
Hans Goudey reviewed 2024-07-08 14:41:23 +02:00
Hans Goudey left a comment
Member

It seems like it might be better to check for this at a higher level, like in the event handling code. The specific operators that are fixed in this PR don't look very special, so I'm guessing the problem would exist in other areas too.

It seems like it might be better to check for this at a higher level, like in the event handling code. The specific operators that are fixed in this PR don't look very special, so I'm guessing the problem would exist in other areas too.
Hans Goudey requested review from Hans Goudey 2024-07-08 14:41:37 +02:00
Member

Can't recreate this (didn't try that hard), but I wonder if this works (and if it's a good way to go about it).

Can't recreate this (didn't try that hard), but I wonder if [this](https://pablovazquez.art/paste/#XQAAAQATCAAAAAAAAAAyGkkJwvwRfVDeCk9H2SRoLFgzPWJpxeINRgxFqCtNibsN+okSNS2BCMdY36XhNoG61ctbRPeaeC2QNsHce144v6jo7PzG5qiqBK4li9CHfBrF7Ds4bPfIK7hJszoUg3XAw9gHj8EbJWZHMfCcavMfqH3/My0wYm+NLJpDH9YdbENh3L+AEZCzcuuKTL1AgsfyWyfwfH+/oKxYO7jiAwvnZJax6Okdl17BjD9Djh4NGE4kx15FeHDckB9d98VJR5fWU4kwDeG2XLL0KA9r1BcTTKti3IJSpjz8yTEMlKYuxTKkwZQYAMRMzrlu7e2dpyI8qNsqD/D4+ToKTGhDbOAbQWhlVHbzIcMR496vauUdykROpQ4nKKjBeTHym7WeQSMWwXc/OXFOg/zHpaXROfpVUOesDvmt7tk52dNAzWs43nZnZ8VK4s8HsG6Cy5XFFWu2maMWMt5eG6RuEc3/MbQv8tzP+DCSpy0EEbug2tsh/MYMqgzjrkDmskp4BKdNDgLn/AZZtZzEFaTT8ghiK88RypVimjehmQrF0NUTyn093qkob6gJkdOVV2kti+L5ZrKcRR+TNP0vizX89Hvpwjn1Y6F6yU8RldgZrEe7/ss32L4aShHNlDI1KbQ4T0+I6NRi8l6wbu2ftvf7+FFEAJ9k8sMM7FdsOX+QFxhN99+3d26VL3qyqrPQDNxuKfUy2MdinPoBfEvr7+M0zDVxFsEPD4h4GvpVxVwo0TKdV7gZOB9MCt6YzhacYwsEtBg5/x7lavMwCP5TFs5WrxME6S2onZp2Q7cJ/6bGQiErDMb+/+oqSv58OG53brGkXogx9Zrv0xAYSEkQcknOJXtge3FV56INvpDGar8XC775DMCq0si2NLqMxP5803sCRzaJiiemB7vNABBWQqI4y98pxTHqFfnvNfhFrQToo1XdG7E4dfaEgSs737v/DGk0GIkW+u9vwQOUuvlJrfEAypuBF96pqe6dmI0xDvnrOBkO3OyuZ4wYVGy9T0yMSFurDiFi0cVsp/2msfY=) works (and if it's a good way to go about it).
Author
Member

@JulianEisel

I have gotten pretty good at recreating this - basically a drag selection during load - so will give your idea a check in main. This issue is fairly obscure, hard to reproduce, easy to avoid, and would have existed a long time.

@JulianEisel I have gotten pretty good at recreating this - basically a drag selection during load - so will give your idea a check in main. This issue is fairly obscure, hard to reproduce, easy to avoid, and would have existed a long time.
Author
Member

@JulianEisel - Can't recreate this (didn't try that hard)...

It is quite difficult to recreate. I just set my default layout so it contains just a File Browser, Asset Browser and Outliner. During startup - while it is still showing a grey screen - do left-mouse drags like for selection.

I wonder if this works (and if it's a good way to go about it).

The changes in area_query make sense. They do get hit during normal operation, which is great since we don't need to consider hidden regions there. So this is probably a good idea.

The change in wm_event_system.cc I couldn't get to hit no matter how hard I tried.

With that applied the errors in the complaint still occurred though. With File Browser we are in file_select_exec with sfile->layout being nullptr. In Outliner it can be various things, but all I could repeat just now was outliner_shows_mode_column with space_outliner.runtime.tree_display as nullptr.

> @JulianEisel - Can't recreate this (didn't try that hard)... It is quite difficult to recreate. I just set my default layout so it contains just a File Browser, Asset Browser and Outliner. During startup - while it is still showing a grey screen - do left-mouse drags like for selection. > I wonder if this works (and if it's a good way to go about it). The changes in area_query make sense. They do get hit during normal operation, which is great since we don't need to consider hidden regions there. So this is probably a good idea. The change in wm_event_system.cc I couldn't get to hit no matter how hard I tried. With that applied the errors in the complaint still occurred though. With File Browser we are in `file_select_exec` with sfile->layout being nullptr. In Outliner it can be various things, but all I could repeat just now was `outliner_shows_mode_column` with space_outliner.runtime.tree_display as nullptr.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u Fix24161:Harley-Fix24161
git checkout Harley-Fix24161
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
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 & 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
Asset System
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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 Assignees
3 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#124258
No description provided.