Sapling addon leaves glitch and crashes blender (unresponsive) #38495
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#38495
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
Operating system and graphics card:
windows 7 64bit
nvidia gtx 660
intel i5 3570K
Blender Version
Broken: 2.69 64bit official release (from blender.org website)
Worked: (optional)
Short description of error
when dragging back/left on the number of leaves (to set it to 0) blender becomes unresponsive for around 20-30 seconds, then a random negative value or positive value (extremely high) will pop up and the leaves, will be flattened along each branch, shortly after which blender becomes unresponsive completely and requires you to close the program.
Exact steps for others to reproduce the error
Changed status to: 'Open'
Added subscriber: @TimCrellin
#37507 was marked as duplicate of this issue
#37819 was marked as duplicate of this issue
#37112 was marked as duplicate of this issue
#39603 was marked as duplicate of this issue
Added subscriber: @BrendonMurphy
hi, confirmed this crashes blender.
I will investigate furthur.
Thanks.
Added subscribers: @gandalf3, @brecht, @truman, @jrsmoots, @kevindietrich, @ideasman42, @mont29, @Sergey, @Traverso, @Harvester, @RobertDowling, @a.vector
◀ Merged tasks: #37112, #39603, #37819, #37507.
Added subscriber: @mutantbob
While investigating this using the current git tree (git 3c9e11df37581c6faf937bbe974710a7fc95e380) I noticed that there's an error message:
Since this is in a branch for the condition ( leaves<0 ) I tried changing that statement to
and now dragging the leaves into negative territory doesn't crash blender, although its behavior is kind of weird if you don't have branch splitting levels >= 3, and even then it seems of dubious utility to my limited imagination.
Based the fact that the field permits negative values and has code to (sometimes) properly handle negative values, I'm assuming that this represents a special mode of the sapling generator which should be preserved.
A second aspect to the reported problem is how dragging can result in very large values for leaves which crash blender. This is mostly a Human Interface Design failure.
Dragging is by nature an interactive action, but in the case of leaf count it's pretty easy to increase the number to the point where it can take a second or ten to calculate the new mesh. At this point, blender is no longer interactive and it is plausible that user mouse movements could easily be interpreted to set the value even farther into crazyspace, exacerbating the problem.
When dragging, I'd say that -100 .. 100 would be a reasonable range (although people with slower computers might choose -50..50 .
However, if you were to just type in the value 1000, my computer takes 21 seconds to compute the mesh, but then the 3D viewport is plenty interactive. In this use case the 100 limit seems pretty silly. It is not unusual for parts of my workflow to take several minutes (physics baking, external simulations), so 21 seconds to generate a tree is no big deal.
I suspect that whatever limit we placed on the leaves value would become a straitjacket on somebody with a legitimate mission (although they would be outliers). If it were possible to limit the dragged values differently than the typed values, I would recommend doing that. If you can't impose separate limits, I'd recommend disabling dragging for the leaves field.
Added subscriber: @Genome36
Since this could affect other values settings in the add on we should just disable the update fuction of the bpy.types.uilayout.prop() because each time the number is changed blender tries to recalculate the mesh.
I.E.: While dragging from 0 to 10, it has to go through 9 unnecessary recalculations before giving the one for the value 10.
Solution: add a recalculate button at the bottom and disable update argument.
initial fix by purplefrog in irc https://developer.blender.org/rBA0e536cd1b7225ef7b6c9edd982b2d9d5c527ce92
fixes for armatures are still needed.
Changed status from 'Open' to: 'Resolved'
fixed armature parent & animation.
https://developer.blender.org/rBAcc4a3674e44c18c4d7ed38033c981d949f90a0bd
closing.