ZeusWPI / ZeusWPI/SCC

lyrics: index of out range error

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

panic: runtime error: index out of range [10] with length 10

goroutine 50 [running]:
github.com/zeusWPI/scc/internal/pkg/lyrics.parseLRC({0xc0000e6000?, 0x0?}, 0x3892b)
    /home/koin/SCC/internal/pkg/lyrics/lrc.go:119 +0x350
github.com/zeusWPI/scc/internal/pkg/lyrics.newLRC(...)
    /home/koin/SCC/internal/pkg/lyrics/lrc.go:22
github.com/zeusWPI/scc/internal/pkg/lyrics.New({0xad4, {0xc000214078, 0x15}, {0xc0006900d0, 0xa}, {0xc000214090, 0x16}, 0x3892b, {0xc0006900ba, 0x6}, ...})
    /home/koin/SCC/internal/pkg/lyrics/lyrics.go:30 +0x8d
github.com/zeusWPI/scc/tui/view/song.updateCurrentSong({0xd61020?, 0xc000208008})
    /home/koin/SCC/tui/view/song/song.go:290 +0x1f8
github.com/zeusWPI/scc/internal/cmd.tuiPeriodicUpdates(0xc0002ce000, {{0xc57ca4, 0x13}, {0xd61020, 0xc000208008}, 0xc82b18, 0x5}, 0xc00002c070)
    /home/koin/SCC/internal/cmd/tui.go:82 +0x44f
created by github.com/zeusWPI/scc/internal/cmd.TUI in goroutine 1
    /home/koin/SCC/internal/cmd/tui.go:47 +0x2d7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in internal/pkg/lyrics/lrc.go at line 119, then trace how lyrics.New is called from tui/view/song/song.go:290. Reproduce the reported out-of-range panic with the affected LRC input and inspect the parser's indexing assumptions. Done means the input no longer panics and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.