Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#13110 closed Bug Report - Crash (fixed)

Issues with Raspbian stretch and MythTV

Reported by: Peter Bennett Owned by: Peter Bennett
Priority: major Milestone: 30.0
Component: Ports - rPi Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

There are several problems with using MythTV frontend on raspbian stretch

  • Compile errors: Many items are conditional upon QT version above 5.4. stretch has 5.7.1 and these are being used for the first time here and do not work. I believe these are all things that are dependent on LVR's customized QT build, which we are not using.
  • Some libs have been renamed since raspbian jessie: There were previously identically named libraries for OpenGLES and EGL, in different directories. Now the one set has been renamed so we must change to use the new name. It causes a problem because the installed QT is built with the wrong ones. QT is built to run off the "experimental" OpenGL. We have to turn off the experimental OpenGL, because with it turned on, OpenMAX video playback does not work.
  • Seg fault starting up mythfrontend: Once we have fixed the executables to runn off the correct (OpenGLES) libraries that do work with video playback, there is a seg fault on startup with QT accessing the OpenGLES library and presumable doing something that was designed only for the OpenGL library.
  • OpenGL OSD is not showing: Once we have overridden QT to not use OpenGL for xcb, the frontend runs and plays recordings but there is no OSD.
  • OpenGL Errors 0x0502 (invalid operation) reported in log: a call to glTexImage2D is used to create a texture for displaying the OSD. It is sometimes (not always) returning invalid operation.
  • It appears that the OSD may be showing behind the playback. Previously, all OpenGL was displayed over the playback window so it was perfect for OSD. Now all OpenGL seems to be behind the playback window.

Change History (11)

comment:1 Changed 7 years ago by Peter Bennett

The OpenGL OSD is not displaying behind the playback, it is not displaying at all.

First the calls to glTexImage2D were failing. I found in the OpenGL ES documentation that when calling that function the internal format and data format must be the same, but they were not. I added a line to set internal format equal to data format. I don't know how this worked before.

In the code in most cases there is no error check after opengl calls. This was causing errors to be logged as occurring in glTexImage2D even if they actually occurred elsewhere.

I traced it and found it was failing in glDrawArrays. I added an error check to the call to glDrawArrays, and those calls are failing, also with 0x0502, Invalid Operation.

The OpenGL code is complex and I am no expert. I don't know why it is failing where before it worked fine. There are log messages that appear to confirm that OpenGL is correctly initialized.

Last edited 7 years ago by Peter Bennett (previous) (diff)

comment:2 Changed 7 years ago by Peter Bennett

I have sorted out all of the problems - doing some testing before committing the fix.

comment:3 Changed 7 years ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: newclosed

In ad3fc1b88c17ecf8bad8967422360e13a4a010ec/mythtv:

Raspberry Pi: Support for Raspbian Stretch

  • some libraries in /opt/vc/lib were renamed
  • QT version is now 5.7.1
  • Incorrect code that was based on a custom QT compile was being activated
  • Invalid parameters for creating textures with OpenGL ES
  • QT XCB GL Integration caused a segfault because of incompatible GL libraries.

Fixes #13110

comment:4 Changed 7 years ago by Peter Bennett <pbennett@…>

In f153e7f53afc7c4e20b62be227da1c2ad7f4c392/mythtv:

Raspberry Pi: Support for Raspbian Stretch

  • some libraries in /opt/vc/lib were renamed
  • QT version is now 5.7.1
  • Incorrect code that was based on a custom QT compile was being activated
  • Invalid parameters for creating textures with OpenGL ES
  • QT XCB GL Integration caused a segfault because of incompatible GL libraries.

Fixes #13110

(cherry picked from commit ad3fc1b88c17ecf8bad8967422360e13a4a010ec)

comment:5 Changed 7 years ago by Peter Bennett <pbennett@…>

In ebd69ec33b67df52628eedcb1dca647306cfc887/mythtv:

Raspberry Pi: Support for Raspbian Stretch (fixes/0.28)

This is slightly different from the commit for master and fixes/29.

  • some libraries in /opt/vc/lib were renamed
  • QT version is now 5.7.1
  • Incorrect code that was based on a custom QT compile was being activated
  • Invalid parameters for creating textures with OpenGL ES
  • QT XCB GL Integration caused a segfault because of incompatible GL libraries.

Fixes #13110

comment:6 Changed 7 years ago by Peter Bennett <pbennett@…>

In 7c4a57a42f4c71119b58640ee9f84d50a8afbd53/mythtv:

Fix OpenGL bug introduced recently

commit ad3fc1b88c used an #ifdef instead of #if, resulting in
OpenGL being disabled for all instead of just for raspberry pi.

Refs #13110

comment:7 Changed 7 years ago by Peter Bennett <pbennett@…>

In 7a40b2fcac29743b2756ea28796f45b59aa06e40/mythtv:

Fix OpenGL bug introduced recently

commit ad3fc1b88c used an #ifdef instead of #if, resulting in
OpenGL being disabled for all instead of just for raspberry pi.

Refs #13110

(cherry picked from commit 7c4a57a42f4c71119b58640ee9f84d50a8afbd53)

comment:8 Changed 7 years ago by Peter Bennett <pbennett@…>

In 73cf7474ad38ee2edddfeb7540eb5b7f28b245f4/mythtv:

Fix OpenGL bug introduced recently

commit ad3fc1b88c used an #ifdef instead of #if, resulting in
OpenGL being disabled for all instead of just for raspberry pi.

Refs #13110

comment:9 Changed 7 years ago by Stuart Auchterlonie

Milestone: needs_triage30.0
Version: UnspecifiedMaster Head

comment:10 Changed 7 years ago by Peter Bennett

This also fixes #12757.

comment:11 Changed 6 years ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.