[mythtv-commits] Ticket #12056: Two cc608 mid-row codes in a row cause QPainter warning

MythTV noreply at mythtv.org
Wed Feb 12 05:38:41 UTC 2014


#12056: Two cc608 mid-row codes in a row cause QPainter warning
---------------------------------------+-------------------------
     Reporter:  faginbagin <mythtv@…>  |      Owner:  stichnot
         Type:  Patch - Bug Fix        |     Status:  new
     Priority:  minor                  |  Milestone:  unknown
    Component:  MythTV - Captions      |    Version:  Master Head
     Severity:  medium                 |   Keywords:
Ticket locked:  0                      |
---------------------------------------+-------------------------
 After porting the latest changes in master for closed captions to 0.27,
 and playing this video clip with VBI CCs enabled:
 http://ncamftp.wgbh.org/DTV/CEA%20test%20material/Iteration_1/CEAv1.2zero.trp
 the following messages are written several times to stderr by the Qt
 library:
 {{{
 QPainter::begin: Paint device returned engine == 0, type: 3
 QPainter::setFont: Painter not active
 QPainter::setPen: Painter not active
 QPainter::setBrush: Painter not active
 QPainter::end: Painter not active, aborted
 }}}
 I'm pretty sure the same problem exists in master, I just don't have a
 master runtime environment to confirm it. I have confirmed the problem
 does not exist in 0.27-fixes.

 Turns out the above complaints from Qt occur whenever two mid-row codes in
 a row are processed. They lead to:
 * a zero width textRect in FormattedTextChunk::PreRender(),
 * which leads to creation of a QImage with no allocated data,
 * which leads to the complaints from QPainter.

 You can also get Qt to abort and dump core at the point QPainter detects
 the problem, if you run mythfrontend with the environment variable,
 QT_FATAL_WARNINGS=1, and then play the above video clip. See http://qt-
 project.org/doc/qt-4.8/debug.html

 Attached is a patch that tests for and fixes the zero width textRect. It
 fixes the problem in my 0.27-with-cc-changes-from-master environment and
 should fix it in master, too.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12056>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list