You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AI-assisted (disclosure block included as described in AGENTS.md)
Current Behavior
Note
AI-authored disclosure (alphatab-ai-authored-v1)
Portions of this content were authored by an AI agent. The agent has read AGENTS.md and the human submitter accepts responsibility for
compliance with the rules in that document.
With the default (WebWorker) player, calling api.midiLoaded.on(handler) after a score has been loaded and its MIDI generated throws immediately:
RangeError: Maximum call stack size exceeded
at get loadedMidiInfo (https://cdn.jsdelivr.net/npm/@coderline/alphatab@1.8.4/dist/alphaTab.min.js:51:517921)
at get loadedMidiInfo (https://cdn.jsdelivr.net/npm/@coderline/alphatab@1.8.4/dist/alphaTab.min.js:51:517921)
at get loadedMidiInfo (https://cdn.jsdelivr.net/npm/@coderline/alphatab@1.8.4/dist/alphaTab.min.js:51:517921)
...
Firefox reports the same recursion with its own wording:
InternalError: too much recursion
get loadedMidiInfo@https://cdn.jsdelivr.net/npm/@coderline/alphatab@1.8.4/dist/alphaTab.min.js:51:517906
get loadedMidiInfo@https://cdn.jsdelivr.net/npm/@coderline/alphatab@1.8.4/dist/alphaTab.min.js:51:517909
get loadedMidiInfo@https://cdn.jsdelivr.net/npm/@coderline/alphatab@1.8.4/dist/alphaTab.min.js:51:517909
...
The same registration made before the first load works, and the handler is
then called on every later loadMidiForScore().
Expected Behavior
Registering a midiLoaded handler at any time should work. Other events
(scoreLoaded, playerReady) accept late registration and immediately hand
the current value to the new handler; midiLoaded should do the same instead
of throwing.
Steps To Reproduce
Create the API with the player enabled and load any score:
Is there an existing issue for this?
I have read the contribution rules
AI authorship
AI-assisted (disclosure block included as described in AGENTS.md)
Current Behavior
Note
AI-authored disclosure (
alphatab-ai-authored-v1)Portions of this content were authored by an AI agent. The agent has read
AGENTS.md and the human submitter accepts responsibility for
compliance with the rules in that document.
With the default (WebWorker) player, calling
api.midiLoaded.on(handler)after a score has been loaded and its MIDI generated throws immediately:
Firefox reports the same recursion with its own wording:
The same registration made before the first load works, and the handler is
then called on every later
loadMidiForScore().Expected Behavior
Registering a
midiLoadedhandler at any time should work. Other events(
scoreLoaded,playerReady) accept late registration and immediately handthe current value to the new handler;
midiLoadedshould do the same insteadof throwing.
Steps To Reproduce
Create the API with the player enabled and load any score:
Wait until
playerReadyhas fired (the MIDI is generated and loaded).Run
Observe the
RangeErrorabove. Repeating step 3 before step 1's loadinstead works.
Link to jsFiddle, CodePen, Project
No response
Version and Environment
Platform
Web
Anything else?
No response