Small Area Flow Compensation parsing error when importing presets from 2.3.1 to 2.3.1-dev. #942

Open
opened 2026-04-05 16:36:46 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jefftopp1984 on 1/29/2026

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

2.3.2-dev

Operating System (OS)

Windows

OS Version

Win 11

Additional system information

12th Gen i7, 64GB RAM, Integrated Graphics

Printer

Creality CR-M4 and Creality CR-6 SE

How to reproduce

Try to slice

Actual results

Error saying that the Small Area Flow Compensation: First Extrusion Length must be 0.

This is actually a FORMATTING ERROR between versions and will affect EVERYONE when 2.3.2 is released because the format has changed between the two versions for the entries into the small area flow compensation model. The semicolon was removed and it causes a parsing error when importing the presets into the new version.

Expected results

Normal Slicing.

Project file & Debug log uploads

None to show

Checklist of files to include

  • Log file
  • Project file

Anything else?

Here is the code to fix it to make the format the same as 2.3.1.

for (auto& line : config.small_area_infill_flow_compensation_model.values) {
try {
static const std::regex num_re(R"([-+]?(?:\d+(?:.\d*)?|.\d+)(?:[eE][-+]?\d+)?)");
std::vector nums;
nums.reserve(8);

            for (auto it = std::sregex_iterator(line.begin(), line.end(), num_re);
                 it != std::sregex_iterator(); ++it) {
                nums.push_back(std::stod((*it).str()));
            }

            if (nums.empty())
                continue;

            if ((nums.size() % 2) != 0) {
                std::stringstream ss;
                ss << "Small Area Flow Compensation: Error parsing data point in small area infill compensation model:" << line << std::endl;
                throw Slic3r::InvalidArgument(ss.str());
            }

            for (size_t i = 0; i + 1 < nums.size(); i += 2) {
                eLengths.push_back(nums[i]);
                flowComps.push_back(nums[i + 1]);
            }
        } catch (...) {
            std::stringstream ss;
            ss << "Small Area Flow Compensation: Error parsing data point in small area infill compensation model:" << line << std::endl;
            throw Slic3r::InvalidArgument(ss.str());
        }
    }

Replace lines 30-53 of ~\src\libslic3r\SmallAreaFlowCompensator.cpp with the above code which puts the semicolons back into the format to allow the previous format to work again.

*Originally created by @jefftopp1984 on 1/29/2026* ### Is there an existing issue for this problem? - [x] I have searched the existing issues ### OrcaSlicer Version 2.3.2-dev ### Operating System (OS) Windows ### OS Version Win 11 ### Additional system information 12th Gen i7, 64GB RAM, Integrated Graphics ### Printer Creality CR-M4 and Creality CR-6 SE ### How to reproduce Try to slice ### Actual results Error saying that the Small Area Flow Compensation: First Extrusion Length must be 0. This is actually a FORMATTING ERROR between versions and will affect EVERYONE when 2.3.2 is released because the format has changed between the two versions for the entries into the small area flow compensation model. The semicolon was removed and it causes a parsing error when importing the presets into the new version. ### Expected results Normal Slicing. ### Project file & Debug log uploads None to show ### Checklist of files to include - [ ] Log file - [ ] Project file ### Anything else? Here is the code to fix it to make the format the same as 2.3.1. for (auto& line : config.small_area_infill_flow_compensation_model.values) { try { static const std::regex num_re(R"([-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?)"); std::vector<double> nums; nums.reserve(8); for (auto it = std::sregex_iterator(line.begin(), line.end(), num_re); it != std::sregex_iterator(); ++it) { nums.push_back(std::stod((*it).str())); } if (nums.empty()) continue; if ((nums.size() % 2) != 0) { std::stringstream ss; ss << "Small Area Flow Compensation: Error parsing data point in small area infill compensation model:" << line << std::endl; throw Slic3r::InvalidArgument(ss.str()); } for (size_t i = 0; i + 1 < nums.size(); i += 2) { eLengths.push_back(nums[i]); flowComps.push_back(nums[i + 1]); } } catch (...) { std::stringstream ss; ss << "Small Area Flow Compensation: Error parsing data point in small area infill compensation model:" << line << std::endl; throw Slic3r::InvalidArgument(ss.str()); } } Replace lines 30-53 of ~\src\libslic3r\SmallAreaFlowCompensator.cpp with the above code which puts the semicolons back into the format to allow the previous format to work again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#942