Multi window measure crash #63694

Closed
opened 2019-04-18 11:38:20 +02:00 by ChristopherAnderssarian · 17 comments

Blender Version

Broken: e80cbdac33

Short description of error

Using Measuring tool on a project that has more than one window causes a crash.

Exact steps for others to reproduce the error

  • Open

  • Select Measure from a toolbar

  • Measure in 3D view

  • Crash

Multi Measure Crash.blend

Exact steps for others to reproduce the error from scratch

  • Factory Startup

  • Add New Workspace --> Layout

  • Window --> New Main Window

  • (In new window) switch to Layout.001

  • Measure in 3D View

  • Crash

**Blender Version** Broken: e80cbdac331a **Short description of error** Using Measuring tool on a project that has more than one window causes a crash. **Exact steps for others to reproduce the error** - Open - Select Measure from a toolbar - Measure in 3D view - Crash [Multi Measure Crash.blend](https://archive.blender.org/developer/F6956400/Multi_Measure_Crash.blend) **Exact steps for others to reproduce the error from scratch** - Factory Startup - Add New Workspace --> Layout - Window --> New Main Window - (In new window) switch to Layout.001 - Measure in 3D View - Crash

Added subscriber: @ChristopherAnderssarian

Added subscriber: @ChristopherAnderssarian

#64998 was marked as duplicate of this issue

#64998 was marked as duplicate of this issue

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Campbell Barton was assigned by Sebastian Parborg 2019-04-18 12:14:19 +02:00

Backtrace:

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x0000555557805cec in BLI_findindex (listbase=0x18, vlink=0x7fffdebf8dc8) at /home/zed/prog/blender/source/blender/blenlib/intern/listbase.c:619
warning: Source file is more recent than executable.
619	  link = listbase->first;
(gdb) bt
- 0  0x0000555557805cec in BLI_findindex (listbase=0x18, vlink=0x7fffdebf8dc8) at /home/zed/prog/blender/source/blender/blenlib/intern/listbase.c:619
- 1  0x0000555557bd8119 in wm_gizmogroup_gizmo_register (gzgroup=0x0, gz=0x7fffdebf8dc8)
    at /home/zed/prog/blender/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c:139
#2  0x0000555557bd6637 in wm_gizmo_register (gzgroup=0x0, gz=0x7fffdebf8dc8)
    at /home/zed/prog/blender/source/blender/windowmanager/gizmo/intern/wm_gizmo.c:145
#3  0x0000555557bd64d8 in WM_gizmo_new_ptr (gzt=0x7fffe32f5788, gzgroup=0x0, properties=0x0)
    at /home/zed/prog/blender/source/blender/windowmanager/gizmo/intern/wm_gizmo.c:102
- 4  0x0000555558567ed9 in ruler_item_add (gzgroup=0x0) at /home/zed/prog/blender/source/blender/editors/space_view3d/view3d_gizmo_ruler.c:145
- 5  0x000055555856a8db in view3d_ruler_add_invoke (C=0x7fffe3c58188, op=0x7fffcadfe8c8, event=0x7fffc63eb908)
    at /home/zed/prog/blender/source/blender/editors/space_view3d/view3d_gizmo_ruler.c:1063
#6  0x0000555557ba0c0c in wm_operator_invoke (C=0x7fffe3c58188, ot=0x7fffde9fb608, event=0x7fffc63eb908, properties=0x7fffffffdc30, reports=0x0,
    poll_only=false, use_last_properties=false) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:1401
#7  0x0000555557ba2beb in wm_handler_operator_call (C=0x7fffe3c58188, handlers=0x7fffca97df50, handler_base=0x7fffcada3a48, event=0x7fffc63eb908,
    properties=0x7fffffffdc30) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:2225
#8  0x0000555557ba37c2 in wm_handlers_do_intern (C=0x7fffe3c58188, event=0x7fffc63eb908, handlers=0x7fffca97df50)
    at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:2566
#9  0x0000555557ba44d3 in wm_handlers_do (C=0x7fffe3c58188, event=0x7fffc63eb908, handlers=0x7fffca97df50)
    at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:2826
- 10 0x0000555557ba5a4b in wm_event_do_handlers (C=0x7fffe3c58188) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:3257
- 11 0x0000555557b9923c in WM_main (C=0x7fffe3c58188) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm.c:418
#12 0x0000555557507daf in main (argc=1, argv=0x7fffffffe078) at /home/zed/prog/blender/source/creator/creator.c:500
Backtrace: ``` Thread 1 "blender" received signal SIGSEGV, Segmentation fault. 0x0000555557805cec in BLI_findindex (listbase=0x18, vlink=0x7fffdebf8dc8) at /home/zed/prog/blender/source/blender/blenlib/intern/listbase.c:619 warning: Source file is more recent than executable. 619 link = listbase->first; (gdb) bt - 0 0x0000555557805cec in BLI_findindex (listbase=0x18, vlink=0x7fffdebf8dc8) at /home/zed/prog/blender/source/blender/blenlib/intern/listbase.c:619 - 1 0x0000555557bd8119 in wm_gizmogroup_gizmo_register (gzgroup=0x0, gz=0x7fffdebf8dc8) at /home/zed/prog/blender/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c:139 #2 0x0000555557bd6637 in wm_gizmo_register (gzgroup=0x0, gz=0x7fffdebf8dc8) at /home/zed/prog/blender/source/blender/windowmanager/gizmo/intern/wm_gizmo.c:145 #3 0x0000555557bd64d8 in WM_gizmo_new_ptr (gzt=0x7fffe32f5788, gzgroup=0x0, properties=0x0) at /home/zed/prog/blender/source/blender/windowmanager/gizmo/intern/wm_gizmo.c:102 - 4 0x0000555558567ed9 in ruler_item_add (gzgroup=0x0) at /home/zed/prog/blender/source/blender/editors/space_view3d/view3d_gizmo_ruler.c:145 - 5 0x000055555856a8db in view3d_ruler_add_invoke (C=0x7fffe3c58188, op=0x7fffcadfe8c8, event=0x7fffc63eb908) at /home/zed/prog/blender/source/blender/editors/space_view3d/view3d_gizmo_ruler.c:1063 #6 0x0000555557ba0c0c in wm_operator_invoke (C=0x7fffe3c58188, ot=0x7fffde9fb608, event=0x7fffc63eb908, properties=0x7fffffffdc30, reports=0x0, poll_only=false, use_last_properties=false) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:1401 #7 0x0000555557ba2beb in wm_handler_operator_call (C=0x7fffe3c58188, handlers=0x7fffca97df50, handler_base=0x7fffcada3a48, event=0x7fffc63eb908, properties=0x7fffffffdc30) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:2225 #8 0x0000555557ba37c2 in wm_handlers_do_intern (C=0x7fffe3c58188, event=0x7fffc63eb908, handlers=0x7fffca97df50) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:2566 #9 0x0000555557ba44d3 in wm_handlers_do (C=0x7fffe3c58188, event=0x7fffc63eb908, handlers=0x7fffca97df50) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:2826 - 10 0x0000555557ba5a4b in wm_event_do_handlers (C=0x7fffe3c58188) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm_event_system.c:3257 - 11 0x0000555557b9923c in WM_main (C=0x7fffe3c58188) at /home/zed/prog/blender/source/blender/windowmanager/intern/wm.c:418 #12 0x0000555557507daf in main (argc=1, argv=0x7fffffffe078) at /home/zed/prog/blender/source/creator/creator.c:500 ```

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Basically WM_gizmomap_group_find(gzmap, view3d_gzgt_ruler_id) is returning NULL in view3d_ruler_add_invoke() in this case.

Basically `WM_gizmomap_group_find(gzmap, view3d_gzgt_ruler_id)` is returning NULL in `view3d_ruler_add_invoke()` in this case.

Added subscribers: @peticel, @ideasman42, @brecht, @Gvgeo-1, @Leon95

Added subscribers: @peticel, @ideasman42, @brecht, @Gvgeo-1, @Leon95

@ChristopherAnderssarian can you still reproduce it from scratch?

Although I can reproduce with your file, I cannot reproduce it if I start from a blank file.
Which steps did you take to create it? (there are many ways of creating a new window).

@ChristopherAnderssarian can you still reproduce it from scratch? Although I can reproduce with your file, I cannot reproduce it if I start from a blank file. Which steps did you take to create it? (there are many ways of creating a new window).

Note: I could not reproduce even in the old Blender mentioned in the report (5d8030b8f3). So it would definitively help to get the exact steps to reproduce it in a new file.

*Note: I could not reproduce even in the old Blender mentioned in the report (5d8030b8f3cf). So it would definitively help to get the exact steps to reproduce it in a new file.*

In #63694#695047, @dfelinto wrote:
@ChristopherAnderssarian Which steps did you take to create it?

Apologies for not detailing the steps...
I still get a crash with blender-2.80.0-git.c13e10a7404d-windows64 from scratch...

> In #63694#695047, @dfelinto wrote: > @ChristopherAnderssarian Which steps did you take to create it? Apologies for not detailing the steps... I still get a crash with `blender-2.80.0-git.c13e10a7404d-windows64` from scratch...

Got to reproduce with your steps from scratch, thanks.

Got to reproduce with your steps from scratch, thanks.

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel

So, this seems to happen when the windows have a mismatching active tool.

In ED_gizmo_poll_or_unlink_delayed_from_tool_ex we test if tref_rt->gizmo_group != VIEW3D_GGT_ruler.
If any window doesn't have the tool, will call the free routines that will remove the ruler group from gzmap.

I still don't understand in our design why ruler and spin are added on the fly and removed. While other tools and gizmos are there permanently.
All in all the design or implementation of this poll/unlink delayed doesn't play well with multi-window.

So, this seems to happen when the windows have a mismatching active tool. In `ED_gizmo_poll_or_unlink_delayed_from_tool_ex` we test if `tref_rt->gizmo_group != VIEW3D_GGT_ruler`. If any window doesn't have the tool, will call the free routines that will remove the ruler group from gzmap. I still don't understand in our design why ruler and spin are added on the fly and removed. While other tools and gizmos are there permanently. All in all the design or implementation of this poll/unlink delayed doesn't play well with multi-window.

Some comments by @ideasman42:

We may need to adjust how gizmo maps work. Currently they're per 3D view type, which doesn't work with workspaces that have different tools.
Fixes could be...

  • Only have one window active at a time, so the active windows workspace defines the gizmo state.
  • Allow multiple tool gizmos to be active at once, then only use them when they are in a workspace which activates them through tools.
Some comments by @ideasman42: > We may need to adjust how gizmo maps work. Currently they're per 3D view type, which doesn't work with workspaces that have different tools. > Fixes could be... > > - Only have one window active at a time, so the active windows workspace defines the gizmo state. > - Allow multiple tool gizmos to be active at once, then only use them when they are in a workspace which activates them through tools.

I have a fix for this however there is another issue relating to multi-window support which needs to be fixed for multiple windows to be working properly. Once #66200 is resolved, I'll commit the fix for this issue.

I have a fix for this however there is another issue relating to multi-window support which needs to be fixed for multiple windows to be working properly. Once #66200 is resolved, I'll commit the fix for this issue.

This issue was referenced by 9bcab8050f

This issue was referenced by 9bcab8050f44e5bd36a0715811ee0355e4b221b6

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#63694
No description provided.