Menu

#15 Sub score extra lines removal

0.1
open
Music Logic (4)
7
2007-08-22
2007-07-15
Jules_K
No

Hello,

I have found a bug in the score-reading-trainer program:
If you practice very low notes, the extra lines of the score are not removed properly, i.e. too many are popped from the list holding their sprites. This eventually results in a segmentation fault, as the program tries to remove lines, that aren't there, anymore.
The reason for this is -- I think -- a wrongly set upper limit in the "removal loop". A comment in the code states, that this loop has to stop at the first helper line and then assigns a value of -1 to the variable holding the limit. This is wrong because the first extra line corresponds to the "index" -2 I think (which can be seen e.g. in the code to _add_ helper lines (src/Score.cpp, l. 348)).
But it is hard to describe this in a natural language so please look at the code; the affected lines are in the file src/Score.cpp around line 426.

Attached is a patch to correct this. It was created against the source package of score-reading-trainer -- the Debian package of this program -- in version 0.1.3-2.

Discussion

  • Jules_K

    Jules_K - 2007-07-15

    Patch for the described bug and update of ChangeLog to reflect the change ;)

     
  • J. Pablo Fernández

    • labels: --> Music Logic
    • milestone: --> 0.1
    • priority: 5 --> 7
    • assigned_to: nobody --> pupeno
     
  • J. Pablo Fernández

    Logged In: YES
    user_id=94140
    Originator: NO

    Just some progress information. I've set up another repository to work on SRT and I integrated the patch, it is working nicely! I hope to have news (and hopefully a new release as well) soon.

     

Log in to post a comment.