Bsurfaces addon crashes Blender if Undo used following creation of single line surface, when separate Collection previously interacted with #103077

Open
opened 2022-12-09 16:50:37 +01:00 by Nicolas · 4 comments

System Information
Operating system: Windows 10 Pro (also tested under 8.1 Pro)
Graphics card: RTX 3080

Blender Version
Broken: 3.4.0

Short description of error
Blender reliably crashes when the scenario described in the steps below occur. It seems to do with first having previously selected a different Collection group (or any item within it) than the target Bsurface object, which causes Bsurface to generate the surface within it, and secondly after having created at least one valid Bsurface surface subsequently drawing a single line and using 'Add Surface' then pressing Undo.

When both those things occur the crash consistently occurs.

Exact steps for others to reproduce the error

  • Open Blender Preferences>Add-ons. Filter for bs and enable Mesh: Bsurfaces GPL Edition.

  • Using the default startup scene right-click the Outliner and select New Collection.

  • Select the newly created Collection group.

  • Then select the default cube object.

  • Press N to bring up the Tools sidebar then in the Edit tab under Bsurfaces click Initialize. This will create a 'BSurfaceMesh' item within the previously selected Collection group.

  • Using the Annotate tool, which has been auto switched to, draw two parallel lines in the same stroke direction. (Note: the lines can be anything so long as they create a valid surface, FWIW.)

  • Under the Bsurface options click Add Surface.

  • Press Tab to exit Edit mode and have it auto switch to the Annotate tool. Or alternatively manually select the Annotate tool while in Edit mode.

  • Draw a single line using the Annotate tool then click Add Surface.

  • Press Undo (either hotkey or menu item).

Blender has crashed every time on both systems following the pressing of Undo.

Attached video of bug:

Video.webm

**System Information** Operating system: Windows 10 Pro (also tested under 8.1 Pro) Graphics card: RTX 3080 **Blender Version** Broken: 3.4.0 **Short description of error** Blender reliably crashes when the scenario described in the steps below occur. It seems to do with first having previously selected a different Collection group (or any item within it) than the target Bsurface object, which causes Bsurface to generate the surface within it, and secondly after having created at least one valid Bsurface surface subsequently drawing a single line and using 'Add Surface' then pressing Undo. When both those things occur the crash consistently occurs. **Exact steps for others to reproduce the error** - Open Blender Preferences>Add-ons. Filter for *bs* and enable *Mesh: Bsurfaces GPL Edition*. - Using the default startup scene right-click the Outliner and select *New Collection*. - Select the newly created Collection group. - Then select the default cube object. - Press *N* to bring up the Tools sidebar then in the Edit tab under *Bsurfaces* click *Initialize*. This will create a 'BSurfaceMesh' item within the previously selected Collection group. - Using the Annotate tool, which has been auto switched to, draw two parallel lines in the same stroke direction. (Note: the lines can be anything so long as they create a valid surface, FWIW.) - Under the Bsurface options click *Add Surface*. - Press *Tab* to exit Edit mode and have it auto switch to the Annotate tool. Or alternatively manually select the Annotate tool while in Edit mode. - Draw a single line using the Annotate tool then click *Add Surface*. - Press Undo (either hotkey or menu item). Blender has crashed every time on both systems following the pressing of Undo. **Attached video of bug:** [Video.webm](https://archive.blender.org/developer/F14046851/Video.webm)
Author

Added subscriber: @elan

Added subscriber: @elan
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Seems similar to blender/blender#87223 and blender/blender#84647, so seems like an issue in the add-on itself .

* thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x3f0)
  * frame #0: 0x0000000006767290 blender`::BKE_scene_object_base_flag_sync_from_base(base=0x00007fffc341d048) at scene.cc:2982:17
    frame #1: 0x0000000006767177 blender`::BKE_scene_set_background(bmain=0x00007fffc2535608, scene=0x00007fffe424ac08) at scene.cc:2165:7
    frame #2: 0x00000000060b353c blender`setup_app_data(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298) at blendfile.c:406:3
    frame #3: 0x00000000060b2a64 blender`setup_app_blend_file_data(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298) at blendfile.c:451:5
    frame #4: 0x00000000060b29ef blender`BKE_blendfile_read_setup_ex(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298, startup_update_defaults=false, startup_app_template=0x0000000000000000) at blendfile.c:481:3
    frame #5: 0x00000000060b3915 blender`BKE_blendfile_read_setup(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298) at blendfile.c:490:3
    frame #6: 0x00000000060b24cd blender`BKE_memfile_undo_decode(mfu=0x00007fffc894fc08, undo_direction=STEP_UNDO, use_old_bmain_data=true, C=0x00007fffec9de248) at blender_undo.c:83:7
    frame #7: 0x00000000087b0465 blender`memfile_undosys_step_decode(C=0x00007fffec9de248, bmain=0x00007fffe4292008, us_p=0x00007fffc6ef8508, undo_direction=STEP_UNDO, UNUSED_is_final=true) at memfile_undo.c:210:3
    frame #8: 0x00000000068922a4 blender`undosys_step_decode(C=0x00007fffec9de248, bmain=0x00007fffe4292008, ustack=0x00007fffe111bb48, us=0x00007fffc6ef8508, dir=STEP_UNDO, is_final=true) at undo_system.c:202:3
    frame #9: 0x0000000006891f47 blender`BKE_undosys_step_load_data_ex(ustack=0x00007fffe111bb48, C=0x00007fffec9de248, us_target=0x00007fffc6ef8508, us_reference=0x00007fffc6ef8808, use_skip=true) at undo_system.c:784:5
    frame #10: 0x0000000006892556 blender`BKE_undosys_step_undo_with_data_ex(ustack=0x00007fffe111bb48, C=0x00007fffec9de248, us_target=0x00007fffc6ef8508, use_skip=true) at undo_system.c:830:10
    frame #11: 0x000000000689259a blender`BKE_undosys_step_undo_with_data(ustack=0x00007fffe111bb48, C=0x00007fffec9de248, us_target=0x00007fffc6ef8508) at undo_system.c:835:10
    frame #12: 0x00000000068925e8 blender`BKE_undosys_step_undo(ustack=0x00007fffe111bb48, C=0x00007fffec9de248) at undo_system.c:841:12
    frame #13: 0x00000000087add73 blender`ed_undo_step_direction(C=0x00007fffec9de248, step=STEP_UNDO, reports=0x00007fffbf61a458) at ed_undo.c:283:5
    frame #14: 0x00000000087aea17 blender`ed_undo_exec(C=0x00007fffec9de248, op=0x00007fffc6ac6348) at ed_undo.c:503:13
    frame #15: 0x0000000006e85eac blender`wm_operator_invoke(C=0x00007fffec9de248, ot=0x00007fffecfe8068, event=0x00007fffbf0cae38, properties=0x00007fffd2ee5da8, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1486:16
    frame #16: 0x0000000006e8dd5b blender`wm_handler_operator_call(C=0x00007fffec9de248, handlers=0x00007fffe4243010, handler_base=0x00007fffe4342948, event=0x00007fffbf0cae38, properties=0x00007fffd2ee5da8, kmi_idname="ED_OT_undo") at wm_event_system.cc:2505:16
    frame #17: 0x0000000006e8c717 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007fffec9de248, event=0x00007fffbf0cae38, handlers=0x00007fffe4243010, handler=0x00007fffe4342948, keymap=0x00007fffd2eb2a68, do_debug_handler=false) at wm_event_system.cc:2897:21
    frame #18: 0x0000000006e8bc5f blender`wm_handlers_do_intern(C=0x00007fffec9de248, win=0x00007fffe4242f08, event=0x00007fffbf0cae38, handlers=0x00007fffe4243010) at wm_event_system.cc:3223:26
    frame #19: 0x0000000006e8a60f blender`wm_handlers_do(C=0x00007fffec9de248, event=0x00007fffbf0cae38, handlers=0x00007fffe4243010) at wm_event_system.cc:3361:16
    frame #20: 0x0000000006e89b97 blender`::wm_event_do_handlers(C=0x00007fffec9de248) at wm_event_system.cc:4039:21
    frame #21: 0x0000000006e79d47 blender`WM_main(C=0x00007fffec9de248) at wm.c:640:5
    frame #22: 0x000000000602869d blender`main(argc=1, argv=0x00007fffffffe9d8) at creator.c:585:5
    frame #23: 0x00007ffff7d90290 libc.so.6`___lldb_unnamed_symbol3141 + 128
    frame #24: 0x00007ffff7d9034a libc.so.6`__libc_start_main + 138
    frame #25: 0x00000000060281a5 blender`_start at start.S:115
Seems similar to blender/blender#87223 and blender/blender#84647, so seems like an issue in the add-on itself . ``` * thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x3f0) * frame #0: 0x0000000006767290 blender`::BKE_scene_object_base_flag_sync_from_base(base=0x00007fffc341d048) at scene.cc:2982:17 frame #1: 0x0000000006767177 blender`::BKE_scene_set_background(bmain=0x00007fffc2535608, scene=0x00007fffe424ac08) at scene.cc:2165:7 frame #2: 0x00000000060b353c blender`setup_app_data(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298) at blendfile.c:406:3 frame #3: 0x00000000060b2a64 blender`setup_app_blend_file_data(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298) at blendfile.c:451:5 frame #4: 0x00000000060b29ef blender`BKE_blendfile_read_setup_ex(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298, startup_update_defaults=false, startup_app_template=0x0000000000000000) at blendfile.c:481:3 frame #5: 0x00000000060b3915 blender`BKE_blendfile_read_setup(C=0x00007fffec9de248, bfd=0x00007fffc8942f08, params=0x00007fffffffd2f8, reports=0x00007fffffffd298) at blendfile.c:490:3 frame #6: 0x00000000060b24cd blender`BKE_memfile_undo_decode(mfu=0x00007fffc894fc08, undo_direction=STEP_UNDO, use_old_bmain_data=true, C=0x00007fffec9de248) at blender_undo.c:83:7 frame #7: 0x00000000087b0465 blender`memfile_undosys_step_decode(C=0x00007fffec9de248, bmain=0x00007fffe4292008, us_p=0x00007fffc6ef8508, undo_direction=STEP_UNDO, UNUSED_is_final=true) at memfile_undo.c:210:3 frame #8: 0x00000000068922a4 blender`undosys_step_decode(C=0x00007fffec9de248, bmain=0x00007fffe4292008, ustack=0x00007fffe111bb48, us=0x00007fffc6ef8508, dir=STEP_UNDO, is_final=true) at undo_system.c:202:3 frame #9: 0x0000000006891f47 blender`BKE_undosys_step_load_data_ex(ustack=0x00007fffe111bb48, C=0x00007fffec9de248, us_target=0x00007fffc6ef8508, us_reference=0x00007fffc6ef8808, use_skip=true) at undo_system.c:784:5 frame #10: 0x0000000006892556 blender`BKE_undosys_step_undo_with_data_ex(ustack=0x00007fffe111bb48, C=0x00007fffec9de248, us_target=0x00007fffc6ef8508, use_skip=true) at undo_system.c:830:10 frame #11: 0x000000000689259a blender`BKE_undosys_step_undo_with_data(ustack=0x00007fffe111bb48, C=0x00007fffec9de248, us_target=0x00007fffc6ef8508) at undo_system.c:835:10 frame #12: 0x00000000068925e8 blender`BKE_undosys_step_undo(ustack=0x00007fffe111bb48, C=0x00007fffec9de248) at undo_system.c:841:12 frame #13: 0x00000000087add73 blender`ed_undo_step_direction(C=0x00007fffec9de248, step=STEP_UNDO, reports=0x00007fffbf61a458) at ed_undo.c:283:5 frame #14: 0x00000000087aea17 blender`ed_undo_exec(C=0x00007fffec9de248, op=0x00007fffc6ac6348) at ed_undo.c:503:13 frame #15: 0x0000000006e85eac blender`wm_operator_invoke(C=0x00007fffec9de248, ot=0x00007fffecfe8068, event=0x00007fffbf0cae38, properties=0x00007fffd2ee5da8, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1486:16 frame #16: 0x0000000006e8dd5b blender`wm_handler_operator_call(C=0x00007fffec9de248, handlers=0x00007fffe4243010, handler_base=0x00007fffe4342948, event=0x00007fffbf0cae38, properties=0x00007fffd2ee5da8, kmi_idname="ED_OT_undo") at wm_event_system.cc:2505:16 frame #17: 0x0000000006e8c717 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007fffec9de248, event=0x00007fffbf0cae38, handlers=0x00007fffe4243010, handler=0x00007fffe4342948, keymap=0x00007fffd2eb2a68, do_debug_handler=false) at wm_event_system.cc:2897:21 frame #18: 0x0000000006e8bc5f blender`wm_handlers_do_intern(C=0x00007fffec9de248, win=0x00007fffe4242f08, event=0x00007fffbf0cae38, handlers=0x00007fffe4243010) at wm_event_system.cc:3223:26 frame #19: 0x0000000006e8a60f blender`wm_handlers_do(C=0x00007fffec9de248, event=0x00007fffbf0cae38, handlers=0x00007fffe4243010) at wm_event_system.cc:3361:16 frame #20: 0x0000000006e89b97 blender`::wm_event_do_handlers(C=0x00007fffec9de248) at wm_event_system.cc:4039:21 frame #21: 0x0000000006e79d47 blender`WM_main(C=0x00007fffec9de248) at wm.c:640:5 frame #22: 0x000000000602869d blender`main(argc=1, argv=0x00007fffffffe9d8) at creator.c:585:5 frame #23: 0x00007ffff7d90290 libc.so.6`___lldb_unnamed_symbol3141 + 128 frame #24: 0x00007ffff7d9034a libc.so.6`__libc_start_main + 138 frame #25: 0x00000000060281a5 blender`_start at start.S:115 ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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-addons#103077
No description provided.