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

Lightning infill with sparse infill width set to 0 causes "divide by zero" fatal error #3567

Closed
2 tasks done
Snelso91 opened this issue Jan 8, 2024 · 5 comments · Fixed by #3592
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@Snelso91
Copy link

Snelso91 commented Jan 8, 2024

OrcaSlicer Version

1.9.0

OS version

Windows 10

Additional system information

CPU: AMD Ryzen 7 3700X
RAM: 32GB
GPU: Nvidia RTX 3060

Printer

Bambu Lab A1

How to reproduce

  1. Go to the Strength tab, then infill, and change the sparse infill pattern to Lightning
  2. Go to the Quality tab, then line width, and change the sparse infill width to 0 (which should mean it uses the default line width)
  3. Try to slice a print, it will give an error and will fail to slice.

Actual results

The error given is:

A fatal error occurred: "Divide by zero"
Please save your project and restart the application.

image

This same exact error also happens with Bambu Studio 1.8.2.56 if you follow the same steps.

The error does not occur if you do not use lightning infill, or if you use a line width other than 0.
For example using a line width of 0 with the "line" infill type works fine, and using a line width in either absolute (0.42mm) or percent (105%) terms with lightning infill also works fine.

Expected results

The object should slice using the default line width field, as it does when using infills other than lightning.

Project file & Debug log uploads

cube lightning infill bug.zip
debug_Mon_Jan_08_19_45_22_21204.log.zip

Checklist of files to include

  • Log file
  • Project file
@Snelso91 Snelso91 added the bug Something isn't working label Jan 8, 2024
@Snelso91 Snelso91 changed the title Lightning infill with sparse infill width set to 0 causes divide by 0 fatal error Lightning infill with sparse infill width set to 0 causes "divide by zero" fatal error Jan 8, 2024
igiannakas added a commit to igiannakas/OrcaSlicer that referenced this issue Jan 9, 2024
…set to 0 causes "divide by zero" fatal error
igiannakas added a commit to igiannakas/OrcaSlicer that referenced this issue Jan 9, 2024
…set to 0 causes "divide by zero" fatal error
@igiannakas
Copy link
Contributor

Fixed in the PR above. Please test and report back :)

@Snelso91
Copy link
Author

Snelso91 commented Jan 9, 2024

@igiannakas thanks for the fix - could you provide some details on how I should test this fix from a user perspective (as I am not a developer so I'm not familiar with testing github commits)?

My guess is that the simplest way would be to download a portable version of orcaslicer 1.9.0 (so I don't have to overwrite my installed version), download your patched Generator.cpp file from the commit and overwrite the portable install's Generator.cpp file with the patched file, then see if the issue is gone?

@igiannakas
Copy link
Contributor

Sure thing, download the portable version from here, at the bottom of the page, and just use it as normal. Nothing more, the patch is applied in the portable file. https://github.com/SoftFever/OrcaSlicer/actions/runs/7466667672

@Snelso91
Copy link
Author

Snelso91 commented Jan 10, 2024

@igiannakas thanks, I can confirm that build works - it doesn't throw an error when slicing with lightning infill and the infill width set to 0, and the sliced preview infill width is the same as the default width value, as expected.

Should I close this issue now that the fix is confirmed, or will that be done automatically once it is approved for merging into SoftFever:main?

@igiannakas
Copy link
Contributor

Yeap you can close it to save the admin later, at some point the bug fix will be rolled into the next release.

igiannakas added a commit to igiannakas/OrcaSlicer that referenced this issue Jan 13, 2024
…ill-with-sparse-infill-width-set-to-0-causes-divide-by-zero-fatal-error
igiannakas added a commit to igiannakas/OrcaSlicer that referenced this issue Jan 14, 2024
…parse-infill-width-set-to-0-causes-divide-by-zero-fatal-error
SoftFever pushed a commit that referenced this issue Jan 14, 2024
…uses "divide by zero" fatal error (#3592)

* Fix issue #3567 - Lightning infill with sparse infill width set to 0 causes "divide by zero" fatal error

* Merge branch 'SoftFever:main' into Fix-#3567---Lightning-infill-with-sparse-infill-width-set-to-0-causes-divide-by-zero-fatal-error

* Merge branch 'main' into Fix-#3567---Lightning-infill-with-sparse-infill-width-set-to-0-causes-divide-by-zero-fatal-error
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
2 participants