Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Node.js import of a malformed GPX file does not return

オープン
#2,967 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
backend, testing

調査の方向性

Start at ScoreLoader.loadScoreFromBytes and trace how malformed GPX input is parsed; the issue provides a Node.js reproduction that generates the input and compares it with a control case. Run that reproduction and identify where the backward entry causes the import to stop returning. Done means the malformed input returns an import error promptly, while the control case continues to fail promptly as shown.

索引モデルが issue の本文から書いたものです。

説明

ai-authored

[!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.

Is there an existing issue for this?
  • I have searched the existing issues
I have read the contribution rules
AI authorship

AI-assisted (disclosure block included as described in AGENTS.md)

Current Behavior

In Node.js with alphaTab 1.8.4, ScoreLoader.loadScoreFromBytes does not return or throw for the small malformed GPX input generated below. A parent process terminates the import after 2.5 seconds. The control input returns an import error promptly in the same environment.

This affects callers that import an invalid file synchronously: the call does not yield control back to the application. This report concerns observed import behavior only.

Expected Behavior

Reject the malformed file with an import error and return control to the caller, as the control case does.

Steps To Reproduce
  1. In a temporary directory, run npm init -y and npm install --save-exact @coderline/[email protected].
  2. Save the following as repro.cjs in that directory.
  3. Run node repro.cjs. The script runs each import in a child process and terminates it after 2.5 seconds, so the reproduction itself does not hang indefinitely.
const { spawnSync } = require('node:child_process');
const os = require('node:os');
const alphaTab = require('@coderline/alphatab');

if (process.argv[2]) {
  const bytes = Buffer.alloc(4 + 3 * 4096);
  bytes.write('BCFS');
  if (process.argv[2] === 'backward') {
    const entry = 4 + 2 * 4096;
    bytes.writeUInt32LE(2, entry);
    bytes.write('score.gpif', entry + 4);
    bytes.writeUInt32LE(1, entry + 0x8c);
    bytes.writeUInt32LE(1, entry + 0x94);
  }
  console.log('Calling ScoreLoader.loadScoreFromBytes');
  try {
    alphaTab.importer.ScoreLoader.loadScoreFromBytes(bytes);
    console.log('Import returned');
  } catch (error) {
    console.log('Import threw: ' + error.message);
  }
} else {
  alphaTab.Environment.printEnvironmentInfo();
  console.log(`Node ${process.version}; ${os.type()} ${os.release()}; ${os.arch()}`);
  for (const mode of ['control', 'backward']) {
    const result = spawnSync(process.execPath, [__filename, mode], {
      timeout: 2500,
      encoding: 'utf8',
      maxBuffer: 1024 * 1024
    });
    console.log(`--- ${mode} ---`);
    process.stdout.write(result.stdout || '');
    process.stderr.write(result.stderr || '');
    console.log(`status=${result.status}; signal=${result.signal}; error=${result.error?.code || 'none'}`);
  }
}

Observed output after the environment details:

--- control ---
Calling ScoreLoader.loadScoreFromBytes
Import threw: No compatible importer found for file
status=0; signal=null; error=none
--- backward ---
Calling ScoreLoader.loadScoreFromBytes
status=null; signal=SIGTERM; error=ETIMEDOUT
Link to jsFiddle, CodePen, Project

The complete reproduction and input generator are included above; no application repository or external score file is required.

Version and Environment

Actual output from alphaTab.Environment.printEnvironmentInfo(), followed by Node.js and operating-system information from the reproduction:

[AlphaTab][VersionInfo] alphaTab 1.8.4
[AlphaTab][VersionInfo] commit: 022a45c8e42370f9e12e68949d11eada370da83d
[AlphaTab][VersionInfo] build date: 2026-07-05T14:46:18.224Z
[AlphaTab][VersionInfo] High DPI: 1
[AlphaTab][VersionInfo] Platform: NodeJs
[AlphaTab][VersionInfo] WebPack: false
[AlphaTab][VersionInfo] Vite: false
Node v26.12.0; Darwin 27.0.0; arm64
Platform

Node.js

Anything else?

The sample is intentionally malformed and generated entirely by the script. This has been reproduced with the released npm package version shown above. Other versions and platforms have not been tested.

主要言語
TypeScript
スター
1.9k
フォーク
297
平均マージ
9時間 2分
マージ済み PR(30日)
44

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CoderLine/alphaTab のほかの issue

CoderLine/alphaTab の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。