Is there an existing issue for this?
I have read the contribution rules
AI authorship
Written by a human, no AI assistance
Current Behavior
AlphaTab 1.8.4 fails to render tablature containing slash-notation beats when rhythm stems are enabled.
The GP file imports successfully, but rendering fails with:
[AlphaTab][Worker] An unexpected error occurred in worker
TypeError: Cannot read properties of undefined (reading 'bottomY')
The stack trace points to TabBarRenderer.paintBeamingStem.
This reproduces with both ShowWithBars and ShowWithBeams, across the ScoreTab, Tab, and TabMixed stave profiles. Setting rhythmMode to Hidden avoids the crash.
The apparent cause is that slash-notation beats can have no reserved fret-number collision slots. The method handles holes.length === 1, but when holes is empty it accesses holes[holes.length - 1].bottomY.
Locally, changing the guard from holes.length === 1 to holes.length <= 1 prevents the crash in both a minimal synthetic example and the original GP file.
Expected Behavior
Slash-notation beats should render successfully on tablature staves with rhythm stems enabled, without throwing an exception or interrupting score rendering.
Steps To Reproduce
- Install
@coderline/alphatab@1.8.4.
- Save the following code as
reproduce.mjs.
- Run
node reproduce.mjs.
- Observe the
bottomY TypeError.
import * as alphaTab from '@coderline/alphatab';
const settings = new alphaTab.Settings();
settings.core.engine = 'svg';
settings.core.enableLazyLoading = false;
settings.display.staveProfile = alphaTab.StaveProfile.Tab;
settings.notation.rhythmMode = alphaTab.TabRhythmMode.ShowWithBars;
const score = alphaTab.importer.ScoreLoader.loadAlphaTex(
'(4.2 6.3).8 (4.2 6.3).8 r.8 4.2.8',
settings
);
score.tracks[0].staves[0].bars[0].voices[0].beats[1].slashed = true;
const renderer = new alphaTab.rendering.ScoreRenderer(settings);
renderer.width = 1000;
renderer.error.on(error => console.error(error));
renderer.renderScore(score, [0]);
Changing rhythmMode to alphaTab.TabRhythmMode.Hidden avoids the error.
Link to jsFiddle, CodePen, Project
No response
Version and Environment
AlphaTab: @coderline/alphatab 1.8.4 from npm
OS: macOS
Renderer: SVG
Original application: Vue + Vite, using the AlphaTab rendering worker
Also reproduced independently in Node.js using ScoreRenderer, with both the ESM and CommonJS package entries. The minimal reproduction above does not require Vue, Vite, a browser, or the original GP file.
Platform
Web
Anything else?
No response
Is there an existing issue for this?
I have read the contribution rules
AI authorship
Written by a human, no AI assistance
Current Behavior
AlphaTab 1.8.4 fails to render tablature containing slash-notation beats when rhythm stems are enabled.
The GP file imports successfully, but rendering fails with:
[AlphaTab][Worker] An unexpected error occurred in worker
TypeError: Cannot read properties of undefined (reading 'bottomY')
The stack trace points to TabBarRenderer.paintBeamingStem.
This reproduces with both ShowWithBars and ShowWithBeams, across the ScoreTab, Tab, and TabMixed stave profiles. Setting rhythmMode to Hidden avoids the crash.
The apparent cause is that slash-notation beats can have no reserved fret-number collision slots. The method handles holes.length === 1, but when holes is empty it accesses holes[holes.length - 1].bottomY.
Locally, changing the guard from holes.length === 1 to holes.length <= 1 prevents the crash in both a minimal synthetic example and the original GP file.
Expected Behavior
Slash-notation beats should render successfully on tablature staves with rhythm stems enabled, without throwing an exception or interrupting score rendering.
Steps To Reproduce
@coderline/alphatab@1.8.4.reproduce.mjs.node reproduce.mjs.bottomYTypeError.Changing
rhythmModetoalphaTab.TabRhythmMode.Hiddenavoids the error.Link to jsFiddle, CodePen, Project
No response
Version and Environment
AlphaTab: @coderline/alphatab 1.8.4 from npm OS: macOS Renderer: SVG Original application: Vue + Vite, using the AlphaTab rendering worker Also reproduced independently in Node.js using ScoreRenderer, with both the ESM and CommonJS package entries. The minimal reproduction above does not require Vue, Vite, a browser, or the original GP file.Platform
Web
Anything else?
No response