[mythtv-commits] Ticket #12772: Crash in Recorded.getProgram() for recordings without bookmark after upgrade to 0.28
MythTV
noreply at mythtv.org
Sat Nov 4 18:45:01 UTC 2017
#12772: Crash in Recorded.getProgram() for recordings without bookmark after
upgrade to 0.28
-----------------------------------------+--------------------------------
Reporter: Fred Fettinger <fettinge@…> | Owner: rsiddons
Type: Bug Report - Crash | Status: infoneeded_new
Priority: minor | Milestone: unknown
Component: Bindings - Python | Version: 0.28.0
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-----------------------------------------+--------------------------------
Comment (by Richard Fearn <richardfearn@…>):
This still seems to be a problem with MythTV 29. I upgraded yesterday to
Ubuntu 17.04. `altdict.py`, which I had manually patched, was reset to the
version shipped in the `libmyth-python` package, and this problem came
back.
#12947 is different because that seems to be about '''storing''' a row in
the database, where `0` is an invalid value for `bookmarkupdate`:
{{{
MythTV.exceptions.MythDBError: MySQL error 1292: Incorrect datetime value:
'0' for column 'bookmarkupdate' at row 1
}}}
In this case though, data is being '''read''' from the database, and the
backend seems to be returning the value `4294967295` when the
`bookmarkupdate` value is `0000-00-00 00:00:00`.
I guess this is due to something trying to store -1 in an unsigned 32-bit
integer.
While diagnosing this I put these two lines in `DictData.__init__` in
`altdict.py`:
{{{
print self._field_order
print self._field_type
print data
}}}
which shows that the last item of data is `bookmarkupdate`, the type is
`4`, and the value is `u'4294967295'`.
In the database, the `bookmarkupdate` column in the `recorded` table has
this definition:
{{{
+-----------------+------------------+------+-----+---------------------+-----------------------------+
| Field | Type | Null | Key | Default |
Extra |
+-----------------+------------------+------+-----+---------------------+-----------------------------+
| bookmarkupdate | timestamp | NO | | 0000-00-00 00:00:00 |
|
+-----------------+------------------+------+-----+---------------------+-----------------------------+
}}}
so the value can't be `NULL`. Most of the rows in there have that default
value, `0000-00-00 00:00:00`.
I'm not sure how the backend reads data from the database and returns it
to the Python bindings, but it looks like somehow `0000-00-00 00:00:00` is
being converted to -1, then held as an unsigned integer, and becomes
`4294967295` by the time it gets to the Python bindings.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12772#comment:6>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list