Bug #1417
openCrash at exit after "video lagging behind after recording stop" bugfix
0%
Description
After the "video lagging behind after recording stop" bugfix in git (git commit 7615305960cfa93c17120f9078fbcb9a62b8bb67), softhddevice always crashes for me on vdr exit. This is a vdpau-only system, vdr 2.0.2, current softhddevice git. If I revert that change, the crash doesn't happen.
#0 0x0000000000000000 in ?? () #1 0x00007f12e9064b7d in SetPlayMode (play_mode=<optimized out>) at softhddev.c:2460 #2 0x00007f12e905bd1b in cSoftHdDevice::SetPlayMode (this=<optimized out>, play_mode=pmNone) at softhddevice.cpp:2213 #3 0x00007f12f3d307dd in cDevice::Detach (this=0x7f12f5a12ce0, Player=Player@entry=0x7f12f5c4a2b0) at device.c:1247 #4 0x00007f12f3d7d6a4 in cPlayer::Detach (this=this@entry=0x7f12f5c4a2b0) at player.c:37 #5 0x00007f12f3dbd1b4 in cTransfer::Activate (this=0x7f12f5c4a180, On=<optimized out>) at transfer.c:35 #6 0x00007f12f3d31735 in cDevice::Detach (this=<optimized out>, Receiver=Receiver@entry=0x7f12f5c4a180) at device.c:1707 #7 0x00007f12f3d7f584 in cReceiver::Detach (this=this@entry=0x7f12f5c4a180) at receiver.c:90 #8 0x00007f12f3dbd00c in cTransfer::~cTransfer (this=0x7f12f5c4a180, __in_chrg=<optimized out>) at transfer.c:22 #9 0x00007f12f3dbd069 in cTransfer::~cTransfer (this=0x7f12f5c4a180, __in_chrg=<optimized out>) at transfer.c:24 #10 0x00007f12f3dbd0c4 in cTransferControl::~cTransferControl (this=0x7f12f5a0b480, __in_chrg=<optimized out>) at transfer.c:72 #11 0x00007f12f3dbd0f9 in cTransferControl::~cTransferControl (this=0x7f12f5a0b480, __in_chrg=<optimized out>) at transfer.c:73 #12 0x00007f12f3d7d864 in cControl::Shutdown () at player.c:105 #13 0x00007f12f3d1899d in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1399
Line 2460 in softhddev.c is:
VideoSetClosing(MyVideoStream->HwDecoder);
Files
Updated by johns over 11 years ago
- Status changed from New to Assigned
- Assignee set to johns
I can't reproduce the crash. Can you try this patch?
index e3787bd..cc45aaa 100644 --- a/softhddev.c +++ b/softhddev.c @@ -2457,8 +2457,10 @@ int SetPlayMode(int play_mode) MyVideoStream->NewStream = 1; MyVideoStream->InvalidPesCounter = 0; // tell hw decoder we are closing stream - VideoSetClosing(MyVideoStream->HwDecoder); - VideoResetStart(MyVideoStream->HwDecoder); + if (MyVideoStream->HwDecoder) { + VideoSetClosing(MyVideoStream->HwDecoder); + VideoResetStart(MyVideoStream->HwDecoder); + } #ifdef DEBUG VideoSwitch = GetMsTicks(); #endif
Updated by SPAM over 11 years ago
I had already tried that change, it makes no difference, it still crashes in VideoSetClosing(MyVideoStream->HwDecoder)
.
Updated by johns over 11 years ago
Happens it always? How can i reproduce the crash?
I have another exit/close protection:
@@ -2448,7 +2448,8 @@ uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height) int SetPlayMode(int play_mode) { VideoDisplayWakeup(); - if (MyVideoStream->Decoder) { // tell video parser we have new stream + // tell video parser we have new stream + if (MyVideoStream->Decoder && !MyVideoStream->SkipStream) { if (MyVideoStream->ClearClose) { // replay clear buffers on close Clear(); // flush all buffers MyVideoStream->ClearClose = 0;
Updated by SPAM over 11 years ago
johns wrote:
Happens it always? How can i reproduce the crash?
Yes, it happens every time I shut down VDR. If it doesn't for you, I don't know of other ways to reproduce it.
I have another exit/close protection:
[...]
That does not seem to make a difference, it still crashes with current git.
Updated by SPAM almost 10 years ago
- File exit-crash.patch exit-crash.patch added
I finally found the cause, the video module apparently gets changed to noop at some point in exit and some calls for functions that were not implemented in noop were attempted. Fix attached.