Setting endpoint_u property while creating spline in Python gives strange behavior #38985
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#38985
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
OS: Ubuntu 13.10
Linux kernel: 3.11.0-15-generic
Graphics:
VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)
Blender Version
Broken: blender-2.70-19f7f9a-linux-glibc211-x86_64 and blender-2.70-testbuild1-linux-glibc211-x86_64
Short description of error
While creating a spline in Python, if the property "endpoint_u" is set before control points are added, it leads to strange behavior.
Exact steps for others to reproduce the error
In this .blend file, I have completed steps 1-5: bug_curve.py
Changed status to: 'Open'
Added subscriber: @Garrett-8
Added subscriber: @LukasTonne
At some point the curve data apparently gets corrupted during this process, i'm getting an error report and crash with address sanitizer.
This should never happen, the curve may not be what you expect, but it should not be possible to create corrupt data from bpy.
P18: address sanitizer report from #38985
Added subscriber: @Sergey
This is ancient stuff:
Apparently the
Nurb->knotsu
array is allocated with different length in the basicmakeknots
function and in themake_editNurb
/BKE_nurb_duplicate
functions:https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/curve.c$964
vs.
https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/curve.c$565
These arrays are memcpy'd into each other, which works fine as long as the source array is larger, but at some point the reverse case happens and leads to memory corruption. I have no idea if that "4 + " part is intentional, it seems plain wrong. Dates back to the very first SVN commit it seems (2002) ...
@Sergey: i have assigned it to you since iirc you (reluctantly) worked with curve code - feel free to unassign or poke me for discussing.
This issue was referenced by blender/blender-addons-contrib@b839fb9bb7
This issue was referenced by blender/blender@b839fb9bb7
Changed status from 'Open' to: 'Resolved'
Closed by commit blender/blender@b839fb9bb7.