[yoshimi] Mea Culpa :(

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Fri, 20 Nov 2015 23:02:32 +0000

I'm afraid I have to put my hand up to having created a rather obscure bug.
This was back about half way between the 1.3.4 and 1.3.5 releases, but it
wasn't until much later someone reported the first symptom.

He found that if he had a lot of continuous pan or volume changes sent over
MIDI, the gui seemed to be locked out for that time. I had a quick look but
couldn't see anything wrong with the code, so put it aside - just looking again
from time to time.

Much more recently, I discovered that if you had any part windows open and sent
the above commands, they would be mysteriously closed. Again a quick look
revealed nothing.

The final straw was when running a recent version of Rosegarden, Yoshi would
crash every time just one specific file was loaded. This was unusual in that
at the time of loading *all* 16 parts would have a program change at the same
time!

It didn't take long to work out that it wasn't actually loading programs that
was causing the crash but the gui updates. At this point I remembered someone
telling me about using git bisect to pin down exactly when a bug occurs. I
can't praise this enough. What might have been many hours of work shrank to
about 15 minutes. Just one commit was responsible for all three problems.

I had been struggling with the problems of gui updates for program changes, the
new colour backgrounds and change of number of available parts. I eventually
hit on the idea of re-creating the part, which magically seemed to solve all
the problems. I should have recognised that there is no such thing as magic!

So what did this *actually* do? It closed down and deleted the entire part then
rebuilt it with newly fetched data from the synth engine. It was this rebuild
that was responsible for the disappearing part windows - obvious really. Also,
that is a lot of processing to do in a hurry, so much so that the fast MIDI pan
changes could barely keep up. Once the nest of program changes was also put in
the mix, well it couldn't keep up at all.

So, having pulled the errant code out, I set about getting the gui to respond
correctly. Hopefully it is OK now in the current master. Certainly, none of the
original problems show here after running for several hours with lots of patch
loading, reloading and general messing with the windows - as well as running
*that* file in Rosegarden.

I shall now go and stand in the corner facing the wall :(

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
http://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts:

  • » [yoshimi] Mea Culpa :( - Will Godfrey