[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Traverso-devel] Simple bug fix proposal for crash on insert silence
From: |
Remon Sijrier |
Subject: |
Re: [Traverso-devel] Simple bug fix proposal for crash on insert silence <IO> command |
Date: |
Fri, 29 Jan 2010 16:32:28 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31-17-generic; KDE/4.3.5; i686; ; ) |
Hi Martin,
Thanks for finding and fixing this problem. I'll upload your fix as is, the
painting could should indeed check for divide by zero.
Keep up the good work :D
Remon
> 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
>