Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRuntime problems on Android #14568
Runtime problems on Android #14568
Comments
|
Are there certain websites that work well with Servo on Android? |
|
None at all. The best I've got is |
|
fwiw, I currently get a black screen after the gray one, and can't get any site to display. |
|
I've just tested the latest nightly build from here (with the included If the problem persist, could you tell some details about your device? Do you see anything weird using 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. |
|
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/
|
|
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:
|
|
Just wanted to say that this is awesome @MortimerGoro, thanks for looking into this :) |
|
@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 :-) |
|
@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, 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? |
|
@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. |
|
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 |
|
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.
I've double checked the repositories, I'm on commit |
|
Do you have a backtrace of that? |
|
Try to run cargo tests from https://github.com/emilio/rust-offscreen-rendering-context on that device |
|
@emilio Here's the full
@MortimerGoro I'm not sure what do you mean, how should I run the |
|
@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 Then on rust-offscreen-rendering-context folder run: |
|
Thanks, but unfortunately By the way, we have just tested this build on a OnePlus2 too, and it crashes on launch: https://gist.github.com/dati91/c29cdedf7cc21f2c95ba1a35074a7f71 |
|
That looks like a shader compiler bug on android while compiling WR
shaders.
cc @glennw
…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)
|
|
After rebasing upstream I get the same shader compilation crash, only on release builds. |
|
@mmatyas @larsbergstrom PR with Gradle integration and life cycle improvements ready here: #15773 |
Android life cycle improvements and Gradle integration This PR includes Android life cycle Improvements and Gradle integration for android packaging. Android life cycle improvements are implemented in both the new [MainActivity](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-f43708b102e98272c2af7454b8846927) and native code in this related PR: servo/glutin#117 - Properly handle the life cycle of the Android Activity: manage EGLContext lost & restore, and animation loop pause/resume when the app goes to background/foreground or orientation changes. In the current upstream Servo crashes when the app goes to background, activity stops or changes orientation - Handle event loop awake for Servo Animation loop - Handle screen resize & orientation events - Implement new keep_screen_on preference which keeps Android device's screen from ever going to sleep: very useful for games or WebVR - Implement a full screen mode enabled by preference: very useful for games or WebVR - Implement new shell.native-orientation preference which allows to lock the Activity to a specific orientation - Automatically sync new android assets to sdcard when the Android version code is changed. In the current upstream only the existence of the folder is check but resources are not updated ofscreen_gl_context is updated to fix this: servo/surfman#83 This PR integrates Gradle build system for android packaging. Most of the code is implemented in this [build.gradle](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-89cdb9324addb994cdba0a158b209547) . We can get rid of [build-apk](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-40f5a7cf22f94aad059b2c1795347f5e) and manual jar dependency copying in the [package_commands.py](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-0d425b142c8d10ae6ac1f3711fb5c23a). The correct version of gradle is automatically downloaded using the gradlew wrapper. Some improvements: - Allows to include more complex android dependencies/SDKs like AARs, manifest auto-merging and more. - Improved packaging process: The gradle project is always in the same folder, it uses relative paths for everything (assets, native libraries) and outputs the apk into the correct target folder in servo. In the current upstream, ant/python build system copies the manifest, project, resources and jars each time so you end with multiple copies of the same files. - Improved dependency declaration. We do not have to manually copy jar dependencies in the python script anymore. The gradle build scripts itself is able to search for the dependencies in the correct servo target folder. - Supports packaging apks with different architectures: armeabi, armeabi-v7a, aarch64. We still need to fix some native servo compilation issues with armeabi-v7a, aarch64 due to dependencies which use `make`. I'll push this changes in a separate PR of the python build files but the gradle file is already ready to handle that. - We can easily create product flavors for different versions of Servo. For example a default browser, a WebVR browser with additional dependencies or a Servo android Webview component - Fixes minor.major.52 build error when blurdroid cargo dependency is compiled using java8 (the default in new Linux machines). The gradle build file enables the new Jack compiler which supports Java8 dependencies. - The project can be opened with Android Studio and run the brand new GPU debugger on any Android phone. I'll add some docs in the Wiki about this. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14568 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15773) <!-- Reviewable:end -->
Android life cycle improvements and Gradle integration This PR includes Android life cycle Improvements and Gradle integration for android packaging. Android life cycle improvements are implemented in both the new [MainActivity](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-f43708b102e98272c2af7454b8846927) and native code in this related PR: servo/glutin#117 - Properly handle the life cycle of the Android Activity: manage EGLContext lost & restore, and animation loop pause/resume when the app goes to background/foreground or orientation changes. In the current upstream Servo crashes when the app goes to background, activity stops or changes orientation - Handle event loop awake for Servo Animation loop - Handle screen resize & orientation events - Implement new keep_screen_on preference which keeps Android device's screen from ever going to sleep: very useful for games or WebVR - Implement a full screen mode enabled by preference: very useful for games or WebVR - Implement new shell.native-orientation preference which allows to lock the Activity to a specific orientation - Automatically sync new android assets to sdcard when the Android version code is changed. In the current upstream only the existence of the folder is check but resources are not updated ofscreen_gl_context is updated to fix this: servo/surfman#83 This PR integrates Gradle build system for android packaging. Most of the code is implemented in this [build.gradle](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-89cdb9324addb994cdba0a158b209547) . We can get rid of [build-apk](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-40f5a7cf22f94aad059b2c1795347f5e) and manual jar dependency copying in the [package_commands.py](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-0d425b142c8d10ae6ac1f3711fb5c23a). The correct version of gradle is automatically downloaded using the gradlew wrapper. Some improvements: - Allows to include more complex android dependencies/SDKs like AARs, manifest auto-merging and more. - Improved packaging process: The gradle project is always in the same folder, it uses relative paths for everything (assets, native libraries) and outputs the apk into the correct target folder in servo. In the current upstream, ant/python build system copies the manifest, project, resources and jars each time so you end with multiple copies of the same files. - Improved dependency declaration. We do not have to manually copy jar dependencies in the python script anymore. The gradle build scripts itself is able to search for the dependencies in the correct servo target folder. - Supports packaging apks with different architectures: armeabi, armeabi-v7a, aarch64. We still need to fix some native servo compilation issues with armeabi-v7a, aarch64 due to dependencies which use `make`. I'll push this changes in a separate PR of the python build files but the gradle file is already ready to handle that. - We can easily create product flavors for different versions of Servo. For example a default browser, a WebVR browser with additional dependencies or a Servo android Webview component - Fixes minor.major.52 build error when blurdroid cargo dependency is compiled using java8 (the default in new Linux machines). The gradle build file enables the new Jack compiler which supports Java8 dependencies. - The project can be opened with Android Studio and run the brand new GPU debugger on any Android phone. I'll add some docs in the Wiki about this. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14568 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15773) <!-- Reviewable:end -->
…trom,fabricedesre Android life cycle improvements and Gradle integration This PR includes Android life cycle Improvements and Gradle integration for android packaging. Android life cycle improvements are implemented in both the new [MainActivity](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-f43708b102e98272c2af7454b8846927) and native code in this related PR: servo/glutin#117 - Properly handle the life cycle of the Android Activity: manage EGLContext lost & restore, and animation loop pause/resume when the app goes to background/foreground or orientation changes. In the current upstream Servo crashes when the app goes to background, activity stops or changes orientation - Handle event loop awake for Servo Animation loop - Handle screen resize & orientation events - Implement new keep_screen_on preference which keeps Android device's screen from ever going to sleep: very useful for games or WebVR - Implement a full screen mode enabled by preference: very useful for games or WebVR - Implement new shell.native-orientation preference which allows to lock the Activity to a specific orientation - Automatically sync new android assets to sdcard when the Android version code is changed. In the current upstream only the existence of the folder is check but resources are not updated ofscreen_gl_context is updated to fix this: servo/surfman#83 This PR integrates Gradle build system for android packaging. Most of the code is implemented in this [build.gradle](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-89cdb9324addb994cdba0a158b209547) . We can get rid of [build-apk](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-40f5a7cf22f94aad059b2c1795347f5e) and manual jar dependency copying in the [package_commands.py](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-0d425b142c8d10ae6ac1f3711fb5c23a). The correct version of gradle is automatically downloaded using the gradlew wrapper. Some improvements: - Allows to include more complex android dependencies/SDKs like AARs, manifest auto-merging and more. - Improved packaging process: The gradle project is always in the same folder, it uses relative paths for everything (assets, native libraries) and outputs the apk into the correct target folder in servo. In the current upstream, ant/python build system copies the manifest, project, resources and jars each time so you end with multiple copies of the same files. - Improved dependency declaration. We do not have to manually copy jar dependencies in the python script anymore. The gradle build scripts itself is able to search for the dependencies in the correct servo target folder. - Supports packaging apks with different architectures: armeabi, armeabi-v7a, aarch64. We still need to fix some native servo compilation issues with armeabi-v7a, aarch64 due to dependencies which use `make`. I'll push this changes in a separate PR of the python build files but the gradle file is already ready to handle that. - We can easily create product flavors for different versions of Servo. For example a default browser, a WebVR browser with additional dependencies or a Servo android Webview component - Fixes minor.major.52 build error when blurdroid cargo dependency is compiled using java8 (the default in new Linux machines). The gradle build file enables the new Jack compiler which supports Java8 dependencies. - The project can be opened with Android Studio and run the brand new GPU debugger on any Android phone. I'll add some docs in the Wiki about this. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14568 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15773) <!-- Reviewable:end -->
…trom,fabricedesre Android life cycle improvements and Gradle integration This PR includes Android life cycle Improvements and Gradle integration for android packaging. Android life cycle improvements are implemented in both the new [MainActivity](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-f43708b102e98272c2af7454b8846927) and native code in this related PR: servo/glutin#117 - Properly handle the life cycle of the Android Activity: manage EGLContext lost & restore, and animation loop pause/resume when the app goes to background/foreground or orientation changes. In the current upstream Servo crashes when the app goes to background, activity stops or changes orientation - Handle event loop awake for Servo Animation loop - Handle screen resize & orientation events - Implement new keep_screen_on preference which keeps Android device's screen from ever going to sleep: very useful for games or WebVR - Implement a full screen mode enabled by preference: very useful for games or WebVR - Implement new shell.native-orientation preference which allows to lock the Activity to a specific orientation - Automatically sync new android assets to sdcard when the Android version code is changed. In the current upstream only the existence of the folder is check but resources are not updated ofscreen_gl_context is updated to fix this: servo/surfman#83 This PR integrates Gradle build system for android packaging. Most of the code is implemented in this [build.gradle](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-89cdb9324addb994cdba0a158b209547) . We can get rid of [build-apk](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-40f5a7cf22f94aad059b2c1795347f5e) and manual jar dependency copying in the [package_commands.py](https://github.com/servo/servo/compare/master...MortimerGoro:android_improvements?expand=1#diff-0d425b142c8d10ae6ac1f3711fb5c23a). The correct version of gradle is automatically downloaded using the gradlew wrapper. Some improvements: - Allows to include more complex android dependencies/SDKs like AARs, manifest auto-merging and more. - Improved packaging process: The gradle project is always in the same folder, it uses relative paths for everything (assets, native libraries) and outputs the apk into the correct target folder in servo. In the current upstream, ant/python build system copies the manifest, project, resources and jars each time so you end with multiple copies of the same files. - Improved dependency declaration. We do not have to manually copy jar dependencies in the python script anymore. The gradle build scripts itself is able to search for the dependencies in the correct servo target folder. - Supports packaging apks with different architectures: armeabi, armeabi-v7a, aarch64. We still need to fix some native servo compilation issues with armeabi-v7a, aarch64 due to dependencies which use `make`. I'll push this changes in a separate PR of the python build files but the gradle file is already ready to handle that. - We can easily create product flavors for different versions of Servo. For example a default browser, a WebVR browser with additional dependencies or a Servo android Webview component - Fixes minor.major.52 build error when blurdroid cargo dependency is compiled using java8 (the default in new Linux machines). The gradle build file enables the new Jack compiler which supports Java8 dependencies. - The project can be opened with Android Studio and run the brand new GPU debugger on any Android phone. I'll add some docs in the Wiki about this. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14568 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15773) <!-- Reviewable:end -->

Now that the build works, you can run Servo on Android again after applying these patches:
When you start Servo on Android, it produces a gray screen. This is because a missing
WindowProxyimplementation on Android.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: