YARG icon indicating copy to clipboard operation
YARG copied to clipboard

notes.mid files with open notes on Easy on GHL instruments do not load

Open TadeLn opened this issue 9 months ago • 1 comments

A chart in the notes.mid with a PART GUITAR GHL or PART BASS GHL track containing the "EASY Open Note" (58) MIDI note breaks during song scanning. The song will not show up in the song list and badsongs.txt will show a generic Corruption of either the ini file or chart/mid file error. This bug occurs both in stable (v0.12.3) and nightly (b2453).

Note that notes.chart files work fine with open notes on easy on GHL instruments. It's just the notes.mid format. Converting such a notes.chart file to a notes.mid using various methods (Moonscraper, Onyx "Clean convert to MIDI", Onyx "make REAPER project" + export .mid in REAPER) yields the same error in the notes.mid file.

Expected behavior is either:

  • still allow the song to be loaded (especially because you can't play GHL tracks anyway), or
  • give more info about the error in badsongs.txt so that it's easier to find and fix the error

Here's the exception found in the .log file

--------------- EXCEPTION ---------------
at CacheHandler.Scanning.cs:ScanIniEntry:326
Error while scanning chart file <redacted>/notes.mid!
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at YARG.Core.Song.Midi_SixFret_Preparser.ParseLaneColor_Off (YARG.Core.IO.YARGMidiTrack track) [0x0000f] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.Midi_Instrument_Preparser.ParseNote_Off (YARG.Core.IO.YARGMidiTrack track) [0x00018] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.Midi_Preparser.Process (YARG.Core.IO.YARGMidiTrack track) [0x0007e] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.Midi_SixFret_Preparser.Parse (YARG.Core.IO.YARGMidiTrack track) [0x00005] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.SongEntry.ParseMidi (System.Byte[] file, YARG.Core.Song.Preparsers.DrumPreparseHandler drums, YARG.Core.Song.AvailableParts& parts) [0x001b9] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.IniSubEntry.ParseDotMidi (System.Byte[] file, YARG.Core.IO.Ini.IniSection modifiers, YARG.Core.Song.AvailableParts& parts, YARG.Core.Song.Preparsers.DrumPreparseHandler drums) [0x0003f] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.IniSubEntry.ScanIniChartFile (System.Byte[] file, YARG.Core.Song.ChartType chartType, YARG.Core.IO.Ini.IniSection modifiers) [0x00043] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.UnpackedIniEntry.ProcessNewEntry (System.String chartDirectory, YARG.Core.Song.IniChartNode`1[T] chart, System.IO.FileInfo iniFile, System.String defaultPlaylist) [0x00065] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
  at YARG.Core.Song.Cache.CacheHandler.ScanIniEntry (YARG.Core.Song.Cache.CacheHandler+FileCollector collector, YARG.Core.Song.Cache.IniGroup group, System.String defaultPlaylist) [0x0004d] in <1a5161e405bb48fe8fcf7d1d3640acc3>:0 
-----------------------------------------

TadeLn avatar May 08 '24 05:05 TadeLn

And that edit you added immediately led to solving the issue.

sonicfind avatar May 08 '24 05:05 sonicfind

Should be fixed in the latest nightly

EliteAsian123 avatar May 08 '24 21:05 EliteAsian123