[mythtv-commits] Ticket #1194: PlaybackBox::updateUsage() will crash with floating point exeception

MythTV mythtv at cvs.mythtv.org
Thu Feb 2 07:41:45 UTC 2006


#1194: PlaybackBox::updateUsage() will crash with floating point exeception
----------------------------+-----------------------------------------------
 Reporter:  dag at newtech.fi  |       Owner:  ijr
     Type:  defect          |      Status:  new
 Priority:  minor           |   Milestone:     
Component:  mythtv          |     Version:     
 Severity:  medium          |  
----------------------------+-----------------------------------------------
 PlaybackBox::updateUsage() in programs/mythfrontend/playbackbox.cpp will
 crash with a floatingpoint exception during two conditions:
 1. The total amount of space left is less than 1024 bytes
 2. The call to RemoteGetFreeSpace() doesn't return any info (More likely
 than the previous in case of backend down for example)

 The problem is line 940:
         double perc = (double)((double)freeSpaceUsed /
 (double)freeSpaceTotal);
 where freeSpaceTotal should be checked for 0 before usage.

 I Would attach a patch, but as it will involve artistic decisions about
 what to report as usage and freeI think I leave that to the core team.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1194>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list