Yikai-Liao / symusic

A cross platform note level midi decoding library with lightening speed, based on minimidi.
https://yikai-liao.github.io/symusic/
MIT License
108 stars 8 forks source link

Segmentation Fault when reading Score from MIDI files #34

Closed JLenzy closed 3 months ago

JLenzy commented 3 months ago

I am getting Segmentation faults when attempting to read get Scores from this database: https://zenodo.org/records/5120004#.Yhxr0-jMJBA

I am simply trying to read in all the MIDI files as scores when it occurs:

score_dict = {}
midi_files = list(Path(input_dir).glob("**/*.mid"))

fail_count = 0
for mf in tqdm(midi_files):
  try:
      name = str(Path(mf).stem)
      score = Score(mf)
  except Exception as e:
      fail_count = 1

Python simply returns: Segmentation fault

After re-running multiple times, it seems to happen on different files each time. Following this post I tried increasing my stack memory to 12,000 but that did not fix the issue

Yikai-Liao commented 3 months ago

Thanks for the feedback, I'll do further testing afterward. I'm a bit busy this week.

JLenzy commented 3 months ago

Hi @Yikai-Liao , I'm going to close this issue. Tried re-installing symusic and it sorted itself out.

lzqlzzq commented 3 months ago

Sorry for the inconvenience. The previous version of minimidi seems to have this flaw.