Crash on Back to Previous #64045

Closed
opened 2019-05-01 00:44:25 +02:00 by ChristopherAnderssarian · 7 comments

System Information
Operating system: Microsoft Windows 7
GPU: ASUS Strix Radeon Vega 64
CPU: Intel(R) Core(TM) i7-5960X
RAM: 32.0 GB
Full System Information: Here

Blender Version

Broken: 2.80, blender-2.80.0-git.546e20f5a2c0-windows64
Worked:

Short description of error

Pressing back to previous crashes Blender when saved for a inactive workspace on load.

Steps for others to reproduce the crash

  • Open .blend

  • Switch to Motion Tracking workspace

  • Click and Crash

Back to Previous.blend

Exact steps for others to reproduce the error from scratch

(not the same as the attached file)

  • Open 2.79

  • {key shift} + {key LMB} a window to pop a duplicate out

  • Change editor type to Info

  • Move Info to top and add Info to bottom

  • Maximize the top Info editor

  • Close the popped out window

  • Save the file

  • Open in 2.80

  • Goto 'Default.001'

  • Crash on Back to Previous

Related reading: {#57655}

Strangely enough:
blender-2.80.0-git.a372e5e426e4-windows64
crashes instantly, where as:
blender-2.80.0-git.a372e5e426e4-windows32
takes half a second to crash...

**System Information** Operating system: Microsoft Windows 7 GPU: ASUS Strix Radeon Vega 64 CPU: Intel(R) Core(TM) i7-5960X RAM: 32.0 GB Full System Information: [Here ](https://developer.blender.org/p/Christopher_Anderssarian/) **Blender Version** Broken: 2.80, `blender-2.80.0-git.546e20f5a2c0-windows64` Worked: **Short description of error** Pressing back to previous crashes Blender when saved for a inactive workspace on load. **Steps for others to reproduce the crash** - Open .blend - Switch to Motion Tracking workspace - Click and Crash [Back to Previous.blend](https://archive.blender.org/developer/F6996509/Back_to_Previous.blend) **Exact steps for others to reproduce the error from scratch** (not the same as the attached file) - Open 2.79 - {key shift} + {key LMB} a window to pop a duplicate out - Change editor type to Info - Move Info to top and add Info to bottom - Maximize the top Info editor - Close the popped out window - Save the file - Open in 2.80 - Goto 'Default.001' - Crash on Back to Previous *Related reading: {#57655}* Strangely enough: `blender-2.80.0-git.a372e5e426e4-windows64` crashes instantly, where as: `blender-2.80.0-git.a372e5e426e4-windows32` takes half a second to crash...

Added subscriber: @ChristopherAnderssarian

Added subscriber: @ChristopherAnderssarian

Added subscriber: @Smjert

Added subscriber: @Smjert

OS: ArchLinux

I've tested with a Debug build (commit 60e71cba5b) and I get a crash/assert as soon as I switch to the Motion Tracking workspace:

- 0  0x00007ffff042e82f in raise () from /usr/lib/libc.so.6
- 1  0x00007ffff0419672 in abort () from /usr/lib/libc.so.6
- 2  0x00005555585f4d69 in ED_workspace_change (workspace_new=0x7fffc14f4a08, C=0x7fffe3e63208, wm=0x7fffc0592c08, win=0x7fffc0fdac88) at /home/smjert/Development/blender-git/blender/source/blender/editors/screen/workspace_edit.c:168
- 3  0x0000555557b84805 in WM_window_set_active_workspace (C=0x7fffe3e63208, win=0x7fffc0fdac88, workspace=0x7fffc14f4a08) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_window.c:2331
- 4  0x0000555557b4c6d9 in wm_event_do_notifiers (C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:426
- 5  0x0000555557b476ca in WM_main (C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm.c:421
#6  0x00005555574aaeb8 in main (argc=1, argv=0x7fffffffe358) at /home/smjert/Development/blender-git/blender/source/creator/creator.c:500

That assert seems to conflict with the comment of the previously called function, screen_change_prepare, which states that the returned screen may not always equal to screen_new.

With a Release build (with debug symbols), this is the stack trace I get if I switch to the Motion Tracking workspace and then click Back to Previous:

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x00005555561b93d1 in ctx_data_get (C=C@entry=0x7fffe3e63208, member=member@entry=0x555557e9b155 "scene", result=result@entry=0x7fffffffdfe0) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:342
342	      ret = cb(C, member, result);
(gdb) bt
#0  0x00005555561b93d1 in ctx_data_get (C=C@entry=0x7fffe3e63208, member=member@entry=0x555557e9b155 "scene", result=result@entry=0x7fffffffdfe0)
    at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:342
#1  0x00005555561b96c0 in ctx_data_pointer_verify (C=C@entry=0x7fffe3e63208, member=member@entry=0x555557e9b155 "scene", pointer=pointer@entry=0x7fffffffe030)
    at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:376
- 2  0x00005555561ba03c in ctx_data_pointer_verify (pointer=0x7fffffffe030, member=0x555557e9b155 "scene", C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:952
- 3  CTX_data_scene (C=C@entry=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:952
- 4  0x0000555556a8a3f4 in ED_region_do_draw (C=C@entry=0x7fffe3e63208, ar=ar@entry=0x7fffde47a848) at /home/smjert/Development/blender-git/blender/source/blender/editors/screen/area.c:618
- 5  0x00005555565a1da2 in wm_draw_window_offscreen (stereo=false, win=0x7fffc13bd408, C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:596
- 6  wm_draw_window (win=0x7fffc13bd408, C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:732
- 7  wm_draw_update (C=C@entry=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:895
- 8  0x000055555659f600 in WM_main (C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm.c:424
- 9  0x0000555556199803 in main (argc=1, argv=0x7fffffffe388) at /home/smjert/Development/blender-git/blender/source/creator/creator.c:500
OS: ArchLinux I've tested with a Debug build (commit 60e71cba5b0) and I get a crash/assert as soon as I switch to the Motion Tracking workspace: ``` - 0 0x00007ffff042e82f in raise () from /usr/lib/libc.so.6 - 1 0x00007ffff0419672 in abort () from /usr/lib/libc.so.6 - 2 0x00005555585f4d69 in ED_workspace_change (workspace_new=0x7fffc14f4a08, C=0x7fffe3e63208, wm=0x7fffc0592c08, win=0x7fffc0fdac88) at /home/smjert/Development/blender-git/blender/source/blender/editors/screen/workspace_edit.c:168 - 3 0x0000555557b84805 in WM_window_set_active_workspace (C=0x7fffe3e63208, win=0x7fffc0fdac88, workspace=0x7fffc14f4a08) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_window.c:2331 - 4 0x0000555557b4c6d9 in wm_event_do_notifiers (C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:426 - 5 0x0000555557b476ca in WM_main (C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm.c:421 #6 0x00005555574aaeb8 in main (argc=1, argv=0x7fffffffe358) at /home/smjert/Development/blender-git/blender/source/creator/creator.c:500 ``` That assert seems to conflict with the comment of the previously called function, screen_change_prepare, which states that the returned screen may not always equal to screen_new. With a Release build (with debug symbols), this is the stack trace I get if I switch to the Motion Tracking workspace and then click Back to Previous: ``` Thread 1 "blender" received signal SIGSEGV, Segmentation fault. 0x00005555561b93d1 in ctx_data_get (C=C@entry=0x7fffe3e63208, member=member@entry=0x555557e9b155 "scene", result=result@entry=0x7fffffffdfe0) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:342 342 ret = cb(C, member, result); (gdb) bt #0 0x00005555561b93d1 in ctx_data_get (C=C@entry=0x7fffe3e63208, member=member@entry=0x555557e9b155 "scene", result=result@entry=0x7fffffffdfe0) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:342 #1 0x00005555561b96c0 in ctx_data_pointer_verify (C=C@entry=0x7fffe3e63208, member=member@entry=0x555557e9b155 "scene", pointer=pointer@entry=0x7fffffffe030) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:376 - 2 0x00005555561ba03c in ctx_data_pointer_verify (pointer=0x7fffffffe030, member=0x555557e9b155 "scene", C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:952 - 3 CTX_data_scene (C=C@entry=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/blenkernel/intern/context.c:952 - 4 0x0000555556a8a3f4 in ED_region_do_draw (C=C@entry=0x7fffe3e63208, ar=ar@entry=0x7fffde47a848) at /home/smjert/Development/blender-git/blender/source/blender/editors/screen/area.c:618 - 5 0x00005555565a1da2 in wm_draw_window_offscreen (stereo=false, win=0x7fffc13bd408, C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:596 - 6 wm_draw_window (win=0x7fffc13bd408, C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:732 - 7 wm_draw_update (C=C@entry=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:895 - 8 0x000055555659f600 in WM_main (C=0x7fffe3e63208) at /home/smjert/Development/blender-git/blender/source/blender/windowmanager/intern/wm.c:424 - 9 0x0000555556199803 in main (argc=1, argv=0x7fffffffe388) at /home/smjert/Development/blender-git/blender/source/creator/creator.c:500 ```

I'm unfamiliar with this code, but it seems to me that there are some issues in setting what's the correct screen and keep it in sync with all the place that information is saved (plus there's some weirdness added).

So when opening the file the screen is "screenA", then when switching to the Motion Tracking workspace:

  • ED_workspace_change() is called. There initially screenOld is = "screenA", screenNew is = "screenB".
  • screen_change_prepare() (workspace_edit.c:167) is called and since screenNew is a maximized screen, it searches the parent which should be in the normal state; then returns it and sets it to screenNew. screenNew is now = "screenC".
  • screen_change_update() (workspace_edit.c:187) is called, which in turn calls CTX_wm_window_set() which sets a screen to the context, but that screen is not "screenC", it's "screenB" instead (which supposedly is correct because it's the fullscreen one).
  • screen_change_update() continue and calls BKE_screen_view3d_scene_sync(), passing a screen, which though is "screenC" this time.

So till here what I see is that the new created layout expects "screenB" (which is the fullscreen one) to be set, which it is in the context, but not through BKE_screen_view3d_scene_sync().

Then I removed the assert that the debug build was hitting, to see if I could understand more.
Doing that, nothing crashes when switching to the Motion Tracking workspace, but when I click Back to previous, another assert is hit.
This time it's in screen_edit.c:1181 in the ED_screen_state_toggle() function.

Here it supposedly have to switch back to normal screen ("screenC"), but when it retrieves the normal screen from the screen area, doing sa->full, that screen is actually "screenB", which is the one in fullscreen.
The current screen, taken with WM_window_get_active_screen() is correctly "screenB".

I also tried to track where the screen area sa was taken from, and I ended up in fullscreen_back_exec(), where it takes a screen from the context; that screen is "screenB".
Then it searches inside the screen areas of the screen and it returns the first one that has sa->full set, which for some reason it's itself.

So I "think" there's a initial mistake with setting the screen through BKE_screen_view3d_scene_sync(), but then when the previous button is clicked the screen area holds "strange" information inside.

Hope this is helpful somehow for a patch, I kind of have finished my time looking into this, and I'm not 100% sure what has to be set where.

I'm unfamiliar with this code, but it seems to me that there are some issues in setting what's the correct screen and keep it in sync with all the place that information is saved (plus there's some weirdness added). So when opening the file the screen is "screenA", then when switching to the Motion Tracking workspace: - `ED_workspace_change()` is called. There initially screenOld is = "screenA", screenNew is = "screenB". - `screen_change_prepare() (workspace_edit.c:167)` is called and since screenNew is a maximized screen, it searches the parent which should be in the normal state; then returns it and sets it to screenNew. screenNew is now = "screenC". - `screen_change_update() (workspace_edit.c:187)` is called, which in turn calls `CTX_wm_window_set()` which sets a screen to the context, but that screen is not "screenC", it's "screenB" instead (which supposedly is correct because it's the fullscreen one). - `screen_change_update()` continue and calls `BKE_screen_view3d_scene_sync()`, passing a screen, which though is "screenC" this time. So till here what I see is that the new created layout expects "screenB" (which is the fullscreen one) to be set, which it is in the context, but not through `BKE_screen_view3d_scene_sync()`. Then I removed the assert that the debug build was hitting, to see if I could understand more. Doing that, nothing crashes when switching to the Motion Tracking workspace, but when I click Back to previous, another assert is hit. This time it's in `screen_edit.c:1181` in the `ED_screen_state_toggle()` function. Here it supposedly have to switch back to normal screen ("screenC"), but when it retrieves the normal screen from the screen area, doing `sa->full`, that screen is actually "screenB", which is the one in fullscreen. The current screen, taken with `WM_window_get_active_screen()` is correctly "screenB". I also tried to track where the screen area `sa` was taken from, and I ended up in `fullscreen_back_exec()`, where it takes a screen from the context; that screen is "screenB". Then it searches inside the screen areas of the screen and it returns the first one that has `sa->full` set, which for some reason it's itself. So I "think" there's a initial mistake with setting the screen through BKE_screen_view3d_scene_sync(), but then when the previous button is clicked the screen area holds "strange" information inside. Hope this is helpful somehow for a patch, I kind of have finished my time looking into this, and I'm not 100% sure what has to be set where.
Julian Eisel was assigned by Sebastian Parborg 2019-05-02 12:02:10 +02:00

This issue was referenced by 94a064c0e9

This issue was referenced by 94a064c0e95871cd23fd6208f56f4e016a418327
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Two notes:

  • This bug seems to have been there since 2.5, I think since 6634ed9a87. (Testing 2.5 Alpha, the issue is present there.) In 2.8 it was quite difficult to replicate without the given .blend file.
  • There's still an issue remaining for 2.8 here: Before clicking "Back to previous", the fullscreen of the newly activated Motion Tracking workspace is corrupt. Except of the global bars, no redraw happens, all regions are regarded as hidden. Checked a bit but not sure if I'll have enough time to fix this. It seems the fullscreen area vertices aren't scaled correctly, making it too small for any regions.
Two notes: * This bug seems to have been there since 2.5, I think since 6634ed9a87. (Testing 2.5 Alpha, the issue is present there.) In 2.8 it was quite difficult to replicate without the given .blend file. * There's still an issue remaining for 2.8 here: Before clicking "Back to previous", the fullscreen of the newly activated Motion Tracking workspace is corrupt. Except of the global bars, no redraw happens, all regions are regarded as hidden. Checked a bit but not sure if I'll have enough time to fix this. It seems the fullscreen area vertices aren't scaled correctly, making it too small for any regions.
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
4 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#64045
No description provided.