CuraEngine::LayerPlanTest/AllCombinations/AddTravelTest.NoRetractionIfDisabled/20 fails because sliceDataStorage.storage.supportLayers hasn't been initialized properly
amorozov opened this issue · 1 comments
CuraEngine-5.6.0
ArchLinux
Qt version is not applicable.
PyQt version is not applicable
Display Driver is not relevant
Compile the CuraEngine with the following flags:
- CFLAGS = '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g'
- CXXFLAGS = '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g'
- LDFLAGS = '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
then run make test
(or ninja test
)
Actual Results
the test fails with the following diagnostics:
[ RUN ] AllCombinations/AddTravelTest.NoRetractionIfDisabled/19
[ OK ] AllCombinations/AddTravelTest.NoRetractionIfDisabled/19 (0 ms)
[ RUN ] AllCombinations/AddTravelTest.NoRetractionIfDisabled/20
/usr/include/c++/13.2.1/bits/stl_vector.h:1144: constexpr std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = cura::SupportLayer; _Alloc = std::allocator<cura::SupportLayer>; const_reference = const cura::SupportLayer&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)
This happens because in function SliceDataStorage::getLayerOutlines on line 320:
const SupportLayer& support_layer = support.supportLayers[std::max(LayerIndex(0), layer_nr)];
an attempt to access a support layer is performed while support.supportLayers.size() == 0
So an assertion and a preliminary test exit happen.
Apparently this is the first test which enters the code under if
on the line 318:
if (include_support && (extruder_nr == -1 || extruder_nr == int(mesh_group_settings.get<ExtruderTrain&>("support_infill_extruder_nr").extruder_nr)))
{
Expected results
The tests should be completed without errors
Additional Information
Probably a call to AreaSupport::generateSupportAreas(SliceDataStorage&)
should be performed prior to the SliceDataStorage::getLayerOutlines(....)
. However my knowledge and understanding of CuraEngine internals is pretty limited, so it's just a guess.