Assertion triggered when opening a new file and "Load UI" is disabled in settings #109422
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#109422
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
Operating system: Linux-6.3.8-200.fc38.x86_64-x86_64-with-glibc2.37 64 Bits, WAYLAND UI
Graphics card: AMD Radeon Graphics (renoir, LLVM 16.0.5, DRM 3.52, 6.3.8-200.fc38.x86_64) AMD 4.6 (Core Profile) Mesa 23.1.2
Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-06-26 04:05, hash:
4a80d0b6d59a
Worked: (newest version of Blender that worked as expected)
Short description of error
Opening a new file triggers an assertion and crashes when "Load UI" is disabled
Exact steps for others to reproduce the error
Not able to reproduce on Windows.
Can reproduce on linux (XOrg).
Here it just hangs (I'm
RelWithDebInfo
so it probably went past the assertion and caused something else to break downstream).Seems to happen on Windows too.
Did it require anything extra or different from the instructions above?
No, nothing extra. Once you flip the User Preference and save, triggering is just a matter of File->New. The rect in question has dimensions
0,0,19,-25
and the assert fails because 19 (ymin) is > -25 (ymax)I see it! I had to delete my AppData config files though. Then on the next launch I asked it to create a New config (not migrated from 3.6). Then turned off "Load UI", File / New / General and I see the same error.
Edit: It is just the existence of a "startup.blend" that hid the error from me.
Haven't looked too deeply yet, but WM_check is checking to make sure everything is okay, ED_screen_refresh calls screen_geom_vertices_scale but the win has posx, posy, sizex, & sizey all zeros. That calls WM_window_screen_rect_calc which adjusts the screen for global areas and you get that negative ymax (probably because the Status Bar is shown) which causes the assert.
Oh, just to clarify, this issue is ONLY when selecting File / New. Opening existing files work fine.
Frankly I'm not sure of expected behavior in this case. Just because you have "Load UI" off do you really not want any window/editor changes if you select File / New / VFX? I would assume that "Load UI" is meant to apply to files you open not those that are newly created.
But this is is caused by:
32bbfbb06e
7ef8389dad
If there is no "startup.blend" and "Load UI" is turned off. When loading a new file
wm_file_read_setup_wm_finalize
callswm_clear_default_size
which clears the positions and sizes of the existing windows. But assuming that because "Load UI" is off we don't then load this data from the opened file, and then later WM_window_screen_rect_calc adjusts the zero-sized window to allow for the Statusbar and we assert on the negative vertical size.@mont29
File new is technically opening the startup.blend file, i guess screen rect calc should be skipped too when load ui is off ^^ the only problem is what happens when blender is just starting up hmm, because that also goes through similar code path
I cannot reproduce with current main... Tried fully renaming my
.config/blender
folder, set again the userpref, still no issue doing anyFile -> New
operation, no assert, no crash.Think this needs more specific repro steps?
@Harley From what I can find out with debugger stepping, this is the closest explanation. (I could be misinterpreting tho)
@mont29 I can still reproduce with the same step in the description and blender stops refreshing with 0% cpu, then if I drag the window to resize, the "Layout" layout becomes something like this (and I'm still able to interact with stuff that's displayed correctly)
Yes, it is quite specific.
This problem does not occur if you have a custom startup, so confirm that you don't have a "startup.blend" in C:\Users(username)\AppData\Roaming\Blender Foundation\Blender\4.0\config\
Launch Blender, ensure that "Load UI" is unchecked in Preferences and ensure that preferences are saved.
File / New / General. And you should get an assert if debugging.
In
wm_file_read_setup_wm_finalize
bothis_read_homefile
andis_factory_startup
are true sowm_clear_default_size
is called which sets the position and sizes of the current window to zero. Normally this is okay because it would be fixed from the values in the newly-loaded file. But here with "Load UI" off this stays at zeros. WM_check, ED_screens_init, ED_screen_refresh. Then screen_geom_vertices_scale subtracts the height of the status bar from the rect, which gives it negative size in WM_window_screen_rect_calc at BLI_rcti_is_valid.It isn't as easy as changing
wm_file_read_setup_wm_finalize
so that it does not clear the window if not load UI. This would mean it also would not be called at the initial launch of blender if load UI is off. It wasn't immediately clear to me how to differentiate between the initial load of blender and later loading.Am on linux, so config path for Blender here is
~/.config/blender/4.0/config
. but yes, renamed this, got first start popup on starting Blender, updated and saved userprefs, doFile -> New
, and get absolutely no crash or assert...Could be a difference in GHOST implementations (windows and linux Wayland crashing, but Linux X11 being fine ?).
Anyway, can someone try this one-liner and report whether it fixes the issue or not? thanks!
That fixes it perfectly! Although that also requires removing an assert that would be hit when doing File / New /
What are the chances of getting this commit to master soon?
Thank you.