Terminal app crashes with "Failed to load libGLESv2"

Bug #1594198 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Michał Sawicz
qtubuntu (Ubuntu)
Fix Released
Critical
Michał Sawicz

Bug Description

Most likely due to [1] (checking), terminal app crashes on startup, printing:

> Failed to load libGLESv2

An example OOPS can be seen under [2].

[1] https://code.launchpad.net/~gerboland/qtubuntu/adopt-more-eglconvenience2/+merge/295248
[2] https://errors.ubuntu.com/oops/020da136-3673-11e6-9055-fa163eec78fa

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: qtubuntu-android 0.62+15.04.20160527.1-0ubuntu1
Uname: Linux 3.10.100-user-01767-gf5aa556-dirty aarch64
ApportVersion: 2.17.2-0ubuntu1.3touch1
Architecture: armhf
Date: Mon Jun 20 01:05:39 2016
InstallationDate: Installed on 2016-06-18 (1 days ago)
InstallationMedia: Ubuntu 15.04 - armhf (20160618-020304)
SourcePackage: qtubuntu
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Michał Sawicz (saviq) wrote :
Changed in canonical-devices-system-image:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Michał Sawicz (saviq)
milestone: none → backlog
milestone: backlog → 12
description: updated
Michał Sawicz (saviq)
Changed in qtubuntu (Ubuntu):
status: Triaged → In Progress
assignee: Gerry Boland (gerboland) → Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
status: Triaged → In Progress
Revision history for this message
Michał Sawicz (saviq) wrote :

I'm now eye-balling https://code.launchpad.net/~gerboland/qtubuntu/minor-cleanup/+merge/296420 as the culprit after all, confirming soon.

tags: added: lt-blocker regression-proposed
Revision history for this message
Gerry Boland (gerboland) wrote :

My eglconvenience branch does cause this, but annoyingly by doing the correct thing.

Before eglconvenience, we hardcoded GLESv2.0 into QtUbuntu. With eglconvenience, we query the GL version string and correctly fetch the GL version the driver supports. On several of our devices, that is actually GLESv3.0

If GLESv3 is available (not all devices have it), Qt tries to use it instead of alternative GLv2 calls (as they're usually better). It does this by creating a QOpenGLES3Helper class internally, when particular GL calls are made.

Most of our pure QML apps don't end up calling any of those particular GL calls, so work just fine. But Terminal app does.

QOpenGLES3Helper on creation uses QLibrary to load libGLESv2.so and resolve some symbols in it. This is failing for some reason, and prints the "Failed to load libGLESv2.so" message as a result. I suspect this fail has to do with lp:1490956

I've proposed lp:~gerboland/qtubuntu/disable-gles3-for-now as a workaround for this issue

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu - 0.62+16.10.20160620-0ubuntu1

---------------
qtubuntu (0.62+16.10.20160620-0ubuntu1) yakkety; urgency=medium

  * Revert r324 "EGL convenience" (LP: #1594198)

 -- Michał Sawicz <email address hidden> Mon, 20 Jun 2016 08:49:40 +0000

Changed in qtubuntu (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Gerry Boland (gerboland) wrote :

Digging into the actual root cause, QOpenGLES3Helper has QLibrary load "libGLESv2.so" but this is failing. Using LD_DEBUG=libs you can see:

      5646: find library=libGLESv2.so [0]; searching
      5646: search path=/vendor/lib:/system/lib (LD_LIBRARY_PATH)
      5646: trying file=/vendor/lib/libGLESv2.so
      5646: trying file=/system/lib/libGLESv2.so
      5646: search cache=/etc/ld.so.cache
      5646: search path=/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf/vfp:/usr/lib/arm-linux-gnueabihf:/lib/tls/v7l/neon/vfp:/lib/tls/v7l/neon:/lib/tls/v7l/vfp:/lib/tls/v7l:/lib/tls/neon/vfp:/lib/tls/neon:/lib/tls/vfp:/lib/tls:/lib/v7l/neon/vfp:/lib/v7l/neon:/lib/v7l/vfp:/lib/v7l:/lib/neon/vfp:/lib/neon:/lib/vfp:/lib:/usr/lib/tls/v7l/neon/vfp:/usr/lib/tls/v7l/neon:/usr/lib/tls/v7l/vfp:/usr/lib/tls/v7l:/usr/lib/tls/neon/vfp:/usr/lib/tls/neon:/usr/lib/tls/vfp:/usr/lib/tls:/usr/lib/v7l/neon/vfp:/usr/lib/v7l/neon:/usr/lib/v7l/vfp:/usr/lib/v7l:/usr/lib/neon/vfp:/usr/lib/neon:/usr/lib/vfp:/usr/lib (system search path)
and off it goes searching all those paths.

Problem is the library is actually called libGLESv2.so.2 on hybris. Qt isn't able to locate the file as a result. I don't know if the library should be called libGLESv2.so only for GLESv3, but if so, it would explain a lot.

For fun, I symlinked libGLESv2.so.2 to libGLESv2.so, for which I got this error:
"OpenGL ES 3.0 entry points not found"
which makes sense as hybris is only exporting GLESv2 symbols, and nothing from GLESv3 yet.

So my patch above is actually the best solution until hybris supports GLESv3.

Revision history for this message
Gerry Boland (gerboland) wrote :

https://github.com/libhybris/libhybris/pull/316 has a better solution to this issue for now

Revision history for this message
Gerry Boland (gerboland) wrote :

https://github.com/libhybris/libhybris/pull/316 has been landed. I can remove the QtUbuntu workaround

Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.