Black WebView window

Bug #1661093 reported by Pat D
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cordova Ubuntu
New
Undecided
Unassigned
Oxide
New
Undecided
Santosh

Bug Description

I've had a problem with a cordova-ubuntu project and believe I've tracked it down with the rendering of the Oxide WebView.

You can see it quickly replicated here:
https://www.youtube.com/watch?v=WraR3pq12vE

It demonstrates that the content is present within the WebView, it just isn't being displayed.

Using apitrace while running the app, I've found a bunch of errors like

  major api error 21: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_BGRA)

which arise from calls to glTexImage2D like:

glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_BGRA, width = 560, height = 896, border = 0, format = GL_BGRA, type = GL_UNSIGNED_BYTE, pixels = blob(2007040))

I posted a detailed report on the cordova jira
https://issues.apache.org/jira/browse/CB-11870

where you can find details on the platform I'm using and things I've tried, but in the months (5, now!) I've been trying to resolve this, I have gotten zero love from the cordova-ubuntu crew.

I was developing this application using cordova, on an Ubuntu 16.04 system (since then upgraded) and running it on the desktop without issue... until the laptop died and I changed my system for one using the Mesa DRI Intel HD Graphics 520 (Skylake GT2) driver.

My questions are:

 1) is the Oxide WebView even supposed to work on Ubuntu desktops or was my prior experience just a fluke?

 2) can you indicate what I can do to fix this or even just track down the source of the issue?

Thanks,
Pat Deegan

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Yes, the webview works fine on Ubuntu desktops. Can you run webbrowser-app?

Revision history for this message
Pat D (psychogenic) wrote :

Hm, that certainly didn't go very well...

After a few second freeze, the program crashes. I'm attaching the output, here. Note the referenced /run/user/1000/dconf/user file exists and is owned by my user (in case those messages are of import).

The crash itself seems due to a call to QOpenGLTextureGlyphCache::fillTexture(), see attached for details.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

This crash doesn't involve Oxide at all. Does it run if you disable the confinement for it? You can do this by running:

$ sudo apparmor_parser -R /etc/apparmor.d/usr.bin.webbrowser-app

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

And this is on 16.04?

Revision history for this message
Pat D (psychogenic) wrote :

That got the app running, and the web page loads but there are glitches on the display of the controls.

I guess this is happening at some lower layer, in QT somewhere or the drivers for the Intel HD Graphics driver.

Thanks,
Pat D

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

The good thing is that Oxide seems to work here, but the driver requires a resource that's blocked by Apparmor. I'm not sure about the UI glitches though, or your original problem with cordova. I'm afraid I'm not at all familiar with that.

Revision history for this message
Pat D (psychogenic) wrote :

Well, if you need any info or tests run to figure out the Apparmor issue, let me know. As for the rest, I'm looking into the QT side of things which will hopefully resolve everything all the way up to my application.

Revision history for this message
Olivier Tilloy (osomon) wrote :

When running webbrowser-app under apparmor confinement, you can check for denial messages in either /var/log/syslog or /var/log/audit/audit.log.

Revision history for this message
Pat D (psychogenic) wrote :

Hi,

With apparmor confinement, the browser won't run with syslog errors about access to /dev/shm/lttng-ust-wait-7 being denied:

Feb 6 16:28:05 localhost kernel: [78642.649097] audit: type=1400 audit(1486416485.762:120): apparmor="DENIED" operation="open" profile="webbrowser-app" name="/dev/shm/lttng-ust-wait-7" pid=24118 comm="QQmlThread-ust" requested_mask="r" denied_mask="r" fsuid=1000 ouid=108

I don't know what this indicates. With apparmor disabled, it runs with the black widgets as described previously. However, this is some kind of underlying QT error, which I've reported at

https://bugreports.qt.io/browse/QTBUG-58585

I found a potential source for the problem, and a work-around which is described here:

http://flyingcarsandstuff.com/2017/02/mystery-black-window-workaround-druid-back-in-development/

Short version is that disabling a certain Mesa plugin lets it run without issue (once apparmor is disabled):
MESA_EXTENSION_OVERRIDE="-GL_EXT_bgra" webbrowser-app

Revision history for this message
Olivier Tilloy (osomon) wrote :

The /dev/shm/lttng-ust-wait-7 denial is most likely a red herring (tracked by bug #1606946, but it shouldn’t prevent the app from running). Are there any other denials?

Revision history for this message
Pat D (psychogenic) wrote :

You're correct, there are other errors prior to the lttng-ust-wait-7 stuff.

Sample attached here, with a crash due to a GPU hang... the crashes don't happen when we aren't using apparmor.

Revision history for this message
David Barth (dbarth) wrote : Re: [Ubuntu-webapps-bugs] [Bug 1661093] [NEW] Black WebView window
Download full text (4.1 KiB)

Sorry Pat,

The Oxide webview is definetely supported on Ubuntu desktops. I forward the
bug to the Oxide project for tracking the problem here as well.

At the moment I don't really have ideas what this can be due to.
@santosh, can you think of a plausible cause ?

On Wed, Feb 1, 2017 at 9:44 PM, Pat D <email address hidden> wrote:

> Public bug reported:
>
> I've had a problem with a cordova-ubuntu project and believe I've
> tracked it down with the rendering of the Oxide WebView.
>
> You can see it quickly replicated here:
> https://www.youtube.com/watch?v=WraR3pq12vE
>
> It demonstrates that the content is present within the WebView, it just
> isn't being displayed.
>
> Using apitrace while running the app, I've found a bunch of errors like
>
> major api error 21: GL_INVALID_VALUE in
> glTexImage2D(internalFormat=GL_BGRA)
>
> which arise from calls to glTexImage2D like:
>
> glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat =
> GL_BGRA, width = 560, height = 896, border = 0, format = GL_BGRA, type =
> GL_UNSIGNED_BYTE, pixels = blob(2007040))
>
>
> I posted a detailed report on the cordova jira
> https://issues.apache.org/jira/browse/CB-11870
>
> where you can find details on the platform I'm using and things I've
> tried, but in the months (5, now!) I've been trying to resolve this, I
> have gotten zero love from the cordova-ubuntu crew.
>
> I was developing this application using cordova, on an Ubuntu 16.04
> system (since then upgraded) and running it on the desktop without
> issue... until the laptop died and I changed my system for one using the
> Mesa DRI Intel HD Graphics 520 (Skylake GT2) driver.
>
> My questions are:
>
> 1) is the Oxide WebView even supposed to work on Ubuntu desktops or was
> my prior experience just a fluke?
>
> 2) can you indicate what I can do to fix this or even just track down
> the source of the issue?
>
>
> Thanks,
> Pat Deegan
>
> ** Affects: oxide
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of Ubuntu
> WebApps bug tracking, which is subscribed to Oxide.
> https://bugs.launchpad.net/bugs/1661093
>
> Title:
> Black WebView window
>
> Status in Oxide:
> New
>
> Bug description:
> I've had a problem with a cordova-ubuntu project and believe I've
> tracked it down with the rendering of the Oxide WebView.
>
> You can see it quickly replicated here:
> https://www.youtube.com/watch?v=WraR3pq12vE
>
> It demonstrates that the content is present within the WebView, it
> just isn't being displayed.
>
> Using apitrace while running the app, I've found a bunch of errors
> like
>
> major api error 21: GL_INVALID_VALUE in
> glTexImage2D(internalFormat=GL_BGRA)
>
> which arise from calls to glTexImage2D like:
>
> glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat =
> GL_BGRA, width = 560, height = 896, border = 0, format = GL_BGRA, type
> = GL_UNSIGNED_BYTE, pixels = blob(2007040))
>
>
> I posted a detailed report on the cordova jira
> https://issues.apache.org/jira/browse/CB-11870
>
> where you can find details on the platform I'm using and things I've
> tried, but in ...

Read more...

Changed in oxide:
assignee: nobody → Santosh (santoshbit2007)
Revision history for this message
Pat D (psychogenic) wrote :

Glad to know that Oxide is good on the desktop, as I have a cordova-based project riding on it.

As mentioned, I finally tracked the black window issue to some bad interaction between QT and some Mesa extensions, which were reported here

https://bugreports.qt.io/browse/QTBUG-58585

with the adventure and work-around described here:

http://flyingcarsandstuff.com/2017/02/mystery-black-window-workaround-druid-back-in-development/

However, the remaining apparmor issues with the webbrowser-app are beyond me, and documented in post 11, here:

https://bugs.launchpad.net/oxide/+bug/1661093/comments/11

Thanks for your assistance, feel free to tell me if you need more info/tests run or whatever.

Revision history for this message
Santosh (santoshbit2007) wrote :

@Pat, Its seems you got to the root of issue.
"short version is that disabling a certain Mesa plugin lets it run without issue (once apparmor is disabled):
MESA_EXTENSION_OVERRIDE="-GL_EXT_bgra" webbrowser-app"

There seems to apparmor issue definitely with webbrowser-app, There has been few bug reported with apparmor issue, I would be happy to check this,

I checked syslog.txt, Which is trimmed one, and with initial look none of denial looks to be problem, So just to be sure I need full version of syslog. Could you give me that?

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.