You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On any input event, the gray screen disappears, and Servo itself starts. At the moment, however, this results in a mostly white screen, with one or two elements visible occasionally. There are no errors, the main loop is running, and I don't really see anything particularly interesting in the logs either. Also some sites may throw shader compiler errors too.
Here's a screenshot of https://www.google.com, there, we only have a scrollbar, the menu button and the login button's text:
I've just tested the latest nightly build from here (with the included resources dir) on Odroid XU3 and Samsung S5; works for me on both of them. Servo launches into a gray screen, which turns into white on input/touch. It went from gray to black only once, but then turned white after waiting a few seconds and touching it again.
If the problem persist, could you tell some details about your device? Do you see anything weird using adb logcat?
By the way, it seems things got even worse, all I see now is the scrollbar (which can still be dragged horizontally), and only on certain sites.
The MozVR team wants a full working Servo Android browser :) I have been debugging some of the issues on Android. This is the current status:
I have implemented the missing WindowProxy on Android. Now input events are not required to see anything on screen or to run requestAnimationFrame/timers. PR submitted to android-rs-glue upstream Implement wake_event_loop method for Android rust-mobile/android-rs-glue#127 Will submit additional PRs to servo glutin and @mmatyas' android-rs-injected-glue fork when the upstream one is merged.
Servo for Android shows a white/black screen most of the times, even with simple pages like a WebGL triangle or a html with plain images. I've done some deeper debugging to hunt down this problem because as @mmatyas said the logs didn't show anything particularly interesting and there were no errors. There seems to be a issue with the alpha clipping on Android, opened this issue with more detailed info of the problem: Clipping issues on Android: textureSize(sCache, 0) is 0 webrender#907. We can bypass this error just setting a fixed alpha to 1.0. We can see the WebGL Triangle on the Google Pixel doing that :)
I'm working on fixing additional problems like a crash while changing device orientation or when the app goes to background.
I think that we should upgrade the current built system (ant) to gradle. We'll need to add some .aar or gradle dependencies and ant is very old do to that kind of things. Another benefit of using gradle is that we can open the project with Android Studio and run the brand new GPU debugger on any Android phone.
I'd like to submit a PR including gradle support. Using the gradle wrapper the gradle build system is automatically downloaded on both linux and windows machines. We should move to a newer android-target too, that probably will require running android tools update on build machines. @larsbergstrom what do you think about moving to gradle? Would you like that I work on a PR?
Reacted by Josh Bowman-Matthews, Emilio Cobos Álvarez, Attila Dusnoki and Mátyás Mustoha
@fabricedesre I thought that we didn't have support in WR for those OpenGLES platforms on the Z3C, at least the last time I tested it. I'd look there first :-)
@MortimerGoro I think that upgrading the build system would be fantastic! One thing we've struggled with in the past is that Servo's use of glutin for handling windowing events has limited our ability to do android-specific stuff (intent and event handling, in particular) as the event are largely swallowed. Now that @mmatyas has a separate copy of all that stuff, though (https://github.com/mmatyas/android-rs-injected-glue/blob/master/src/lib.rs ), we may have the ability to do a bit more with that. If he's OK with it, we could even just move that into the servo GitHub organization.
@larsbergstrom Totally agree. While working on this issues I had the same feeling about the limited flexibility of doing android-specific stuff, too many different repos to work and submit PRs on. It slows the development. Just adding the required combinations of cargo replaces in the cargo.toml is a time consumer. We could even move @mmatyas repo to Servo port folder or android specific folder. IMO we should find a good way to merge android_glue crate too. Right now it's a separate crate but it's totally tied to android-rs-injected-glue fork.
This is awesome @MortimerGoro! I'll try your patches on our devices as soon as I can!
Yes, android-rs-injected-glue is a copy of the injected-glue part of android-rs-glue; it was moved to a separate repository to avoid the dependency on cargo-apk, android-rs-glue's custom build tool that can be used to inject the required native libraries and the window handling glue code. I've tried using cargo-apk with Servo, but I had to add so many changes that in the end, the current build system with a separate lib turned out to be cleaner.
If it'd help the development, I'm fine with moving the repository to the organization, or integrate it to the main repo. I agree that in the long term, using Gradle or Bazel would be better, if we can manage to use it with Servo. We've discussed this with @larsbergstrom previously (there should be an issue about it somewhere), but back then the priority was to just make the Android port build again after several breaking changes (#13154).
The new build system should work with all the different methods the dependencies use (autotools, pure makefile, cmake, cmake with custom toolchain, cargo projects, ...) and should remove the need of linker scripts like this. I've seen Rust addons for both Gradle/Bazel, though I'm not sure how they'd scale for such a "multicultural" project.
Hmm, I've tried your patches (glue, webrender, offscreen) on Odroid XU3 and OnePlus2, but I still experience all the previous issues... Have I forgot to apply something? Do you have a Servo branch with your changes?
Thanks! This indeed fixed the proxy-related issues. I still have the graphical glitches (white screen + scrollbar only) on regular webpages, and WebGL crashes (eg. on get.webgl.org); I'll check Servo's test files later too.
One more thing for the WebGL crashes: ./mach cargo-update -p angle (The ESSL support you added is not merged yet in upstream servo)
For the glitches: Did you add the full fix? servo/webrender#913 WebGL only uses that shader but regular webpages will use more shaders that are affected by the same sCache texture bug. I haven't tried the dummy texture fix with regular pages yet. Only tried WebGL with my alpha bypass.
Looking forward to having all those separate fixes merged upstream so we can just clone servo and test :)
I've checked some of the HTML test files, but all of them had graphical problems on Odroid XU3. test_webgl_triangle.html for example segfaults, with the following warning:
WARN:canvas::webgl_paint_thread: Initial context creation failed, falling back to readback: Error creating an EGL context
I've double checked the repositories, I'm on commit ba8ce0 ("Auto merge of 913") of Webrender, 0.6.1/36feed ("Bump version") of offscreen_gl_context, 3dd494 ("Auto merge of 17") of angle, 1995be of android-rs-injected-glue and 66b4204 ("Merge pull request 127") of android-rs-glue. The glutin fix is applied too. Do I need anything else?
@MortimerGoro I'm not sure what do you mean, how should I run the rust-offscreen-rendering-context tests on Android? If you can help with that I'm fine with testing anything :)
@mmatyas@emilio The backtrace points to a crash when compiling the shader using Angle transpiler. I had a simular issue but after updgrading to servo/angle@3dd4940 the problem was fixed. mmatyas is using that commit already, weird crash if that's the case.
Thanks, but unfortunately dinghy fails with a No such file or directory (os error 2) error. It doesn't tell me what it tried to open even with the debug messages turned on. I guess I'll have to dig through the source...
On Tue, Feb 28, 2017 at 06:32:45AM -0800, Mátyás Mustoha wrote:
Thanks, but unfortunately `dinghy` fails with a `No such file or directory (os error 2)` error. It doesn't tell me what it tried to open even with the debug messages turned on. I guess I'll have to dig through the source...
By the way, we have just tested this build on a OnePlus2 too, and it crashes on launch: https://gist.github.com/dati91/c29cdedf7cc21f2c95ba1a35074a7f71
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14568 (comment)
Activity
rzambre commentedon Jan 13, 2017
Are there certain websites that work well with Servo on Android?
mmatyas commentedon Jan 16, 2017
None at all. The best I've got is
github.com, where the background image and two button rectangles load correctly.fabricedesre commentedon Feb 17, 2017
fwiw, I currently get a black screen after the gray one, and can't get any site to display.
mmatyas commentedon Feb 17, 2017
I've just tested the latest nightly build from here (with the included
resourcesdir) on Odroid XU3 and Samsung S5; works for me on both of them. Servo launches into a gray screen, which turns into white on input/touch. It went from gray to black only once, but then turned white after waiting a few seconds and touching it again.If the problem persist, could you tell some details about your device? Do you see anything weird using
adb logcat?By the way, it seems things got even worse, all I see now is the scrollbar (which can still be dragged horizontally), and only on certain sites.
fabricedesre commentedon Feb 17, 2017
I'm using a Nexus 5 and a Sony z3c for testing. Both have an Adreno 330 GPU. I get the same behavior with the nightly builds.
Here's the logcat, starting with loading https://people-mozilla.org/~fdesre/servo/
I'm no sure how bad the fontconfig error is...
MortimerGoro commentedon Feb 21, 2017
Hello,
The MozVR team wants a full working Servo Android browser :) I have been debugging some of the issues on Android. This is the current status:
I'm working on fixing additional problems like a crash while changing device orientation or when the app goes to background.
I think that we should upgrade the current built system (ant) to gradle. We'll need to add some .aar or gradle dependencies and ant is very old do to that kind of things. Another benefit of using gradle is that we can open the project with Android Studio and run the brand new GPU debugger on any Android phone.
I'd like to submit a PR including gradle support. Using the gradle wrapper the gradle build system is automatically downloaded on both linux and windows machines. We should move to a newer android-target too, that probably will require running android tools update on build machines. @larsbergstrom what do you think about moving to gradle? Would you like that I work on a PR?
emilio commentedon Feb 21, 2017
Just wanted to say that this is awesome @MortimerGoro, thanks for looking into this :)
larsbergstrom commentedon Feb 21, 2017
@fabricedesre I thought that we didn't have support in WR for those OpenGLES platforms on the Z3C, at least the last time I tested it. I'd look there first :-)
@MortimerGoro I think that upgrading the build system would be fantastic! One thing we've struggled with in the past is that Servo's use of glutin for handling windowing events has limited our ability to do android-specific stuff (intent and event handling, in particular) as the event are largely swallowed. Now that @mmatyas has a separate copy of all that stuff, though (https://github.com/mmatyas/android-rs-injected-glue/blob/master/src/lib.rs ), we may have the ability to do a bit more with that. If he's OK with it, we could even just move that into the servo GitHub organization.
Thanks so much for taking this on :-)
MortimerGoro commentedon Feb 21, 2017
@larsbergstrom Totally agree. While working on this issues I had the same feeling about the limited flexibility of doing android-specific stuff, too many different repos to work and submit PRs on. It slows the development. Just adding the required combinations of cargo replaces in the cargo.toml is a time consumer. We could even move @mmatyas repo to Servo port folder or android specific folder. IMO we should find a good way to merge android_glue crate too. Right now it's a separate crate but it's totally tied to android-rs-injected-glue fork.
mmatyas commentedon Feb 22, 2017
This is awesome @MortimerGoro! I'll try your patches on our devices as soon as I can!
Yes,
android-rs-injected-glueis a copy of theinjected-gluepart of android-rs-glue; it was moved to a separate repository to avoid the dependency oncargo-apk,android-rs-glue's custom build tool that can be used to inject the required native libraries and the window handling glue code. I've tried usingcargo-apkwith Servo, but I had to add so many changes that in the end, the current build system with a separate lib turned out to be cleaner.If it'd help the development, I'm fine with moving the repository to the organization, or integrate it to the main repo. I agree that in the long term, using Gradle or Bazel would be better, if we can manage to use it with Servo. We've discussed this with @larsbergstrom previously (there should be an issue about it somewhere), but back then the priority was to just make the Android port build again after several breaking changes (#13154).
The new build system should work with all the different methods the dependencies use (autotools, pure makefile, cmake, cmake with custom toolchain, cargo projects, ...) and should remove the need of linker scripts like this. I've seen Rust addons for both Gradle/Bazel, though I'm not sure how they'd scale for such a "multicultural" project.
mmatyas commentedon Feb 24, 2017
Hmm, I've tried your patches (glue, webrender, offscreen) on Odroid XU3 and OnePlus2, but I still experience all the previous issues... Have I forgot to apply something? Do you have a Servo branch with your changes?
MortimerGoro commentedon Feb 24, 2017
@mmatyas You need to apply this too MortimerGoro/glutin@87d291e
And remove this lines in servo/ports/glutin/window.rs
I'll submit new PRs soon with the life cycle improvements and gradle integration.
mmatyas commentedon Feb 24, 2017
Thanks! This indeed fixed the proxy-related issues. I still have the graphical glitches (white screen + scrollbar only) on regular webpages, and WebGL crashes (eg. on
get.webgl.org); I'll check Servo's test files later too.MortimerGoro commentedon Feb 24, 2017
One more thing for the WebGL crashes: ./mach cargo-update -p angle (The ESSL support you added is not merged yet in upstream servo)
For the glitches: Did you add the full fix? servo/webrender#913 WebGL only uses that shader but regular webpages will use more shaders that are affected by the same sCache texture bug. I haven't tried the dummy texture fix with regular pages yet. Only tried WebGL with my alpha bypass.
Looking forward to having all those separate fixes merged upstream so we can just clone servo and test :)
mmatyas commentedon Feb 27, 2017
I've checked some of the HTML test files, but all of them had graphical problems on Odroid XU3.
test_webgl_triangle.htmlfor example segfaults, with the following warning:I've double checked the repositories, I'm on commit
ba8ce0("Auto merge of 913") of Webrender, 0.6.1/36feed("Bump version") ofoffscreen_gl_context,3dd494("Auto merge of 17") of angle,1995beof android-rs-injected-glue and66b4204("Merge pull request 127") of android-rs-glue. The glutin fix is applied too. Do I need anything else?emilio commentedon Feb 27, 2017
Do you have a backtrace of that?
MortimerGoro commentedon Feb 27, 2017
Try to run cargo tests from https://github.com/emilio/rust-offscreen-rendering-context on that device
mmatyas commentedon Feb 28, 2017
@emilio Here's the full
logcatoutput: http://pastebin.com/kitKNmdw, or the shorter backtrace:@MortimerGoro I'm not sure what do you mean, how should I run the
rust-offscreen-rendering-contexttests on Android? If you can help with that I'm fine with testing anything :)MortimerGoro commentedon Feb 28, 2017
@mmatyas @emilio The backtrace points to a crash when compiling the shader using Angle transpiler. I had a simular issue but after updgrading to servo/angle@3dd4940 the problem was fixed. mmatyas is using that commit already, weird crash if that's the case.
@mmatyas About running cargo tests on android there isn't much documentation, I did some research and the easy way is to use https://github.com/snipsco/dinghy
First install
cargo install dinghyThen on rust-offscreen-rendering-context folder run:
cargo dinghy testmmatyas commentedon Feb 28, 2017
Thanks, but unfortunately
dinghyfails with aNo such file or directory (os error 2)error. It doesn't tell me what it tried to open even with the debug messages turned on. I guess I'll have to dig through the source...By the way, we have just tested this build on a OnePlus2 too, and it crashes on launch: https://gist.github.com/dati91/c29cdedf7cc21f2c95ba1a35074a7f71
emilio commentedon Feb 28, 2017
MortimerGoro commentedon Feb 28, 2017
After rebasing upstream I get the same shader compilation crash, only on release builds.
MortimerGoro commentedon Feb 28, 2017
@mmatyas @larsbergstrom PR with Gradle integration and life cycle improvements ready here: #15773
Auto merge of #15773 - MortimerGoro:android_improvements, r=larsbergs…
Auto merge of #15773 - MortimerGoro:android_improvements, r=larsbergs…