Fix scroll off-by-one in synthetic flood; guard repro against buffer scroll
generateColoredAsciiFlood emitted a trailing \r\n after its final cell, so a flood whose last line lands on the bottom row scrolled the screen. In the alt-buffer repro this destroyed the pinned header row in the BUFFER, making the 255/255 signature diff a content change, not renderer corruption. The single-terminal merge path is actually healthy: with the scroll removed the same 30-chunk merge-heavy workload renders the header with zero drift. - generateColoredAsciiFlood: no linefeed after the final cell - WebglReproExperiment: now a green guard; asserts row-1 buffer text first so a content bug can never masquerade as corruption again - WebglVisual: accurate comments; erase rewritten lines so leftover prefill text doesn't look like corruption - WebglSingleTermStress: replace stale EXPECTED-RED comment (test passes)
This commit is contained in:
@@ -37,11 +37,12 @@ test.describe('WebGL single-terminal heavy render + merge', () => {
|
||||
await loadWebglStrict(ctx);
|
||||
});
|
||||
|
||||
test('heavy merge churn must not crash the GlyphRenderer (xtermjs#322756)', async () => {
|
||||
// EXPECTED RED: with a small page cap, atlas merges shrink the pages array
|
||||
// while GlyphRenderer.render still indexes the old page count -> throws
|
||||
// "Cannot read properties of undefined (reading 'version')" and the terminal
|
||||
// garbles. Capture the crash via pageerror.
|
||||
test('heavy merge churn must not crash the GlyphRenderer (vscode#322756)', async () => {
|
||||
// Guard: heavy merges must not throw from GlyphRenderer.render. Note the
|
||||
// page cap here is lowered AFTER the renderer was built, so _atlasTextures
|
||||
// keeps its original (large) length and this test cannot hit the
|
||||
// page-overflow crash; that scenario needs the cap lowered BEFORE loading
|
||||
// the addon and is covered separately (WebglAtlasOverflow.test.ts).
|
||||
const errors: string[] = [];
|
||||
const onError = (e: Error): void => { errors.push(e.message); };
|
||||
ctx.page.on('pageerror', onError);
|
||||
|
||||
Reference in New Issue
Block a user