bevel_factor_mapping_start/end in python loop #40223
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40223
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
OSX 10.9, Macbook Pro Retina
Blender Version
Broken: 2.70.5
3889483
Short description of error
When I try to set the bevel_factor_mapping_values from python, Blender crashes.
Exact steps for others to reproduce the error
Open the attached .blend file run the code (should be there already)ZHTraffic.blend:
Changed status to: 'Open'
Added subscriber: @cnd
crash is caused by
segcount = (int)(bl->nr / cu->resolu)
when bl->nr isnt dividing evenly29 / 12
- in this case.Also noticed
calc_bevfac_mapping
assumes cu->resolu, but resolu_ren could be used.use_render_resolution
arg should be passed by caller.I think I could fix it: bevfac_for_poly_splines.diff
Added subscriber: @mont29
This issue was referenced by
1923a8f23a
Changed status from 'Open' to: 'Resolved'
Closed by commit
1923a8f23a
.Changed status from 'Resolved' to: 'Open'
Re-opening: curve_crash.blend
vector bezier handles make the segment count incorrect (since they only use one segment).
inspired by "curve_to_displist()" I could fix the vector bezier handles issue.
Additionally I fixed a problem that became only visible with poly splines: swapping start and end factors occurred sometimes in the wrong place because last- and firstblend were not checked in the if-statement on line 1522. bevfac_for_poly_splines_2.diff
@cnd, the patch isnt applying on a recent build, would you mind updating the diff?
updating the diff bevfac_for_poly_splines_3.diff
Checked this patch and there are more issues, I'm testing with valgrind to report problems, while they don't cause crashes they are definitely bugs still.
First, the patch reverts a correction I made previously, when updating patches please check what changed, the reason the patch failed to apply was because a fix was made (check for zero
cu->resolu_ren
).There is a mismatch between
segcount
used to allocbevp_array
, and the index used to readcalc_bevfac_spline_mapping
(reads past array bounds).Cyclic curves also look to cause memory read errors with
bevp_array
, Im not sure this option even makes much sense for cyclic curves?, probably this should just be disabled?While testing I keep getting errors with
rotateBevelPiece
, its reading past array bounds (checks for first/last ignore that bevp is offset bystart
)I'm thinking maybe we should disable this for release, the more I check this feature the more bug's I keep finding.
Added subscriber: @ideasman42
Re-assigning
Note, we might be better off to store some info about the spline in
BevPoint
, having to calculate this after the fact is error prone.Though Im not completely sure of this either, would have to try it and see if it introduces other problems.
Sorry for urging you to test so much. I am new to C but I will get into the XCode Instruments to deliver a better performance in memory testing next time!
zero check for cu->resolu_ren is not necessary anymore since I get the segcount from nu. It also caused the spline to vanish completely. That might has to do with the array errors you discovered.
Cyclic splines: While I had the idea for this feature thinking about open curves, I think it makes sense for cyclic curves too. It basically always makes sense when you want to animate bevstart/end linearly but having segments not equal in length.
Ok. well I found mostly whats needed to fix this and we do a testbuild tomorrow, so Ill finish continue to finish off the fix.
This issue was referenced by
91a91b9362
Changed status from 'Open' to: 'Resolved'
Closed by commit
91a91b9362
.