[mythtv] divide by zero, with stack trace
Kevin Chmilar
kevin.chmilar at gmail.com
Mon Nov 29 18:15:20 UTC 2004
Running the head of CVS from 11/28, I got the following divide by zero
crash during commercial flagging. I put a guard around the division
to check if totalFrames is 0, which seemed to get me past the problem:
2004-11-29 08:41:40.486 Scheduled 81 items in 2.4 seconds.
2004-11-29 08:41:40.488 Seem to be woken up by USER
[New Thread 196621 (LWP 19937)]
2004-11-29 08:41:46.295 Started Commercial Flagging for "The Greatest
Canadian" recorded from channel 1006 at Sun Nov 28 21:11:00 2004.
[New Thread 213006 (LWP 19939)]
2004-11-29 08:41:46.338 Initializing audio parms from stream #0.
[New Thread 229391 (LWP 19941)]
2004-11-29 08:42:16.149 Started Commercial Flagging for "King of the
Hill" recorded from channel 1022 at Sun Nov 28 22:30:00 2004.
[New Thread 245776 (LWP 19943)]
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 229391 (LWP 19941)]
0x4190e5c0 in __divdi3 () from
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1
(gdb) bt
#0 0x4190e5c0 in __divdi3 () from
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1
#1 0xb7ca2858 in NuppelVideoPlayer::FlagCommercials(bool, bool, int*)
(this=0x80eca10,
showPercentage=false, fullSpeed=false, controlFlag=0xbddffa9c)
at NuppelVideoPlayer.cpp:3391
#2 0xb7e418ed in JobQueue::DoFlagCommercialsThread() (this=0x80e4200)
at jobqueue.cpp:1600
#3 0xb7e40529 in JobQueue::FlagCommercialsThread(void*) (param=0x80e4200)
at jobqueue.cpp:1494
#4 0xb7422e1f in pthread_start_thread () from /lib/libpthread.so.0
#5 0xb7422eaf in pthread_start_thread_event () from /lib/libpthread.so.0
#6 0xb739ad6a in clone () from /lib/libc.so.6
(gdb) up
#1 0xb7ca2858 in NuppelVideoPlayer::FlagCommercials(bool, bool, int*)
(this=0x80eca10,
showPercentage=false, fullSpeed=false, controlFlag=0xbddffa9c)
at NuppelVideoPlayer.cpp:3391
3391 percentage = framesPlayed * 100 / totalFrames;
(gdb) l
3386 usleep(10000);
3387
3388
3389 if ((framesPlayed % 100) == 0)
3390 {
3391 percentage = framesPlayed * 100 / totalFrames;
3392 if (showPercentage)
3393 {
3394 if (totalFrames)
3395 {
(gdb) p totalFrames
$1 = 0
More information about the mythtv-dev
mailing list