Repository navigation
v0.23.0 — hardening: hang/DoS fixes, options that throw, hostile-file guards
All fourteen @chestnutlabs/* packages release in lockstep at v0.23.0 (npm, provenance).
This is a hardening release. It comes from mutation-testing sweeps of the parser, containers, renderers and model viewer. Ordinary files render as before. Options that have no meaning now throw, and hostile files can no longer hang or distort the viewer.
Hang and DoS fixes
- A G2/G3 arc whose points lie beyond the float32 range no longer hangs the parser. Dropped segments count toward
maxSegments(#526). - Replacing the source several times in one tick applies only the newest file. Superseded calls resolve
{ ok: false, cancelled: true }(#531).setScrubTimeno longer draws one segment too many. - A file or quality change during a large tube build no longer shows the previous file's tubes. The geometry pool pairs each reply with its own request (#537).
- Hostile RS274NGC programs (long
elseifchains, long conditions, manycallarguments inside loops) can no longer keep the parser busy for hours.maxProgramIterationsnow counts that work (#540).
Behaviour changes: options that now throw
- Parse
limitsmust be non-negative integers. Anything else throwsParseOptionErrorwithE_PARSE_OPTION, andInfinityis no longer "unlimited" (#521). - Model
limitsthrowModelParseErrorwithE_MODEL_OPTION.maxObjectsis now enforced (E_MODEL_TOO_MANY_OBJECTS). Every 3MF assembly node counts againstmaxInstances, and a self-containing object throwsE_MODEL_CYCLE(#527). - Colour modes: an explicit
rangemust be finite,>= 0and ascending, andonlymust be a 1-based integer. Otherwise there's aRangeErrorbefore anything is stored. The newcheckColorModeis exported fromgcode-colorsandgcode-renderer-2d(#539). - Tube and budget options (
tube.*,tubeByteBudget,geometryMemoryBudgetBytes,geometryConcurrency) andqualityMode/setQualityMode('full' | 'adaptive' | 'fast') throwRangeError(#537). So do build-volume sizes and decimation (#519), andToolpathIRBuilderchannels outside their typed-array range (#533).
Behaviour changes: file data
- Impossible numbers in slicer comments,
.bgcodeand.gcode.3mfsettings and thumbnail headers are left out, with a warning, never thrown on. The warnings aredialect-metadata-invalid,bgcode-metadata-invalid,bgcode-bed-unparsedandcontainer-metadata-invalid. No moreInfinitybeds orNaNprint times (#536, #538). - 3MF and STL files with non-finite geometry fail with
E_MODEL_PARSE(#528)..bgcodewith more than 1,000,000 blocks throwsE_BGCODE_BOMB, and a cut MeatPack stream throwsE_BGCODE_MEATPACK(#536). - A G2/G3 arc with a negative
Eis travel, not extrusion. An arc that omitsI/Jis drawn as an arc, and one with no centre at all warnsarc-missing-center(#521, #524). filamentcolour mode draws a tool or swap the file gave no colour for infallback, instead of borrowing another filament's colour (#539).- RS274NGC
ROUNDrounds halves away from zero, as LinuxCNC does (ROUND[-2.5]=-3). A write to a read-only parameter warnsrs274-readonly-param(#540).
New
renderStilltakesqualityMode(#530).- Segments skipped for a non-finite coordinate are disclosed in 2D and 3D, and 2D now fires
build-complete(#523). BgcodeDecodeResult.droppedThumbnails(#536).
Real-file check
All 47 test-data files went through the full worker pipeline at v0.22.0 and v0.23.0:
- 43 are byte-identical, and no file's metadata changed.
- 3DBenchy gains 3 segments (arcs that omitted an offset).
- plant-sign and screw change only their move kind (retract arcs become travel).