Sapling Add-On full of errors. #42138

Closed
opened 2014-10-07 20:01:38 +02:00 by Matt Lindley · 21 comments

System Information
Operating system and graphics card
Windows 8; NVidia GeForce GTX 760

Blender Version
Broken: 2.72
Worked: 2.71

Short description of error
The Sapling Add-On seems partially broken. Changing the preset to the tree type ca_black_oak causes an error:
These statements, though copied from the Blender log panel, appear in reverse order here.


File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\__init__.py", line 552, in execute
  addTree(self)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\utils.py", line 917, in addTree
  splineToBone, splitAngle, splitAngleV, st, startPrune, vertAtt)
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\utils.py", line 721, in perform_pruning
  childP.extend(interpStem(s, tVals, s.segMax * s.segL, s.radS))
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\utils.py", line 199, in interpStem
  scaledT = (t-checkVal)/(tVals[-1]-checkVal)

ZeroDivisionError: float division by zero

location: :-1
********************************Although it does not seem to apply any changes, it does cause other errors that do not otherwise occur within the Sapling settings: cannot turn on bevel, cannot make changes to curvature, etc. If, however, I go back to the presets and change it to one of the other settings, like black_tupelo, the errors stop and I can make changes, as you normally would.Exact steps for others to reproduce the error
Open Blender.
Turn on the Sapling Add-On.
Add a Tree curve.
Change the preset to ca_black_oak *error occurs here
Try to make other changes to the tree *error occurs here
Change the preset back to black_tupelo
Try to make other changes to the tree

**System Information** Operating system and graphics card Windows 8; NVidia GeForce GTX 760 **Blender Version** Broken: 2.72 Worked: 2.71 **Short description of error** The Sapling Add-On seems partially broken. Changing the preset to the tree type ca_black_oak causes an error: These statements, though copied from the Blender log panel, appear in reverse order here. ******************************** ``` File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\__init__.py", line 552, in execute addTree(self) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\utils.py", line 917, in addTree splineToBone, splitAngle, splitAngleV, st, startPrune, vertAtt) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\utils.py", line 721, in perform_pruning childP.extend(interpStem(s, tVals, s.segMax * s.segL, s.radS)) File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\add_curve_sapling\utils.py", line 199, in interpStem scaledT = (t-checkVal)/(tVals[-1]-checkVal) ``` ZeroDivisionError: float division by zero location: <unknown location>:-1 ********************************Although it does not seem to apply any changes, it does cause other errors that do not otherwise occur within the Sapling settings: cannot turn on bevel, cannot make changes to curvature, etc. If, however, I go back to the presets and change it to one of the other settings, like black_tupelo, the errors stop and I can make changes, as you normally would.**Exact steps for others to reproduce the error** Open Blender. Turn on the Sapling Add-On. Add a Tree curve. Change the preset to ca_black_oak *error occurs here Try to make other changes to the tree *error occurs here Change the preset back to black_tupelo Try to make other changes to the tree
Author

Changed status to: 'Open'

Changed status to: 'Open'
Matt Lindley self-assigned this 2014-10-07 20:01:38 +02:00
Author

Added subscriber: @MattLindley

Added subscriber: @MattLindley

#42010 was marked as duplicate of this issue

#42010 was marked as duplicate of this issue

blender/blender#42250 was marked as duplicate of this issue

blender/blender#42250 was marked as duplicate of this issue
Matt Lindley was unassigned by Bastien Montagne 2014-10-07 23:47:18 +02:00
Andrew Hale was assigned by Bastien Montagne 2014-10-07 23:47:18 +02:00
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

hi, after some testing, the issue is when the Limit Import button is checked & only with ca_black oak file.
However, the "ZeroDivisionError: float division by zero" error seems endemic throughout the addons settings.
Prune throws same error as do many other changes.
This addon has no maintainer, https://developer.blender.org/p/trumanblending/ has not been active for some time.
I would add a warning "Buggy" for the immediate future & actively seek out a maintainer to fix current issues.

hi, after some testing, the issue is when the Limit Import button is checked & only with ca_black oak file. However, the "ZeroDivisionError: float division by zero" error seems endemic throughout the addons settings. Prune throws same error as do many other changes. This addon has no maintainer, https://developer.blender.org/p/trumanblending/ has not been active for some time. I would add a warning "Buggy" for the immediate future & actively seek out a maintainer to fix current issues.
Member

Added subscribers: @kintoun1, @truman

Added subscribers: @kintoun1, @truman

Added subscriber: @LeeA.Wentzel

Added subscriber: @LeeA.Wentzel
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk

Added subscriber: @AditiaA.Pratama

Added subscriber: @AditiaA.Pratama

Added subscriber: @NikoLeopold

Added subscriber: @NikoLeopold
Andrew Hale was unassigned by NikoLeopold 2014-10-25 23:50:50 +02:00
NikoLeopold self-assigned this 2014-10-25 23:50:50 +02:00

this should fix the zero by division errors and also make the shape affect first level branches: D844
its just 3 lines of code so you can change it yourself in the addon if you need a quick fix.
looking for review. how does this work for addons?

this should fix the zero by division errors and also make the shape affect first level branches: [D844](https://archive.blender.org/developer/D844) its just 3 lines of code so you can change it yourself in the addon if you need a quick fix. looking for review. how does this work for addons?
NikoLeopold was unassigned by Brendon Murphy 2014-10-26 04:16:41 +01:00
Philipp Oeser was assigned by Brendon Murphy 2014-10-26 04:16:41 +01:00
Member

Assigned to lichtwerk (Philipp Oeser).
he has also written a patch, I would expect fixes to be finalized this week.

Assigned to lichtwerk (Philipp Oeser). he has also written a patch, I would expect fixes to be finalized this week.

ok. i didnt know since it was not claimed yet (and author was said to have no time for maintenance)
great to hear that its being done :)

ok. i didnt know since it was not claimed yet (and author was said to have no time for maintenance) great to hear that its being done :)
Member

Thanx for this Nikolaus,
I hope I'll find the time later today or tomorrow to have a final look.
I was more looking into https://developer.blender.org/T42207 which is more about pruning&armatures but hopefully we can solve this all in one go :)

Thanx for this Nikolaus, I hope I'll find the time later today or tomorrow to have a final look. I was more looking into https://developer.blender.org/T42207 which is more about pruning&armatures but hopefully we can solve this all in one go :)

thanks Philipp, i just did a really quick hotfix, there might be more places vulnerable to division by zero errors and other issues. i didnt have more time to test on the weekend unfortunately, just wanted to get it to work quickly :)
thanks for your effort!

thanks Philipp, i just did a really quick hotfix, there might be more places vulnerable to division by zero errors and other issues. i didnt have more time to test on the weekend unfortunately, just wanted to get it to work quickly :) thanks for your effort!
Philipp Oeser removed their assignment 2014-10-28 15:56:27 +01:00
Member

Hi again!
Just wanted to say that I think the patch looks good (but I wont be the person to make a final decission here).
I will leave a note (and a WIP patch) about the other problem ('armatures&pruning' aka #42207) in that bugreport.
I am also on another job for at least a week, so I wont be available -- and thus put this up for grabs for anyone to jump in, sorry about that.
If this hasnt been solved, I will pick it up again when the other job is done [still think this addon deserves to be in addons and should be kept alive :)]

Hi again! Just wanted to say that I think the patch looks good (but I wont be the person to make a final decission here). I will leave a note (and a WIP patch) about the other problem ('armatures&pruning' aka #42207) in that bugreport. I am also on another job for at least a week, so I wont be available -- and thus put this up for grabs for anyone to jump in, sorry about that. If this hasnt been solved, I will pick it up again when the other job is done [still think this addon deserves to be in addons and should be kept alive :)]

i would happily pick it up – you mean the other one, #42207 right?
also i would just extend the current patch of this little problem here to test for more possible vulnerabilities to division by zero and change such to prevent that.

also i wanted to ask who i could ask for code review in the end, since the author is not available..

EDIT: unfortunately i might not be able to look into this until next weekend due to university duties...

i would happily pick it up – you mean the other one, #42207 right? also i would just extend the current patch of this little problem here to test for more possible vulnerabilities to division by zero and change such to prevent that. also i wanted to ask who i could ask for code review in the end, since the author is not available.. EDIT: unfortunately i might not be able to look into this until next weekend due to university duties...

This issue was referenced by 51b6f00666

This issue was referenced by 51b6f00666d2b44bc5f978bb6cea515b0695e5f2

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 51b6f00666.

Closed by commit 51b6f00666.
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 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-addons#42138
No description provided.