Opened 14 years ago

Closed 14 years ago

#196 closed patch (fixed)

6984 changes cause SEGV

Reported by: Anduin Withers <awithers@…> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

MythContextPrivate::mainWidow is left uninitialized when ScreenSaverControl::get() is called. The subsequent ScreenSaverX11::ScreenSaverX11() call invokes myth_system, which tries to fetch the main window to send the lirc stop event to; an access to random memory is made, the result of which is occasionally unpleasant.

Stuart Auchterlonie posted a backtrace to the -dev list which I won't reproduce here as it is easy enough to generate.

Attachments (1)

mc.patch (479 bytes) - added by Anduin Withers <awithers@…> 14 years ago.

Download all attachments as: .zip

Change History (2)

Changed 14 years ago by Anduin Withers <awithers@…>

Attachment: mc.patch added

comment:1 Changed 14 years ago by danielk

Resolution: fixed
Status: newclosed

(In [6986]) Closes #196.

Moving the screensaver stuff to Init() in [6984] did not fix the segmentation fault caused by [6977]. Looking deeper at the problem it looks like we need neither the lirc nor the joystick lock at that point. These are only needed once there is a MythMainWindow?.

So this fix:

  • Makes util.cpp only request the locks when there is a MythContext and it has a MythMainWindow?.
  • Adds a safety check for the existance of a MythContext in lock().
  • Initializes all the variables in MythContextPrivate? as early as possible; to make sure all pointers are initialized to NULL if they haven't been set yet.
Note: See TracTickets for help on using tickets.