Wrongly applying constraint make crashing Blender #96032

Closed
opened 2022-02-25 11:49:44 +01:00 by Anys Bouchafra · 10 comments

System Information
Operating system: Microsoft Windows 10 Professionnel
Graphics card: Nvidia Gefroce RTX 2080 Super

Blender Version
Blender 3.0.0, hash: f1cca30557 , branch: master

Seems like it was wrong since the beginning in d6891d9bee

Short description of error
Blender crash when we use bpy.ops.constraint.apply(constraint="Transform Cache") when there are no constraint to apply instead of raising an error.

Exact steps for others to reproduce the error
Open a scene with a cube and run bpy.ops.constraint.apply(constraint="Transform Cache") in script mode

**System Information** Operating system: Microsoft Windows 10 Professionnel Graphics card: Nvidia Gefroce RTX 2080 Super **Blender Version** Blender 3.0.0, hash: f1cca3055776 , branch: master Seems like it was wrong since the beginning in d6891d9bee **Short description of error** Blender crash when we use bpy.ops.constraint.apply(constraint="Transform Cache") when there are no constraint to apply instead of raising an error. **Exact steps for others to reproduce the error** Open a scene with a cube and run bpy.ops.constraint.apply(constraint="Transform Cache") in script mode
Author

Added subscriber: @Anys-Bouchafra

Added subscriber: @Anys-Bouchafra
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Member
* thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x60)
  * frame #0: 0x00007ffff7f31a61 libc.so.6`__strcpy_avx2 + 33
    frame #1: 0x0000000004926959 blender`constraint_apply_exec(C=0x00007ffff39485c8, op=0x00007fffca86c448) at object_constraint.c:1518:3
    frame #2: 0x0000000003666117 blender`wm_operator_invoke(C=0x00007ffff39485c8, ot=0x00007ffff3e71b48, event=0x0000000000000000, properties=0x00007fffffffce00, reports=0x00007fffd9a2c9e8, poll_only=false, use_last_properties=true) at wm_event_system.c:1335:16
    frame #3: 0x000000000365cfd9 blender`wm_operator_call_internal(C=0x00007ffff39485c8, ot=0x00007ffff3e71b48, properties=0x00007fffffffce00, reports=0x00007fffd9a2c9e8, context=WM_OP_EXEC_DEFAULT, poll_only=false, event=0x0000000000000000) at wm_event_system.c:1564:16
    frame #4: 0x000000000365db68 blender`WM_operator_call_py(C=0x00007ffff39485c8, ot=0x00007ffff3e71b48, context=WM_OP_EXEC_DEFAULT, properties=0x00007fffffffce00, reports=0x00007fffd9a2c9e8, is_undo=false) at wm_event_system.c:1638:12
    frame #5: 0x00007ffff78270a8 libpython3.10.so.1.0`___lldb_unnamed_symbol5938 + 104
    frame #6: 0x00007ffff7821613 libpython3.10.so.1.0`_PyObject_MakeTpCall + 675
    frame #7: 0x00007ffff781c676 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 20934
    frame #8: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120
    frame #9: 0x00007ffff782097d libpython3.10.so.1.0`_PyObject_FastCallDictTstate + 397
    frame #10: 0x00007ffff7830299 libpython3.10.so.1.0`_PyObject_Call_Prepend + 105
    frame #11: 0x00007ffff7902f4e libpython3.10.so.1.0`___lldb_unnamed_symbol7289 + 110
    frame #12: 0x00007ffff7821613 libpython3.10.so.1.0`_PyObject_MakeTpCall + 675
    frame #13: 0x00007ffff781d3ba libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 24330
    frame #14: 0x00007ffff7816422 libpython3.10.so.1.0`___lldb_unnamed_symbol5914 + 66
    frame #15: 0x00007ffff78cb370 libpython3.10.so.1.0`PyEval_EvalCode + 144
    frame #16: 0x00007ffff78d2c0d libpython3.10.so.1.0`___lldb_unnamed_symbol6658 + 253
    frame #17: 0x00007ffff78276ec libpython3.10.so.1.0`___lldb_unnamed_symbol5940 + 92
    frame #18: 0x00007ffff78177e4 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 820
    frame #19: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120
    frame #20: 0x00007ffff7817b05 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 1621
    frame #21: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120
    frame #22: 0x00007ffff7817b05 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 1621
    frame #23: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120
    frame #24: 0x00007ffff7817b05 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 1621
    frame #25: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120
    frame #26: 0x00007ffff78177e4 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 820
    frame #27: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120
    frame #28: 0x00000000040f2587 blender`bpy_class_call(C=0x00007ffff39485c8, ptr=0x00007fffffffe048, func=0x0000000013aa1170, parms=0x00007fffffffe028) at bpy_rna.c:8540:13
    frame #29: 0x00000000040892b5 blender`rna_operator_execute_cb(C=0x00007ffff39485c8, op=0x00007fffca86c5c8) at rna_wm.c:1317:3
    frame #30: 0x0000000003666117 blender`wm_operator_invoke(C=0x00007ffff39485c8, ot=0x00007fffeb3c18c8, event=0x00007fffda531d68, properties=0x00007fffd924d168, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.c:1335:16
    frame #31: 0x0000000003669101 blender`wm_handler_operator_call(C=0x00007ffff39485c8, handlers=0x00007fffeb26f080, handler_base=0x00007fffeb643fe8, event=0x00007fffda531d68, properties=0x00007fffd924d168, kmi_idname="CONSOLE_OT_execute") at wm_event_system.c:2324:16
    frame #32: 0x00000000036679ac blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff39485c8, event=0x00007fffda531d68, handlers=0x00007fffeb26f080, handler=0x00007fffeb643fe8, keymap=0x00007fffd9195868, do_debug_handler=false) at wm_event_system.c:2677:21
    frame #33: 0x0000000003666ecc blender`wm_handlers_do_intern(C=0x00007ffff39485c8, win=0x00007fffeb24c208, event=0x00007fffda531d68, handlers=0x00007fffeb26f080) at wm_event_system.c:3004:26
    frame #34: 0x000000000365ff49 blender`wm_handlers_do(C=0x00007ffff39485c8, event=0x00007fffda531d68, handlers=0x00007fffeb26f080) at wm_event_system.c:3145:16
    frame #35: 0x0000000003669b7e blender`wm_event_do_region_handlers(C=0x00007ffff39485c8, event=0x00007fffda531d68, region=0x00007fffeb26ef48) at wm_event_system.c:3516:10
    frame #36: 0x0000000003660b11 blender`wm_event_do_handlers_area_regions(C=0x00007ffff39485c8, event=0x00007fffda531d68, area=0x00007fffeb1e55c8) at wm_event_system.c:3546:10
    frame #37: 0x0000000005320311 blender`::GHOST_DispatchEvents(systemhandle=0x00007ffff39485c8) at GHOST_C-api.cpp:247:11
    frame #38: 0x000000000369c29a blender`wm_window_process_events(C=0x7e8c81c0ca1ada00) at wm_window.c:1516:16
    frame #39: 0x0000000003655557 blender`WM_main(C=0x00007ffff39485c8) at wm.c:623:5
    frame #40: 0x0000000002e18ab4 blender`main(argc=1, argv=0x00007fffffffe9e8) at creator.c:544:5
    frame #41: 0x00007ffff7df7b25 libc.so.6`__libc_start_main + 213
    frame #42: 0x0000000002e1867e blender`_start + 46

In:

   1516   /* Store name temporarily for report. */
   1517   char name[MAX_NAME];
-> 1518   strcpy(name, con->name);
   1519   const bool is_first_constraint = con != constraints->first;
``` * thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x60) * frame #0: 0x00007ffff7f31a61 libc.so.6`__strcpy_avx2 + 33 frame #1: 0x0000000004926959 blender`constraint_apply_exec(C=0x00007ffff39485c8, op=0x00007fffca86c448) at object_constraint.c:1518:3 frame #2: 0x0000000003666117 blender`wm_operator_invoke(C=0x00007ffff39485c8, ot=0x00007ffff3e71b48, event=0x0000000000000000, properties=0x00007fffffffce00, reports=0x00007fffd9a2c9e8, poll_only=false, use_last_properties=true) at wm_event_system.c:1335:16 frame #3: 0x000000000365cfd9 blender`wm_operator_call_internal(C=0x00007ffff39485c8, ot=0x00007ffff3e71b48, properties=0x00007fffffffce00, reports=0x00007fffd9a2c9e8, context=WM_OP_EXEC_DEFAULT, poll_only=false, event=0x0000000000000000) at wm_event_system.c:1564:16 frame #4: 0x000000000365db68 blender`WM_operator_call_py(C=0x00007ffff39485c8, ot=0x00007ffff3e71b48, context=WM_OP_EXEC_DEFAULT, properties=0x00007fffffffce00, reports=0x00007fffd9a2c9e8, is_undo=false) at wm_event_system.c:1638:12 frame #5: 0x00007ffff78270a8 libpython3.10.so.1.0`___lldb_unnamed_symbol5938 + 104 frame #6: 0x00007ffff7821613 libpython3.10.so.1.0`_PyObject_MakeTpCall + 675 frame #7: 0x00007ffff781c676 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 20934 frame #8: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120 frame #9: 0x00007ffff782097d libpython3.10.so.1.0`_PyObject_FastCallDictTstate + 397 frame #10: 0x00007ffff7830299 libpython3.10.so.1.0`_PyObject_Call_Prepend + 105 frame #11: 0x00007ffff7902f4e libpython3.10.so.1.0`___lldb_unnamed_symbol7289 + 110 frame #12: 0x00007ffff7821613 libpython3.10.so.1.0`_PyObject_MakeTpCall + 675 frame #13: 0x00007ffff781d3ba libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 24330 frame #14: 0x00007ffff7816422 libpython3.10.so.1.0`___lldb_unnamed_symbol5914 + 66 frame #15: 0x00007ffff78cb370 libpython3.10.so.1.0`PyEval_EvalCode + 144 frame #16: 0x00007ffff78d2c0d libpython3.10.so.1.0`___lldb_unnamed_symbol6658 + 253 frame #17: 0x00007ffff78276ec libpython3.10.so.1.0`___lldb_unnamed_symbol5940 + 92 frame #18: 0x00007ffff78177e4 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 820 frame #19: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120 frame #20: 0x00007ffff7817b05 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 1621 frame #21: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120 frame #22: 0x00007ffff7817b05 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 1621 frame #23: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120 frame #24: 0x00007ffff7817b05 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 1621 frame #25: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120 frame #26: 0x00007ffff78177e4 libpython3.10.so.1.0`_PyEval_EvalFrameDefault + 820 frame #27: 0x00007ffff78274e8 libpython3.10.so.1.0`_PyFunction_Vectorcall + 120 frame #28: 0x00000000040f2587 blender`bpy_class_call(C=0x00007ffff39485c8, ptr=0x00007fffffffe048, func=0x0000000013aa1170, parms=0x00007fffffffe028) at bpy_rna.c:8540:13 frame #29: 0x00000000040892b5 blender`rna_operator_execute_cb(C=0x00007ffff39485c8, op=0x00007fffca86c5c8) at rna_wm.c:1317:3 frame #30: 0x0000000003666117 blender`wm_operator_invoke(C=0x00007ffff39485c8, ot=0x00007fffeb3c18c8, event=0x00007fffda531d68, properties=0x00007fffd924d168, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.c:1335:16 frame #31: 0x0000000003669101 blender`wm_handler_operator_call(C=0x00007ffff39485c8, handlers=0x00007fffeb26f080, handler_base=0x00007fffeb643fe8, event=0x00007fffda531d68, properties=0x00007fffd924d168, kmi_idname="CONSOLE_OT_execute") at wm_event_system.c:2324:16 frame #32: 0x00000000036679ac blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff39485c8, event=0x00007fffda531d68, handlers=0x00007fffeb26f080, handler=0x00007fffeb643fe8, keymap=0x00007fffd9195868, do_debug_handler=false) at wm_event_system.c:2677:21 frame #33: 0x0000000003666ecc blender`wm_handlers_do_intern(C=0x00007ffff39485c8, win=0x00007fffeb24c208, event=0x00007fffda531d68, handlers=0x00007fffeb26f080) at wm_event_system.c:3004:26 frame #34: 0x000000000365ff49 blender`wm_handlers_do(C=0x00007ffff39485c8, event=0x00007fffda531d68, handlers=0x00007fffeb26f080) at wm_event_system.c:3145:16 frame #35: 0x0000000003669b7e blender`wm_event_do_region_handlers(C=0x00007ffff39485c8, event=0x00007fffda531d68, region=0x00007fffeb26ef48) at wm_event_system.c:3516:10 frame #36: 0x0000000003660b11 blender`wm_event_do_handlers_area_regions(C=0x00007ffff39485c8, event=0x00007fffda531d68, area=0x00007fffeb1e55c8) at wm_event_system.c:3546:10 frame #37: 0x0000000005320311 blender`::GHOST_DispatchEvents(systemhandle=0x00007ffff39485c8) at GHOST_C-api.cpp:247:11 frame #38: 0x000000000369c29a blender`wm_window_process_events(C=0x7e8c81c0ca1ada00) at wm_window.c:1516:16 frame #39: 0x0000000003655557 blender`WM_main(C=0x00007ffff39485c8) at wm.c:623:5 frame #40: 0x0000000002e18ab4 blender`main(argc=1, argv=0x00007fffffffe9e8) at creator.c:544:5 frame #41: 0x00007ffff7df7b25 libc.so.6`__libc_start_main + 213 frame #42: 0x0000000002e1867e blender`_start + 46 ``` In: ``` 1516 /* Store name temporarily for report. */ 1517 char name[MAX_NAME]; -> 1518 strcpy(name, con->name); 1519 const bool is_first_constraint = con != constraints->first; ```
Member

Added subscribers: @HDMaster84, @lichtwerk

Added subscribers: @HDMaster84, @lichtwerk
Member

Seems like it was wrong since the beginning in d6891d9bee, still setting to High prio since it is a crash in a recent feature.

CC @HDMaster84

Seems like it was wrong since the beginning in d6891d9bee, still setting to High prio since it is a crash in a recent feature. CC @HDMaster84
Member

It actually happens not only with the new operators, but also with the old ones like bpy.ops.constraint.delete(constraint="Transform Cache").

It actually happens not only with the new operators, but also with the old ones like `bpy.ops.constraint.delete(constraint="Transform Cache")`.
Henrik D. self-assigned this 2022-02-25 14:56:07 +01:00
Member

In #96032#1313966, @HDMaster84 wrote:
It actually happens not only with the new operators, but also with the old ones like bpy.ops.constraint.delete(constraint="Transform Cache").

Oops, sorry, true.

> In #96032#1313966, @HDMaster84 wrote: > It actually happens not only with the new operators, but also with the old ones like `bpy.ops.constraint.delete(constraint="Transform Cache")`. Oops, sorry, true.

This issue was referenced by 8c932ab43c

This issue was referenced by 8c932ab43c28d476bd0bf671ef70448f075295ef
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' 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#96032
No description provided.