|
pure virtual method called
Program received signal SIGABRT, Aborted.
[Switching to Thread 65541 (LWP 5042)]
0x407e05c1 in kill () from /lib/libc.so.6
(gdb) up
#1 0x4069258d in pthread_kill () from /lib/libpthread.so.0
(gdb) up
#2 0x4069290b in raise () from /lib/libpthread.so.0
(gdb) up
#3 0x407e0364 in raise () from /lib/libc.so.6
(gdb) up
#4 0x407e189b in abort () from /lib/libc.so.6
(gdb) up
#5 0x08077a97 in __cxxabiv1::__terminate(void (*)()) ()
(gdb) up
#6 0x08077ae4 in std::terminate() ()
(gdb) up
#7 0x08076e77 in __cxa_pure_virtual ()
(gdb) up
#8 0x0805dd4e in Player::_start_routine(void*) (arg=0x80f3f98) at mediaplayer/player.cpp:250
player.cpp:250内容如下:
pPlayer->m_pDecoder->play();
这个Decoder::play()是一个pure virtual function,在这里pPlayer->m_pDecoder是一个MP3Decoder,继承于Decoder
注明:程序在播放一首歌曲的时候实际上是一个独立的线程,在切换歌曲的时候一般运行正常,但是如果切换速度非常快,切了几首就会出现gdb上面的提示。可能是什么原因? |
|