Creating a triangle in Mask with specific coordinates results in crash #64899

Closed
opened 2019-05-20 20:56:40 +02:00 by Fernando K · 9 comments

System Information
Operating system: Linux
Graphics card: Intel Graphics from i7-4790

Blender Version
Broken: 2.80 9efe117535

Short description of error
Program crashes when inserting new coordinates for a new vertex in a mask after two being inserted.

Exact steps for others to reproduce the error

  1. Use the video editing startup file.
  2. Navigate to the "Rendering" workspace
  3. Change the mode at the top left from View to Mask
  4. Click anywhere in the mask with Ctrl + RMB to add a vertex
  5. A popup should appear on the bottom called "Add Vertex and Slide", open it
  6. Input Location X 0.0 and Location Y 0.78125
  7. Click anywhere in the mask with Ctrl + RMB to add a vertex
  8. Input Location X 1.0 and Location Y 0.21875
  9. This should connect the first dot with the second creating a diagonal line
  10. Click anywhere in the mask with Ctrl + RMB to add a vertex
  11. Click on the Location X field
  12. Unfocus the field via tab, clicking to another field, anything
  13. It should crash with something similar to the below
# Blender 2.80 (sub 71), Commit date: 2019-05-20 16:16, Hash 9efe117535c6
bpy.ops.mask.add_vertex_slide(MASK_OT_add_vertex={"location":(0.884645, 0.524655)}, MASK_OT_slide_point={"slide_feather":False, "is_new_point":True})  # Operator
bpy.data.window_managers["WinMan"].(null)[0] = 0  # Property

# backtrace
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(BLI_system_backtrace+0x1d) [0x134e35d]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x1168339]
/lib/x86_64-linux-gnu/libc.so.6(+0x37840) [0x7fad8991f840]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(BKE_mask_point_segment_diff+0x82) [0x11baa92]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(ED_mask_find_nearest_diff_point+0x1b0) [0x41599a0]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x4159d50]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x415a0fe]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x15415b8]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x152da10]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(ED_undo_operator_repeat+0x1b0) [0x2ea29e0]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x2b1224d]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x2b21f0c]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x1530d55]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x153163c]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(wm_event_do_handlers+0x240) [0x1531cb0]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(WM_main+0x20) [0x1528520]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(main+0x30a) [0x10ce67a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fad8990c09b]
blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(_start+0x2a) [0x1164c4a]

Additional Info

Those numbers are just the corners of a 16:9 aspect ratio frame:

>>> (1 - (9/16)) / 2

0.21875
>>> 1 - ((1 - (9/16)) / 2)

0.78125
>>>

**System Information** Operating system: Linux Graphics card: Intel Graphics from i7-4790 **Blender Version** Broken: 2.80 9efe117535c6 **Short description of error** Program crashes when inserting new coordinates for a new vertex in a mask after two being inserted. **Exact steps for others to reproduce the error** 1. Use the video editing startup file. 2. Navigate to the "Rendering" workspace 3. Change the mode at the top left from View to Mask 4. Click anywhere in the mask with Ctrl + RMB to add a vertex 5. A popup should appear on the bottom called "Add Vertex and Slide", open it 6. Input Location X 0.0 and Location Y 0.78125 7. Click anywhere in the mask with Ctrl + RMB to add a vertex 8. Input Location X 1.0 and Location Y 0.21875 9. This should connect the first dot with the second creating a diagonal line 10. Click anywhere in the mask with Ctrl + RMB to add a vertex 11. Click on the Location X field 12. Unfocus the field via tab, clicking to another field, anything 13. It should crash with something similar to the below ``` # Blender 2.80 (sub 71), Commit date: 2019-05-20 16:16, Hash 9efe117535c6 bpy.ops.mask.add_vertex_slide(MASK_OT_add_vertex={"location":(0.884645, 0.524655)}, MASK_OT_slide_point={"slide_feather":False, "is_new_point":True}) # Operator bpy.data.window_managers["WinMan"].(null)[0] = 0 # Property # backtrace blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(BLI_system_backtrace+0x1d) [0x134e35d] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x1168339] /lib/x86_64-linux-gnu/libc.so.6(+0x37840) [0x7fad8991f840] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(BKE_mask_point_segment_diff+0x82) [0x11baa92] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(ED_mask_find_nearest_diff_point+0x1b0) [0x41599a0] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x4159d50] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x415a0fe] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x15415b8] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x152da10] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(ED_undo_operator_repeat+0x1b0) [0x2ea29e0] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x2b1224d] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x2b21f0c] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x1530d55] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender() [0x153163c] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(wm_event_do_handlers+0x240) [0x1531cb0] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(WM_main+0x20) [0x1528520] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(main+0x30a) [0x10ce67a] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fad8990c09b] blender-2.80-9efe117535c6-linux-glibc224-x86_64/blender(_start+0x2a) [0x1164c4a] ``` **Additional Info** Those numbers are just the corners of a 16:9 aspect ratio frame: ``` >>> (1 - (9/16)) / 2 0.21875 >>> 1 - ((1 - (9/16)) / 2) 0.78125 >>> ```
Author

Added subscriber: @fer22f

Added subscriber: @fer22f

Added subscriber: @Gvgeo-1

Added subscriber: @Gvgeo-1
>	blender.exe!BKE_mask_point_segment_diff(MaskSpline * spline, MaskSplinePoint * point, int width, int height, unsigned int * tot_diff_point) Line 852	C

 	blender.exe!ED_mask_find_nearest_diff_point(const bContext * C, Mask * mask, const float * normal_co, int threshold, bool feather, float * tangent, const bool use_deform, const bool use_project, MaskLayer * * masklay_r, MaskSpline * * spline_r, MaskSplinePoint * * point_r, float * u_r, float * score_r) Line 97	C
 	blender.exe!add_vertex_subdivide(const bContext * C, Mask * mask, const float * co) Line 401	C
 	blender.exe!add_vertex_exec(bContext * C, wmOperator * op) Line 637	C
 	blender.exe!wm_macro_exec(bContext * C, wmOperator * op) Line 335	C
 	blender.exe!wm_operator_exec(bContext * C, wmOperator * op, const bool repeat, const bool use_repeat_op_flag, const bool store) Line 1030	C
 	blender.exe!WM_operator_repeat(bContext * C, wmOperator * op) Line 1108	C
 	blender.exe!ED_undo_operator_repeat(bContext * C, wmOperator * op) Line 531	C
 	blender.exe!ED_undo_operator_repeat_cb_evt(bContext * C, void * arg_op, int UNUSED_arg_event) Line 566	C
 	blender.exe!ui_apply_but_funcs_after(bContext * C) Line 844	C
 	blender.exe!ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 10155	C
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 608	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2582	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2813	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3181	C
 	blender.exe!WM_main(bContext * C) Line 420	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 502	C
 	[External Code]	

In BKE_mask_point_segment_diff

 for (j = 0; j < 2; j++) {
    BKE_curve_forward_diff_bezier(bezt->vec[1][j],           <---Access violation reading location 
                                  bezt->vec[2][j],
                                  bezt_next->vec[0][j],
                                  bezt_next->vec[1][j],
                                  fp + j,
                                  resol,
                                  2 * sizeof(float));
  }
``` > blender.exe!BKE_mask_point_segment_diff(MaskSpline * spline, MaskSplinePoint * point, int width, int height, unsigned int * tot_diff_point) Line 852 C blender.exe!ED_mask_find_nearest_diff_point(const bContext * C, Mask * mask, const float * normal_co, int threshold, bool feather, float * tangent, const bool use_deform, const bool use_project, MaskLayer * * masklay_r, MaskSpline * * spline_r, MaskSplinePoint * * point_r, float * u_r, float * score_r) Line 97 C blender.exe!add_vertex_subdivide(const bContext * C, Mask * mask, const float * co) Line 401 C blender.exe!add_vertex_exec(bContext * C, wmOperator * op) Line 637 C blender.exe!wm_macro_exec(bContext * C, wmOperator * op) Line 335 C blender.exe!wm_operator_exec(bContext * C, wmOperator * op, const bool repeat, const bool use_repeat_op_flag, const bool store) Line 1030 C blender.exe!WM_operator_repeat(bContext * C, wmOperator * op) Line 1108 C blender.exe!ED_undo_operator_repeat(bContext * C, wmOperator * op) Line 531 C blender.exe!ED_undo_operator_repeat_cb_evt(bContext * C, void * arg_op, int UNUSED_arg_event) Line 566 C blender.exe!ui_apply_but_funcs_after(bContext * C) Line 844 C blender.exe!ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 10155 C blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 608 C blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2582 C blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2813 C blender.exe!wm_event_do_handlers(bContext * C) Line 3181 C blender.exe!WM_main(bContext * C) Line 420 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 502 C [External Code] ``` In `BKE_mask_point_segment_diff` ``` for (j = 0; j < 2; j++) { BKE_curve_forward_diff_bezier(bezt->vec[1][j], <---Access violation reading location bezt->vec[2][j], bezt_next->vec[0][j], bezt_next->vec[1][j], fp + j, resol, 2 * sizeof(float)); } ````
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Can confirm, seem like MaskSpline->points_deform is NULL on Redo...

Can confirm, seem like `MaskSpline->points_deform` is NULL on Redo...
Sergey Sharybin was assigned by Philipp Oeser 2019-05-21 10:21:52 +02:00
Member

Added subscribers: @Sergey, @ideasman42

Added subscribers: @Sergey, @ideasman42
Member

Just to add: the actual coordinates dont matter it just always happens from the 3rd point onward on redo...

to demonstrate: calling BKE_mask_update_display prior to ED_mask_find_nearest_diff_point in ED_mask_find_nearest_diff_point fixes the crash (but pretty sure this is not the right fix...)

Not sure if this is related to Undo [then @ideasman42 might chime in], but would kindly ask @Sergey to take over...

Just to add: the actual coordinates dont matter it just always happens from the 3rd point onward on redo... to demonstrate: calling `BKE_mask_update_display` prior to `ED_mask_find_nearest_diff_point` in `ED_mask_find_nearest_diff_point` fixes the crash (but pretty sure this is not the right fix...) Not sure if this is related to Undo [then @ideasman42 might chime in], but would kindly ask @Sergey to take over...

This issue was referenced by fec9615ea0

This issue was referenced by fec9615ea06c94b5224c14479c31c55c567fb7ee

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