Page MenuHome

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


Blender Version
Broken: rBca8e9c881f28 (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.


Event Timeline

codemanx created this task.May 15 2018, 1:52 PM
Dalai Felinto (dfelinto) triaged this task as Confirmed, Medium priority.
Dalai Felinto (dfelinto) moved this task from Backlog to Workspaces on the BF Blender: 2.8 board.

@Julian Eisel (Severin) 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

Dalai Felinto (dfelinto) renamed this task 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.May 16 2018, 10:23 AM
Dalai Felinto (dfelinto) updated the task description. (Show Details)

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.

This fixes the issue:

1diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
2index 10db5e4aea5..4208f3f6233 100644
3--- a/source/blender/editors/screen/screen_edit.c
4+++ b/source/blender/editors/screen/screen_edit.c
5@@ -802,13 +802,15 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
7 /* exception for bg mode, we only need the screen context */
8 if (!G.background) {
9+ WM_window_set_dpi(win);
11+ /* Get window pixels __after__ updating window DPI! */
12 const int window_size_x = WM_window_pixels_x(win);
13 const int window_size_y = WM_window_pixels_y(win);
14 const int screen_size_x = WM_window_screen_pixels_x(win);
15 const int screen_size_y = WM_window_screen_pixels_y(win);
17 /* header size depends on DPI, let's verify */
18- WM_window_set_dpi(win);
19 screen_refresh_headersizes();
21 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 Van Lommel (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.