traverso-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-devel] Simple bug fix proposal for crash on insert silence <IO


From: Martin Herren
Subject: [Traverso-devel] Simple bug fix proposal for crash on insert silence <IO> command
Date: Fri, 29 Jan 2010 00:51:14 +0100

Hi all,

i noticed a little bug in traverso (at least since 0.49.0rc1 and up to
current git) using the command insert silence <IO>. Not that i really
needed this command but i was trying the different commands while
trying to learn to use Traverso.

After selecting the length of the silence Traverso dies in a horrible
divide by zero in AudioClipView::create_brushes() as the newly created
silent clip has a channel count of zero. My trivial fix is to use a
value of 1 for height calculation when the channel count is zero. As
AudioClipView::draw_db_lines() shares the same height calculation code
i put the same fix there as well to prevent a crash there even i
suspect that this function would never be called on a silent track ;-)

Another way to fix it would be to set a defaut number of channels
higher than zero for silent tracks but that could have side effects on
playback or elsewhere... i don't know Traverso's internals but i think
it's cleaner to just make the drawing code safe in this case.

Feel free to apply the patch as it is, modify it or fix that bug in
another way as you wish.

Cheers,

/Martin

-- 
http://www.sandsoftime.ch

Attachment: 0001-Fix-crash-on-insert-silence-IO-command.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]