Crash: Top bar disappears when loading factory settings, lead to crashes, and re-appears on resize #55072

Closed
opened 2018-05-15 13:52:05 +02:00 by CodeManX · 10 comments
Member

Blender Version
Broken: ca8e9c881f (blender2.8 HEAD)

Short description of error
The new top bar vanishes temporarily if you load the factory settings. Any window or region resize event seems to trigger an redraw with the top bar back again.

Exact steps for others to reproduce the error

  1. Start Blender 2.8
  2. File > Load Factory Settings
  3. Top bar is missing
  4. Click and drag the right-hand side tool shelf border in 3D View to resize it
  5. Top bar shows up again

Note: T shortcut to toggle the tool shelf does not make it re-appear. But you can also resize the Blender window to bring it back.

Video: https://youtu.be/kboaP3dtie8

**Blender Version** Broken: ca8e9c881f (blender2.8 HEAD) **Short description of error** The new top bar vanishes temporarily if you load the factory settings. Any window or region resize event seems to trigger an redraw with the top bar back again. **Exact steps for others to reproduce the error** 1. Start Blender 2.8 2. File > Load Factory Settings 3. Top bar is missing 4. Click and drag the right-hand side tool shelf border in 3D View to resize it 5. Top bar shows up again Note: T shortcut to toggle the tool shelf does **not** make it re-appear. But you can also resize the Blender window to bring it back. Video: https://youtu.be/kboaP3dtie8
Author
Member

Added subscriber: @CodeManX

Added subscriber: @CodeManX

Added subscribers: @JulianEisel, @dfelinto

Added subscribers: @JulianEisel, @dfelinto
Julian Eisel was assigned by Dalai Felinto 2018-05-15 14:06:52 +02:00

@JulianEisel can you take a look at that? I personally run into this multiple times a day.

@JulianEisel can you take a look at that? I personally run into this multiple times a day.

Even worse this leads to a crash.

How to reproduce it:

  • Open Blender.
  • From within Blender load factory startup.
  • Resize the vertical size of the outliner.

BLI_assert failed: //source/blender/gpu/intern/gpu_viewport.c:524, GPU_viewport_draw_to_screen(), at 'h == BLI_rcti_size_y(rect) + 1'

Fullbacktrace: P685

Even worse this leads to a crash. How to reproduce it: * Open Blender. * From within Blender load factory startup. * Resize the vertical size of the outliner. `BLI_assert failed: //source/blender/gpu/intern/gpu_viewport.c:524, GPU_viewport_draw_to_screen(), at 'h == BLI_rcti_size_y(rect) + 1'` Fullbacktrace: [P685](https://archive.blender.org/developer/P685.txt)
Dalai Felinto changed title from Top bar disappears when loading factory settings, re-appears on resize to Crash: Top bar disappears when loading factory settings, lead to crashes, and re-appears on resize 2018-05-16 10:23:12 +02:00

Added subscriber: @brecht

Added subscriber: @brecht
Member

For the records, this is pretty high on my priority list. I'm planning to look into it asap. Unfortunatly that may only be after the weekend though.

For the records, this is pretty high on my priority list. I'm planning to look into it asap. Unfortunatly that may only be after the weekend though.
Member

This fixes the issue:
P697: Fix for #55072

diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 10db5e4aea5..4208f3f6233 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -802,13 +802,15 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
 
        /* exception for bg mode, we only need the screen context */
        if (!G.background) {
+               WM_window_set_dpi(win);
+
+               /* Get window pixels __after__ updating window DPI! */
                const int window_size_x = WM_window_pixels_x(win);
                const int window_size_y = WM_window_pixels_y(win);
                const int screen_size_x = WM_window_screen_pixels_x(win);
                const int screen_size_y = WM_window_screen_pixels_y(win);
 
                /* header size depends on DPI, let's verify */
-               WM_window_set_dpi(win);
                screen_refresh_headersizes();
 
                screen_vertices_scale(win, screen, window_size_x, window_size_y, screen_size_x, screen_size_y);

However, the status-bar work I've been doing also fixes it. Since this work is ready to be merged into blender2.8 (@brecht already checked on it), I'll do this merge instead of fixing this issue separately. Planning to do so today or tomorrow.

This fixes the issue: [P697: Fix for #55072](https://archive.blender.org/developer/P697.txt) ```diff diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 10db5e4aea5..4208f3f6233 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -802,13 +802,15 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win) /* exception for bg mode, we only need the screen context */ if (!G.background) { + WM_window_set_dpi(win); + + /* Get window pixels __after__ updating window DPI! */ const int window_size_x = WM_window_pixels_x(win); const int window_size_y = WM_window_pixels_y(win); const int screen_size_x = WM_window_screen_pixels_x(win); const int screen_size_y = WM_window_screen_pixels_y(win); /* header size depends on DPI, let's verify */ - WM_window_set_dpi(win); screen_refresh_headersizes(); screen_vertices_scale(win, screen, window_size_x, window_size_y, screen_size_x, screen_size_y); ``` However, the status-bar work I've been doing also fixes it. Since this work is ready to be merged into `blender2.8` (@brecht already checked on it), I'll do this merge instead of fixing this issue separately. Planning to do so today or tomorrow.

I think it's generally good to commit such bugfixes separately if possible, so that when something breaks or changes it's easier to find the cause.

I think it's generally good to commit such bugfixes separately if possible, so that when something breaks or changes it's easier to find the cause.

This issue was referenced by 909d548d56

This issue was referenced by 909d548d56f13a7b86d2859ce985f88e9b14921d
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#55072
No description provided.