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

Access violation when trying to slice after switching to another preset and back again. #5550

Closed
3 tasks done
akoolenbourke opened this issue Jun 2, 2024 · 2 comments
Closed
3 tasks done
Labels
2.1 bug Something isn't working

Comments

@akoolenbourke
Copy link
Contributor

akoolenbourke commented Jun 2, 2024

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

2.1.0 Beta

Operating System (OS)

Windows

OS Version

WIndows 10

Additional system information

AMD 3900x
32GB RAM

Printer

Creality CR10 Smart Pro

How to reproduce

Not sure how anyone else can reproduce but I made a 1mm nozzle preset the other day and today I switched to it and back to my usual 0.4. Then I went to slice and got the error.

I can no longer slice with any of my profiles without this error.

Actual results

Exception as outlined in the screenshot

Expected results

Slicing works.

Project file & Debug log uploads

AccessViolationProject.zip
log.zip

Checklist of files to include

  • Log file
  • Project file

Anything else?

I upgraded to 2.1.0-beta to see if it'd fix the issue but the same problem happened.
Now I cannot slice with any of my profiles at all.

One thing of NOTE is that I have built Orca Slicer myself and ran the build too in order to do make some changes. When I switch between running the official release and my development build, Orca always redownloads the Bambu Network plugin. That's fine, I can handle that but I have also noticed that more often than not when I first go back to running Orca release, my user presets don't load. I then quit Orca, start it again and they are there.

I have attached my log files from today. Not all saw this issue but I'm not sure which one it started on.

I loaded up my 2.1.0 alpha project and the same issue happens. Here's the callstack.
`

OrcaSlicer.dll!anonymous namespace'::tk::spline::set_points(const std::vector<double,std::allocator<double>> & x, const std::vector<double,std::allocator<double>> & y, anonymous-namespace'::tk::spline::spline_type type) Line 297 C++
OrcaSlicer.dll!Slic3r::SmallAreaInfillFlowCompensator::SmallAreaInfillFlowCompensator(const Slic3r::GCodeConfig & config) Line 67 C++
OrcaSlicer.dll!Slic3r::make_unique<Slic3r::SmallAreaInfillFlowCompensator,Slic3r::PrintConfig const &>(const Slic3r::PrintConfig & <args_0>) Line 222 C++
OrcaSlicer.dll!Slic3r::GCode::_do_export(Slic3r::Print & print, Slic3r::GCode::GCodeOutputStream & file, std::function<std::vector<Slic3r::ThumbnailData,std::allocatorSlic3r::ThumbnailData> __cdecl(Slic3r::ThumbnailsParams const &)> thumbnail_cb) Line 1979 C++
OrcaSlicer.dll!Slic3r::GCode::do_export(Slic3r::Print * print, const char * path, Slic3r::GCodeProcessorResult * result, std::function<std::vector<Slic3r::ThumbnailData,std::allocatorSlic3r::ThumbnailData> __cdecl(Slic3r::ThumbnailsParams const &)> thumbnail_cb) Line 1542 C++
OrcaSlicer.dll!Slic3r::Print::export_gcode(const std::string & path_template, Slic3r::GCodeProcessorResult * result, std::function<std::vector<Slic3r::ThumbnailData,std::allocatorSlic3r::ThumbnailData> __cdecl(Slic3r::ThumbnailsParams const &)> thumbnail_cb) Line 2209 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::process_fff() Line 240 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::call_process(std::exception_ptr & ex) Line 439 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::call_process_seh(std::exception_ptr & ex) Line 414 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::call_process_seh_throw(std::exception_ptr & ex) Line 422 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::thread_proc() Line 338 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::thread_proc_safe() Line 482 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::thread_proc_safe_seh() Line 459 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::thread_proc_safe_seh_throw() Line 467 C++
OrcaSlicer.dll!Slic3r::BackgroundSlicingProcess::start::__l10::() Line 524 C++
OrcaSlicer.dll!boost::detail::thread_data<void (void)>::run() Line 121 C++
`

`

Here is the code
// boundary conditions
if(m_left == spline::second_deriv) {
// 2*c[0] = f''
A(0,0)=2.0;
A(0,1)=0.0;
rhs[0]=m_left_value;
} else if(m_left == spline::first_deriv) {
// b[0] = f', needs to be re-expressed in terms of c:
`
And the exception is on the line A(0,0) = 2.0;

Going back to my project and looking at the small area fill compensation settings (The setting was unchecked in my profile but I checked it to see what the configuration looked like) I see this corruption.

image

After restoring the configuration for the SAFC from another preset, I can slice again. It's strange that it got corrupted but also strange that it was even trying to process that when the setting of off.

OrcaAccessViolation

@akoolenbourke akoolenbourke added the bug Something isn't working label Jun 2, 2024
@SoftFever SoftFever added the 2.1 label Jun 3, 2024
@SoftFever
Copy link
Owner

I checked the project file, the small_area_infill_flow_compensation_model are indeed wrong there.
But nevertheless, it should prevent slicing as small_area_infill_flow_compensation was not enabled.
The issue should be fixed now.

Image

@TheSlashEffect
Copy link
Contributor

I've located an issue with the commit addressing this issue; I'm building from master and the value of m_config.small_area_infill_flow_compensation.value is not read as true when the feature is enabled, making the feature not activate.
If I revert 9a4429f the feature works as expected again.
Alternatively, if I move the definition of the config value small_area_infill_flow_compensation from PrintRegionConfig to PrintConfig, the feature works again.
The value was moved to the region config due to this conversation:
How should this be addressed? I'm looking into how to make the current revision work with the parameter in the region config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1 bug Something isn't working
Projects
Development

No branches or pull requests

3 participants