Possible bug

roger_74 wrote on 3/6/2003, 12:36 PM
This happens on Win98 and WinME. WinXP works as expected.

It seems the Timecode type does not accept a double when there are no tracks on the timeline and none have been there earlier (Vegas is just started and nothing else is done). If given an integer it works fine.

import SonicFoundry.Vegas;
import System.Windows.Forms;


var test : double = 1.1;
var myTimecode : Timecode = new Timecode(test);


MessageBox.Show(myTimecode.ToMilliseconds().ToString());

The first time this is run, I get "Overflow or underflow in the arithmetic operation". If I run it again all is well.

This is not terribly important of course, I just stumbled on it while doing errorhandling for QuickEnvelope. You can't fix it with try-catch because it bombs at compiletime.

Comments

SonyPJM wrote on 3/6/2003, 1:09 PM
This is a known bug and we have a work-around in place for the next release (4.0b). We're also in communication with Microsoft about this bug. In the meantime, either run the script a second time or specify floating point constants as fractions... like:

var test : double = 11 / 10;
roger_74 wrote on 3/6/2003, 1:25 PM
Thanks for the tip!