Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#545 closed defect (fixed)

SIGSEGV in mythfrontend when exiting a recording

Reported by: hansi.urpils@… Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by danielk)

Hi!

I get a segmentation fault when I start to watch a recording and hit "ESC" immediately after the screen goes black. However, after the video starts playing, hitting "ESC" brings me back to the "watch recordings" screen as expected, so it only happens during a short time frame.

Backtrace is attached.

Attachments (3)

backtrace-watch_recordings.txt.gz (4.6 KB) - added by hansi.urpils@… 14 years ago.
Backtrace
vsync-locking.patch (498 bytes) - added by danielk 14 years ago.
possible fix
backtrace-watch_recordings-with_vsync_locking_patch.txt.gz (4.7 KB) - added by hansi.urpils@… 14 years ago.

Download all attachments as: .zip

Change History (10)

Changed 14 years ago by hansi.urpils@…

Backtrace

Changed 14 years ago by danielk

Attachment: vsync-locking.patch added

possible fix

comment:1 Changed 14 years ago by danielk

Milestone: unknown
Owner: changed from Isaac Richards to danielk
Version: head

Can you try the attached patch and see if it fixes the problem?

comment:2 Changed 14 years ago by hansi.urpils@…

I'm sorry, this didn't fix it. Do you need a new backtrace?

comment:3 Changed 14 years ago by danielk

Sure a backtrace with the patch. It should at least be crashing somewhere else with the patch.

BTW what drivers are you using for your video display card? and at what version?

Changed 14 years ago by hansi.urpils@…

comment:4 Changed 14 years ago by hansi.urpils@…

I've attached the new backtrace.

I'm using the nvidia drivers version 7174 with a Geforce 4 MX 440.

X is "XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-14sarge1 20050901212727".

comment:5 Changed 14 years ago by danielk

(In [7684]) Fixes #573. References #545.

This fixes the problem of VSync syncing to the wrong screen in multiple screen configurations most of the time. If you span multiple screens, or move the window after it is initialized the sync may be off. I do create the OpenGL window in the center of the playback window, so if a just the edges of the window are on another screen, you are probably OK.

As for the segfault, this probably fixes it. But since I can't reproduce it I can't be sure. It appears the problem was that Start()/WaitForFrame?()/Stop() and the dtor of OpenGLVideoSync were not being called in the same thread. It looks like there was an earlier attempt to fix this by calling Stop() in the same thread as the destructor in tv_play, but this raced with the WaitForFrame?() calls in the NVP thread. I've put the vsync delete in the NVP thread, which should solve the problem in altogether in non-error conditions. And, I've put a call to Stop() in the OpenGLVideoSync dtor, which should grab the OpenGL context just before it is used in the dtor.

comment:6 Changed 14 years ago by danielk

Description: modified (diff)
Resolution: fixed
Status: newclosed

Since Hansi hasn't piped up, and [7684] should have fixed this I'm closing this ticket.

comment:7 Changed 14 years ago by hansi.urpils@…

Hi!

Sorry for the long delay, I was somewhat distracted by real life.

Yes, this segfault doesn't happen anymore, thanks for fixing it.

Regards, Michael Haas

(hansi.urpils is actually a german joke, a rough translation would be "Got beer?")

Note: See TracTickets for help on using tickets.