Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unhandled exception on sketch update/leave (solver?) #496

Open
MilanV opened this issue Dec 12, 2024 · 0 comments
Open

[BUG] Unhandled exception on sketch update/leave (solver?) #496

MilanV opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MilanV
Copy link

MilanV commented Dec 12, 2024

Contact Details

[email protected]

Description

During my work on a sketch, some objects (e.g. lines) started causing an exception. Sketch editing works as usual, just if I try to leave the sketch or "force update" it, the addon fails with unhandled exception:

Traceback (most recent call last):
  File "/home/milan/.config/blender/3.4/scripts/addons/CAD_Sketcher-main/operators/update.py", line 19, in execute
    update_convertor_geometry(context.scene)
  File "/home/milan/.config/blender/3.4/scripts/addons/CAD_Sketcher-main/converters.py", line 146, in update_convertor_geometry
    conv = BezierConverter(scene, sketch)
  File "/home/milan/.config/blender/3.4/scripts/addons/CAD_Sketcher-main/converters.py", line 50, in to_bezier
    invert_direction = spline_path[1][i]

I added simple debug prints there to see which objects caused that:

CAD_Sketcher-main.converters:{DEBUG}: Index error spline_path[1][0]
CAD_Sketcher-main.converters:{DEBUG}: Index error: spline_path=([bpy.data.scenes['Scene'].sketcher.entities.lines2D[154]], []): 
CAD_Sketcher-main.converters:{DEBUG}: Index error spline_path[1][0]
CAD_Sketcher-main.converters:{DEBUG}: Index error: spline_path=([bpy.data.scenes['Scene'].sketcher.entities.lines2D[156]], []): 
CAD_Sketcher-main.converters:{DEBUG}: Index error spline_path[1][0]
CAD_Sketcher-main.converters:{DEBUG}: Index error: spline_path=([bpy.data.scenes['Scene'].sketcher.entities.lines2D[158]], []): 

See, the second item of spline_path is an empty array for each such object (lines2D).

As a sketch editing works without problems, I cannot say when the problem started and why. Only I can say is that I cannot see those lines highlighted if I select them in the list of entities. Lines of zero length? Ghost lines having no length and no endpoints?

So, in fact, there are two bugs: the visible error/exception and the GUI creating those problematic objects...

In the attached file, it is in the sketch kuk2.
kukatko1.blend.gz

Addon Version

0.27.5

Blender Version

3.4.1

What platform are you running on?

Linux

@MilanV MilanV added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant