Error Message: "Stack Overflow!" shuts down MT

Max Oepen

2007-10-18 19:07:37

I sometimes get this error message when I open a translator's properties, select "capture midi" and hit a foot pedal that is already triggering another translator in that preset.

MT then immediately shuts down. On subsequent attempts the same thing happens albeit without the error message - MT just shuts down.

Just wondering if you could elaborate on this error message and what usually causes it / how to avoid this.

Thanks,
Max.

florian

2007-10-23 21:25:11

Hi Max,

that's a serious problem, MT is tested to perform for hours or days, to never stop for any reason. Obviously, that's very important for live usage.

The stack overflow message basically means that the program runs in a sort of infinite loop, e.g. when it receives a MIDI message that it feeds back the message again, so that it will be received, and again feed it back. Computers do that very fast, and in a fraction of a second it fed back hundreds of thousands of times, causing some internal memory area (the stack) to overflow.

Which version of MT are you using? I assume it is reproducible for you? Could you send me your preset?

Thanks,
Florian

Max Oepen

2007-10-26 05:01:15

Hi Florian,

I'm using version 1.5 build 615. Yes, it's reproducible and your explanation makes a lot of sense. I already assumed that it was because of a signal loop. Here's what I was trying to achieve:

One of my controllers, an Alesis ControlPadhas two Expression-pedal inputs. I was experimenting with using a Dual pedal (the Boss FS-6 with a mono Y-adapter to split the "on"- and "off"-messages between Pedals A & B, so that I can have two controls for the price of one so to speak. So that if I wanted to, I could get 3 or even 4 controls out of the two inputs with this method.

This would actually work, if there were any difference in how the two switches send their signal, but alas, even with polarity and mode-switches both pedals will always send the same on and off messages ("99 23 00" and "99 23 40") and in the same order. So there is no way to make MidiTranslator distinguish between them, even with rules, etc.

So, in the process of figuring this out, I set up a few scenarios where two translators (one for pedal A and one for B) were effectively receiving the same message but with different outgoing actions. I haven't saved each of these instances, but I could recreate them.

Anyways, it was an idea that sounded exciting at first until I learned the science and burst my bubble :( (as happens all the time. I've learned since I started on my project that compromise is still the name of the game, but I've learned so much in the meantime and that's given me new ideas)

Thanks,
Max.

florian

2007-10-29 17:05:25

can't you use MT's preset switching to define different behavior for the pedal inputs?

If you could reproduce the preset which caused the stack overflow, that would be a great help! Even with an "infinite loop", MT should detect that and interrupt rule processing before the stack overflow occurs.

Thanks,
Florian

jimspree

2007-11-15 09:25:37

I had a few stack overflows today in trying to do some crazy stuff. If I can recreate it I will send my preset.