Opened 10 years ago

Closed 10 years ago

#8310 closed defect (fixed)

Error running mythcommflag --clearcutlist

Reported by: Ian Barton <ian@…> Owned by: Isaac Richards
Priority: trivial Milestone: unknown
Component: MythTV - General Version: 0.23rc1
Severity: low Keywords: mythcommflag cutlist
Cc: Ticket locked: no

Description (last modified by sphery)

When I try to clear a cut list with mythcommflag the program returns an error, although the cutlist is cleared:

mythcommflag --clearcutlist -f /media/recordings/mythtv/1020_20100121105900.mpg

2010-04-07 08:27:28.960 Using runtime prefix = /usr
2010-04-07 08:27:28.961 Using configuration directory = /home/mythtv/.mythtv
2010-04-07 08:27:28.992 Empty LocalHostName.
2010-04-07 08:27:29.592 Cannot find default UPnP backend
2010-04-07 08:27:29.809 New DB connection, total: 1
2010-04-07 08:27:29.824 Closing DB connection named 'DBManager0'
2010-04-07 08:27:30.440 ProgramInfo(): Updated pathname '':'' -> '1020_20100121105900.mpg'
2010-04-07 08:27:30.491 Cutlist set to: 
2010-04-07 08:27:30.542 MSqlDatabase::OpenDatabase(), db object is not valid!
2010-04-07 08:27:30.593 Driver error was [1/-1]:
Driver not loaded
Database error was:
Driver not loaded

2010-04-07 08:27:30.644 Database not open while trying to load setting: idletimeoutsecs
2010-04-07 08:27:30.644 MSqlDatabase::OpenDatabase(), db object is not valid!
2010-04-07 08:27:30.695 Driver error was [1/-1]:
Driver not loaded
Database error was:
Driver not loaded

2010-04-07 08:27:30.745 Database not open while trying to load setting: masterserverip
2010-04-07 08:27:30.746 MSqlDatabase::OpenDatabase(), db object is not valid!
2010-04-07 08:27:30.797 Driver error was [1/-1]:
Driver not loaded
Database error was:
Driver not loaded

2010-04-07 08:27:30.848 Database not open while trying to load setting: masterserverport
2010-04-07 08:27:30.849 MSqlDatabase::OpenDatabase(), db object is not valid!
2010-04-07 08:27:30.899 Driver error was [1/-1]:
Driver not loaded
Database error was:
Driver not loaded

2010-04-07 08:27:30.950 Database not open while trying to load setting: wolbackendcommand
2010-04-07 08:27:30.950 MSqlDatabase::OpenDatabase(), db object is not valid!
2010-04-07 08:27:31.001 Driver error was [1/-1]:
Driver not loaded
Database error was:
Driver not loaded

2010-04-07 08:27:31.052 Database not open while trying to load setting: backendconnectretry
2010-04-07 08:27:31.100 Using protocol version 56

Just running mythcommflag on its own (ie no --cutlist option) produces no errors.

My .config.xml file looks like this:

<Configuration>
  <UPnP>
    <UDN>
      <MediaRenderer>c41e4d29-e024-4f72-bf90-afd13be68860</MediaRenderer>
    </UDN>
    <MythFrontend>
      <DefaultBackend>
        <USN>uuid:c41e4d29-e024-4f72-bf90-afd13be68860::urn:schemas-upnp-org:device:MediaServer:1</USN>
        <SecurityPin></SecurityPin>
        <DBHostName>192.168.0.31</DBHostName>
        <DBUserName>mythtv</DBUserName>
        <DBPassword>mythtv</DBPassword>
        <DBName>mythconverg</DBName>
        <DBPort>3306</DBPort>
      </DefaultBackend>
    </MythFrontend>
  </UPnP>
</Configuration>

Ian.

Change History (6)

comment:1 Changed 10 years ago by Ian Barton <ian@…>

Here is the beginning of the output of running mythcommflag with no options in case it helps. I am using mythbuntu auto-builds.

mythtv@mythtv:~$ mythcommflag -f /media/recordings/mythtv/1020_20100121105900.mpg 2010-04-06 18:36:51.896 Using runtime prefix = /usr 2010-04-06 18:36:51.897 Using configuration directory = /home/mythtv/.mythtv 2010-04-06 18:36:51.898 Empty LocalHostName?. 2010-04-06 18:36:52.457 Cannot find default UPnP backend 2010-04-06 18:36:52.482 New DB connection, total: 1 2010-04-06 18:36:52.492 Closing DB connection named 'DBManager0' 2010-04-06 18:36:53.334 mythcommflag version: 0.23.20100314-1 www.mythtv.org 2010-04-06 18:36:53.334 Enabled verbose msgs: important

MythTV Commercial Flagger, started at Tue Apr 6 18:36:53 2010 Flagging commercial breaks for: ChanID Start Time Title Breaks


2010-04-06 18:36:53.339 ProgramInfo?(): Updated pathname : -> '1020_20100121105900.mpg' 1020 20100121105900 The X Files 2010-04-06 18:36:53.687 New DB connection, total: 2 2010-04-06 18:36:53.759 Using protocol version 56

comment:2 Changed 10 years ago by sphery

Description: modified (diff)
Priority: majorminor
Severity: mediumlow
Summary: Error running mythcommflag --cutlistError running mythcommflag --clearcutlist

comment:3 Changed 10 years ago by sphery

Priority: minortrivial

The code actually succeeds at clearing the cutlist. However, mythcommflag's SetCutList?() calls ProgramInfo::SetCutList?(), which calls ProgramInfo::SendUpdateEvent?() which uses ProgramInfoUpdater? to send an update. That event is received back by mythcommflag as it's in the process of shutting down (and after the connection to the backend and the database are closed), resulting in a flood of errors as it tries to get the information to wake the backend.

Refs #7714.

comment:4 Changed 10 years ago by J.Pilk@…

It may look 'trivial' with hindsight but it was still worrying when it happened on first using a well established script with 0.23_rc2. Check on possible schema changes, on which action in the script was responsible, on whether it had completed... Otherwise the transition from 0.22-fixes to 0.23 has been fairly painless :-)

comment:5 Changed 10 years ago by sphery

(In [24646]) Ensure we always clean up properly when exiting mythcommflag.

This adds a cleanup guard to mythcommflag to ensure gContext is always deleted, regardless of where we exit (as we exit in different places for many of the command-line arguments). There were several locations where we failed to delete the MythContext on exit, and--coupled with recent changes to the event-passign code--caused problems in some of these situations, dependent on what happened as we were exiting. Refs #8310.

comment:6 Changed 10 years ago by sphery

Resolution: fixed
Status: newclosed

(In [24647]) Ensure we always clean up properly when exiting mythcommflag. Backports [24646] from trunk. Fixes #8310.

Note: See TracTickets for help on using tickets.