Regression: Meta balls segfaulting copy-to-selected #99256

Closed
opened 2022-06-29 06:03:25 +02:00 by Jaggz H · 11 comments

Debian linux
Git build (my own branch, rebased to master).

Broken: 3.0 and higher
Worked: 2.93

Steps to Reproduce
A. With attached blend: RMB the resolution in the Metaball properties, and Copy to Selected. Mine crashes right away (backtrace below).

B. With a new blend: Just make a metaball, duplicate it (several times?) Select more than one and copy one of their resolutions to all with the rmb menu on the resolution.

mballs.blend

* 311d5b50dd4 (HEAD -> boolean-fonts) Collection-handling fix
* 34d879dbb25 (master) Initial work. WIP.
* a89f829f12f (origin/master, origin/HEAD) LibOverride: Add option to Hierarchy Creation to get all data user-editable by default.
| * 560c20e0675 (origin/asset-browser-grid-view) Fix wrong data passed after recent changes in master
| -- |
|/  
* d4cdae29c10 (origin/blender-v3.2-release) Fix T98266: Crash with empty mesh boolean node
#0  0x00000000040b5fb7 in BKE_view_layer_context_active_PLACEHOLDER (scene=0x0)           
    at .../blender-git/blender/source/blender/blenkernel/intern/layer.c:149
#1  0x00000000041e7fb6 in BKE_scene_base_iter_next (depsgraph=0x0, iter=0x7fffffffc240,                 
    scene=0x7fffffffc358, val=1, base=0x7fffffffc350, ob=0x7fffffffc348)                                
    at .../blender-git/blender/source/blender/blenkernel/intern/scene.cc:2123
#2  0x00000000040e981d in BKE_mball_properties_copy (scene=0x0, active_object=0x7fffbf333608)           
    at .../blender-git/blender/source/blender/blenkernel/intern/mball.c:441
#3  0x0000000005119154 in rna_MetaBall_update_data (bmain=0x7fffc16e6908, scene=0x0, 
    ptr=0x7fffffffc8f0)
    at .../blender-git/blender/source/blender/makesrna/intern/rna_meta.c:93
#4  0x000000000503e0b6 in rna_property_update (C=0x0, bmain=0x7fffc16e6908, scene=0x0, 
    ptr=0x7fffffffc8f0, prop=0x19ddd480 <rna_MetaBall_resolution>)
    at .../blender-git/blender/source/blender/makesrna/intern/rna_access.c:2069
#5  0x000000000503e32d in RNA_property_update_main (bmain=0x7fffc16e6908, scene=0x0, 
    ptr=0x7fffffffc8f0, prop=0x19ddd480 <rna_MetaBall_resolution>)
    at .../blender-git/blender/source/blender/makesrna/intern/rna_access.c:2143
#6  0x00000000051bfe80 in rna_property_override_apply_default (bmain=0x7fffc16e6908, 
    ptr_dst=0x7fffffffc8f0, ptr_src=0x7fffffffc910, ptr_storage=0x0, 
    prop_dst=0x19ddd480 <rna_MetaBall_resolution>, prop_src=0x19ddd480 <rna_MetaBall_resolution>, 
    prop_storage=0x0, len_dst=0, len_src=0, len_storage=0, UNUSED_ptr_item_dst=0x0, 
    UNUSED_ptr_item_src=0x0, UNUSED_ptr_item_storage=0x0, opop=0x7fffffffc840)
    at .../blender-git/blender/source/blender/makesrna/intern/rna_rna.c:2664
Debian linux Git build (my own branch, rebased to master). Broken: 3.0 and higher Worked: 2.93 **Steps to Reproduce** A. With attached blend: RMB the resolution in the Metaball properties, and Copy to Selected. Mine crashes right away (backtrace below). B. With a new blend: Just make a metaball, duplicate it (several times?) Select more than one and copy one of their resolutions to all with the rmb menu on the resolution. [mballs.blend](https://archive.blender.org/developer/F13235995/mballs.blend) ``` * 311d5b50dd4 (HEAD -> boolean-fonts) Collection-handling fix * 34d879dbb25 (master) Initial work. WIP. * a89f829f12f (origin/master, origin/HEAD) LibOverride: Add option to Hierarchy Creation to get all data user-editable by default. | * 560c20e0675 (origin/asset-browser-grid-view) Fix wrong data passed after recent changes in master | -- | |/ * d4cdae29c10 (origin/blender-v3.2-release) Fix T98266: Crash with empty mesh boolean node ``` ``` #0 0x00000000040b5fb7 in BKE_view_layer_context_active_PLACEHOLDER (scene=0x0) at .../blender-git/blender/source/blender/blenkernel/intern/layer.c:149 #1 0x00000000041e7fb6 in BKE_scene_base_iter_next (depsgraph=0x0, iter=0x7fffffffc240, scene=0x7fffffffc358, val=1, base=0x7fffffffc350, ob=0x7fffffffc348) at .../blender-git/blender/source/blender/blenkernel/intern/scene.cc:2123 #2 0x00000000040e981d in BKE_mball_properties_copy (scene=0x0, active_object=0x7fffbf333608) at .../blender-git/blender/source/blender/blenkernel/intern/mball.c:441 #3 0x0000000005119154 in rna_MetaBall_update_data (bmain=0x7fffc16e6908, scene=0x0, ptr=0x7fffffffc8f0) at .../blender-git/blender/source/blender/makesrna/intern/rna_meta.c:93 #4 0x000000000503e0b6 in rna_property_update (C=0x0, bmain=0x7fffc16e6908, scene=0x0, ptr=0x7fffffffc8f0, prop=0x19ddd480 <rna_MetaBall_resolution>) at .../blender-git/blender/source/blender/makesrna/intern/rna_access.c:2069 #5 0x000000000503e32d in RNA_property_update_main (bmain=0x7fffc16e6908, scene=0x0, ptr=0x7fffffffc8f0, prop=0x19ddd480 <rna_MetaBall_resolution>) at .../blender-git/blender/source/blender/makesrna/intern/rna_access.c:2143 #6 0x00000000051bfe80 in rna_property_override_apply_default (bmain=0x7fffc16e6908, ptr_dst=0x7fffffffc8f0, ptr_src=0x7fffffffc910, ptr_storage=0x0, prop_dst=0x19ddd480 <rna_MetaBall_resolution>, prop_src=0x19ddd480 <rna_MetaBall_resolution>, prop_storage=0x0, len_dst=0, len_src=0, len_storage=0, UNUSED_ptr_item_dst=0x0, UNUSED_ptr_item_src=0x0, UNUSED_ptr_item_storage=0x0, opop=0x7fffffffc840) at .../blender-git/blender/source/blender/makesrna/intern/rna_rna.c:2664 ```
Author

Added subscriber: @jaggz

Added subscriber: @jaggz
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Thanks for the report. I can confirm
Last working version is known so raising the priority

Stack trace:
blender.exe         :0x00007FF7E5B1BCD0  BKE_view_layer_context_active_PLACEHOLDER C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\layer.c:148
blender.exe         :0x00007FF7E5AEC100  BKE_scene_base_iter_next C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\scene.cc:2124
blender.exe         :0x00007FF7E5B8CA30  BKE_mball_properties_copy C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\mball.c:441
blender.exe         :0x00007FF7E60DD870  rna_MetaBall_update_data C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_meta.c:91
blender.exe         :0x00007FF7E5FF63D0  rna_property_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access.c:2077
blender.exe         :0x00007FF7E5FF35C0  RNA_property_update_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access.c:2145
blender.exe         :0x00007FF7E60343E0  rna_property_override_apply_default C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_rna.c:2769
blender.exe         :0x00007FF7E5FFA020  rna_property_override_operation_apply C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access_compare_override.c:622
blender.exe         :0x00007FF7E5FF7E60  RNA_property_copy C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access_compare_override.c:249
blender.exe         :0x00007FF7E5DB3170  copy_to_selected_button C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_ops.c:1137
blender.exe         :0x00007FF7E5DB3440  copy_to_selected_button_exec C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_ops.c:1162
blender.exe         :0x00007FF7E5A2F0B0  wm_operator_invoke C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:1403
blender.exe         :0x00007FF7E5A2E760  wm_operator_call_internal C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:1630
blender.exe         :0x00007FF7E5A31720  WM_operator_name_call_ptr_with_depends_on_cursor C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:1838
blender.exe         :0x00007FF7E5D713A0  ui_apply_but_funcs_after C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:1018
blender.exe         :0x00007FF7E5D810D0  ui_popup_handler C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:11579
blender.exe         :0x00007FF7E5A2DBD0  wm_handlers_do_intern C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:3166
blender.exe         :0x00007FF7E5A2D000  wm_handlers_do C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:3288
blender.exe         :0x00007FF7E5A332A0  wm_event_do_handlers C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:3880
blender.exe         :0x00007FF7E5A19A90  WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:626
blender.exe         :0x00007FF7E5A15210  main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:552
blender.exe         :0x00007FF7E6BBE334  __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
KERNEL32.DLL        :0x00007FF90E387020  BaseThreadInitThunk
ntdll.dll           :0x00007FF90F7A2630  RtlUserThreadStart
Thanks for the report. I can confirm Last working version is known so raising the priority ```lines=10 Stack trace: blender.exe :0x00007FF7E5B1BCD0 BKE_view_layer_context_active_PLACEHOLDER C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\layer.c:148 blender.exe :0x00007FF7E5AEC100 BKE_scene_base_iter_next C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\scene.cc:2124 blender.exe :0x00007FF7E5B8CA30 BKE_mball_properties_copy C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\mball.c:441 blender.exe :0x00007FF7E60DD870 rna_MetaBall_update_data C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_meta.c:91 blender.exe :0x00007FF7E5FF63D0 rna_property_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access.c:2077 blender.exe :0x00007FF7E5FF35C0 RNA_property_update_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access.c:2145 blender.exe :0x00007FF7E60343E0 rna_property_override_apply_default C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_rna.c:2769 blender.exe :0x00007FF7E5FFA020 rna_property_override_operation_apply C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access_compare_override.c:622 blender.exe :0x00007FF7E5FF7E60 RNA_property_copy C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\makesrna\intern\rna_access_compare_override.c:249 blender.exe :0x00007FF7E5DB3170 copy_to_selected_button C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_ops.c:1137 blender.exe :0x00007FF7E5DB3440 copy_to_selected_button_exec C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_ops.c:1162 blender.exe :0x00007FF7E5A2F0B0 wm_operator_invoke C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:1403 blender.exe :0x00007FF7E5A2E760 wm_operator_call_internal C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:1630 blender.exe :0x00007FF7E5A31720 WM_operator_name_call_ptr_with_depends_on_cursor C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:1838 blender.exe :0x00007FF7E5D713A0 ui_apply_but_funcs_after C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:1018 blender.exe :0x00007FF7E5D810D0 ui_popup_handler C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\interface\interface_handlers.c:11579 blender.exe :0x00007FF7E5A2DBD0 wm_handlers_do_intern C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:3166 blender.exe :0x00007FF7E5A2D000 wm_handlers_do C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:3288 blender.exe :0x00007FF7E5A332A0 wm_event_do_handlers C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_event_system.cc:3880 blender.exe :0x00007FF7E5A19A90 WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:626 blender.exe :0x00007FF7E5A15210 main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:552 blender.exe :0x00007FF7E6BBE334 __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 KERNEL32.DLL :0x00007FF90E387020 BaseThreadInitThunk ntdll.dll :0x00007FF90F7A2630 RtlUserThreadStart ```
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

Appears to caused by 43167a2c25
cc @mont29

Appears to caused by 43167a2c25 cc @mont29
Pratik Borhade changed title from Meta balls segfaulting copy-to-selected to Regression: Meta balls segfaulting copy-to-selected 2022-06-29 07:37:20 +02:00

@PratikPB2123 did you actually bisect?

But in any case, even if that commit revealed the issue, it cannot be the cause of the issue. From first looks seems like update function of metaball is doing something very bad, need to dig further though.

@PratikPB2123 did you actually bisect? But in any case, even if that commit revealed the issue, it cannot be the cause of the issue. From first looks seems like update function of metaball is doing something very bad, need to dig further though.
Member

Yes, I did. Was using old libs yesterday so quickly did bisecting between d046a1f2fa - c53ffda8a4 and it pointed me your commit.
Maybe I've done some mistake while bisecting then :/
Let me know if you want me to do this again.

Yes, I did. Was using old libs yesterday so quickly did bisecting between d046a1f2fa - c53ffda8a4 and it pointed me your commit. Maybe I've done some mistake while bisecting then :/ Let me know if you want me to do this again.

@PratikPB2123 thanks, no just wasn't fully sure if did do proper bisect or not ;)

Can confirm that commit reveals the issue, however issue is actually in the RNA update function of MetaBall, which is making wrong assumptions (and very dubious stuff), patch will follow soon.

@jaggz I guess this example is just a demo to reproduce the issue and not a real life case, but just in case, doing 'Copy to all selected' on meta-balls of a same family is pointless here actually, since the (crashing) rna function actually already takes care of this (it ensures those values are always in sync for all metaballs of a same family).

@PratikPB2123 thanks, no just wasn't fully sure if did do proper bisect or not ;) Can confirm that commit reveals the issue, however issue is actually in the RNA update function of MetaBall, which is making wrong assumptions (and very dubious stuff), patch will follow soon. @jaggz I guess this example is just a demo to reproduce the issue and not a real life case, but just in case, doing 'Copy to all selected' on meta-balls of a same family is pointless here actually, since the (crashing) rna function actually already takes care of this (it ensures those values are always in sync for all metaballs of a same family).

This issue was referenced by fcf1a9ff71

This issue was referenced by fcf1a9ff71e20e4af56815c4db1816d786298c3f

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2022-07-07 16:36:06 +02:00
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#99256
No description provided.