The engine segfaults in a2_ControlWire() when wiring new voices, if there are any units with audio ports before the modulator unit. It appears that the 'from_unit' field is off by one; the first two units get 0, the third unit becomes from_unit 1 etc.
Actually, 'from_unit' is always off by one (except for the first unit). It's just that if the unit before the one we're wiring is also an 'env' unit, we don't segfault - but we wire the wrong output!
The engine segfaults in a2_ControlWire() when wiring new voices, if there are any units with audio ports before the modulator unit. It appears that the 'from_unit' field is off by one; the first two units get 0, the third unit becomes from_unit 1 etc.