Comments (22)
We found out why the Gallery app doesn't work properly. Using wl_display_dispatch
is the reason for not work Gallery app. The events from Engine while waiting for Wayland events using wl_display_dispatch
aren't handled...
from flutter-embedded-linux.
Thank you for your report. I'll check that later. (cc @Mai-Matsuura)
from flutter-embedded-linux.
I need to do debugging, but I think this is a Flutter Engine issue.
from flutter-embedded-linux.
I've confirmed that it works fine when I use the DRM backend on my desktop.
Possibly this has something to do with the Gallery app being one of the examples for adaptive UI (mobile/ desktop)?
Yes, I think so.
from flutter-embedded-linux.
Thanks, that's good to know.
I will set aside a bit of time this Sunday to try to gather some further information. Possibly go through the other example app that deals with mobile/ desktop optimisation to see if it's limited just to the Gallery app.
from flutter-embedded-linux.
I found if 'LC_ALL' (locale) is not set properly it just displays a gray screen. I didn't have to edit any Dart code. This could also be impacting the Shrine app etc.
I tried with LC_ALL set but I still had to remove the same line in main.dart to make the application appear. It's not even gray, it's not visible at all when this line is present.
Note: You can also hard code the locale in the application by changing locale:null (in main.dart) to something else. e.g. locale: const Locale('en', ''). That's what I did initially instead of setting LC_ALL.
from flutter-embedded-linux.
@jcviau @psstoyanov @jwinarske
Thanks a lot. We were also investigating this issue. As @jcviau mentioned, we found that problems occur when using restorationScopeId
property. We have confirmed that the same problem occurs with a simpler sample.
from flutter-embedded-linux.
For us, the main problem is related to the touch gesture.
Thank you for reporting a bug. I created a new issue for this bug. #127
from flutter-embedded-linux.
I have been able to reproduce this issue. I'm using Weston on X11, but the Flutter app appears after resizing the Weston window.
from flutter-embedded-linux.
Thanks, @HidenoriMatsubayashi , great find!
I've updated and recompiled the engine and Gallery app again and got slightly different results this time.
flutter-drm-backed
- Launched as expected with RX6800 (x64 system)
- Launches as expected with PinebookPro (rk3399 system)
- PinePhone spawned separate error for
settingsTextScaling
(should be separate issue with the system setup - will try to narrow it down later on and open a ticket)
PinePhone error with Gallery in DRM mode
$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-dr<ER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./gallery/build/linux/<1" ./flutter-drm-backend ./gallery/build/linux/arm64/ release/bundle
[WARNING][context_egl.h(95)] Failed to create EGL off-screen surface.(eglGetError: EGL_BAD_ALLOC)
[WARNING][linuxes_surface_gl_drm.h(50)] Off-Screen surface is invalid.
[ERROR][native_window_drm.cc(97)] TODO: implement here!!
[ERROR][flutter_linuxes_view.cc(60)] Failed to change surface size.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter: NoSuchMethodError: The getter 'settingsTextScaling' was called on null.
flutter: Receiver: null
flutter: Tried calling: settingsTextScaling
flutter: #0 _SettingsPageState.build (package:gallery/pages/settings.dart:146)
flutter: #1 StatefulElement.build (package:flutter/src/widgets/framework.dart:4689)
flutter: #2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4572)
flutter: #3 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4744)
flutter: #4 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #5 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #6 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4735)
flutter: #7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #9 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4597)
flutter: #11 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #12 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #13 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #14 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #15 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #16 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4597)
flutter: #17 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4744)
flutter: #18 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #19 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #20 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4735)
flutter: #21 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #23 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4597)
flutter: #25 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #27 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #28 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #29 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #30 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6055)
flutter: #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #32 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #33 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4597)
flutter: #34 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4744)
flutter: #35 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #36 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #37 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4735)
flutter: #38 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #39 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #40 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #41 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4597)
flutter: #42 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #43 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #44 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #45 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #46 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #47 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4597)
flutter: #48 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4744)
flutter: #49 Element.rebuild (package:flutter/src/widgets/framework.dart:4265)
flutter: #50 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4551)
flutter: #51 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4735)
flutter: #52 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4546)
flutter: #53 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #54 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6175)
flutter: #55 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #56 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #57 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6055)
flutter: #58 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3608)
flutter: #59 Element.updateChild (package:flutter/src/widgets/framework.dart:3363)
flutter: #60 _LayoutBuilderElement._layout.<anonymous closure> (package:flutter/src/widgets/layout_builder.dart:136)
flutter: #61 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2536)
flutter: #62 _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:118)
flutter: #63 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1893)
flutter: #64 BuildOwner.lockState (package:flutter/src/widgets/framework.dart:2474)
flutter: #65 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1893)
flutter: #66 RenderConstrainedLayoutBuilder.rebuildIfNecessary (package:flutter/src/widgets/layout_builder.dart:225)
flutter: #67 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:360)
flutter: #68 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #69 RenderStack.layoutPositionedChild (package:flutter/src/rendering/stack.dart:497)
flutter: #70 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:610)
flutter: #71 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #72 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:362)
flutter: #73 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #74 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #76 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #78 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #80 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #81 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #82 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #83 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #84 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #85 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #86 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #87 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #88 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #89 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3361)
flutter: #90 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #91 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #92 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #93 _RenderTheatre.performLayout (package:flutter/src/widgets/overlay.dart:743)
flutter: #94 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #95 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #96 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #97 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
flutter: #98 RenderObject.layout (package:flutter/src/rendering/object.dart:1783)
flutter: #99 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117)
./flutter-client
- With all 3 systems it doesn't start.
- However with your find of resizing the Weston window, I've switched from and back to the same tty session and the app was present.
Possibly this has something to do with the Gallery app being one of the examples for adaptive UI (mobile/ desktop)? It's just a guess but maybe #6 is connected
from flutter-embedded-linux.
I've tried with the x11 backend which I've been developing now, but it works fine..
from flutter-embedded-linux.
Thank you!!
from flutter-embedded-linux.
@TomohideMorimoto
from flutter-embedded-linux.
I can run the Gallery app (master) AOT on a NVIDIA Xavier (demo-image-egl - master) using flutter-drm-eglstream-backend. LC_ALL needs to be properly set or you get a gray screen with a small flutter logo on top of the screen. Mouse drags don't work, only click and scroll.
root@jetson-xavier-nx-devkit:~# LC_ALL=en_GB flutter-drm-eglstream-backend -b /usr/share/flutter-gallery/sony
[WARNING][linuxes_window_drm.h(112)] FLUTTER_DRM_DEVICE is not set, use /dev/dri/card0
[INFO][native_window_drm.cc(67)] resolution: 1680x1440
[INFO][linuxes_window_drm.h(140)] Display output resolution: 1680x1440
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
[ERROR][native_window_drm.cc(43)] Couldn't move the mouse cursor: -14
from flutter-embedded-linux.
We were able to run the gallery application on an i.MX 8M Mini with wayland. We had to remove one line in main.dart, otherwise the application isnt displayed. The line is: restorationScopeId: 'rootGallery'
For us, the main problem is related to the touch gesture.
- Scroll/drag continue randomly once I remove my finger (lists and 2D transformation when moving the object)
- Multi-touch isnt working for rotation, pinch zoom/pan (tested in 2D transformation page). It looks like it open a console when we try those gesture.
Other issues we saw:
Mouse-only issue
- A few operation (x axis motion, 2d transformation) raised errors in the console: Unsupported cursor: Forbidden
- The snackbar control raise an exception when clicking the action text on the snackbar
Touch & Mouse issue
- Bottom App Bar (with Notch) is displayed correctly but show errors in the console: some draw get error and skipped during validation
- Segmented control is displayed correctly but show errors in the console: some draw get error and skipped during validation
- Bottom navigation with selected Label can raise an exception: Unhandled Exception: Null check operator used on a null value
- Any click in the Shrine page raise an exception.
In Debug: Cannot hit test a render box that has never been laid out.
In Release: The method 'createTicker' was called on null.
Note: some animation are sluggish on our board, per example the Context Menu.
from flutter-embedded-linux.
I have been able to run the gallery application on an i.MX 8M Mini with wayland. I had to remove one line in main.dart, otherwise the application isnt displayed. The line is:
restorationScopeId: 'rootGallery'
I found if 'LC_ALL' (locale) is not set properly it just displays a gray screen. I didn't have to edit any Dart code. This could also be impacting the Shrine app etc.
For us, the main problem is related to the touch gesture. I asked someone else to check if he has the same issues and I will do additional test but so far:
* Scroll/drag continue randomly once I remove my finger (lists and 2D transformation when moving the object) * Multi-touch isnt working for rotation, pin zoom/pan (tested in 2D transformation page).
Other issues I saw:
Mouse-only issue* A few operation (x axis motion, 2d transformation) raised errors in the console: Unsupported cursor: Forbidden * The snackbar control raise an exception when clicking the action text on the snackbar
Touch & Mouse issue
* Bottom App Bar is displayed correctly but keep showing errors in the console: _some draw get error and skipped during validation_ * Any click in the Shrine page raise an exception. In Debug: _Cannot hit test a render box that has never been laid out._ In Release: _The method 'createTicker' was called on null._
Which embedder are you running, and what flavor/version of compositor?
from flutter-embedded-linux.
Which embedder are you running, and what flavor/version of compositor?
Embedder is flutter-wayland with weston 9 as the compositor (NXP zeus with their weston 9)
from flutter-embedded-linux.
Interesting.
@HidenoriMatsubayashi san. There should be a bit more debug output around platform channels, and callbacks in debug builds. Masking these is not a good idea, as it can be hiding issue preventing application from running. Some channel callbacks and engine callbacks are required for proper operation of the gallery app. Also it might be good to have bug template that requests weston and wayland versions from reporter.
@jcviau Non-modified weston 8/9 doesn't work for me in any scenario, regardless the app. It should work unaltered on desktop embedder, as well as any other available embedder. So if alteration to make app run specific to to one of these embedders it should be reported as a unique bug. It very well could be related to non-implemented platform channels / engine callbacks.
from flutter-embedded-linux.
Is there some logs we can collect to diagnostic issues ? Would allow us to create a new issue with more details.
from flutter-embedded-linux.
from flutter-embedded-linux.
We were able to run the gallery application on an i.MX 8M Mini with wayland. We had to remove one line in main.dart, otherwise the application isnt displayed. The line is:
restorationScopeId: 'rootGallery'
This does appear to be the cause of the problem with the Wayland embedder. I haven't used RestorationManager thus far unfortunately.
This ticket is getting a bit overloaded. Perhaps it will be better to split it into several different ones.
from flutter-embedded-linux.
Note: You can also hard code the locale in the application by changing locale:null (in main.dart) to something else. e.g. locale: const Locale('en', ''). That's what I did initially instead of setting LC_ALL.
I've been trying to run the v2.9.2 release for hours. I tried building from source, the pre-built Linux binaries, and the Snap (sudo snap install flutter-gallery
). All of these gave me the big empty grey window until I made the above code change. I'm running Ubuntu 22.04. I hope this doesn't discourage potential new Flutter users.
Should this be submitted to the Flutter Gallery repo?
from flutter-embedded-linux.
Related Issues (20)
- Add FlutterEngineNotifyDisplayUpdate support HOT 2
- Debug - Can only start Dart VM service, not observatory HOT 1
- Support DRM-GBM Backend for IMX GPU Vivante 6 Driver HOT 4
- Atomic Modeset fails HOT 8
- waylnd: [FATAL:flutter/shell/common/display_manager.cc(32)] Check failed: displays_.empty(). HOT 14
- DRM mode on raspberry pi 4b Error: Couldn't find file "symbols/US" in include paths HOT 3
- "text_scaling_factor" should default to 1 if unset HOT 1
- Internal CI for Engine artifacts doesn't work HOT 2
- xdg_wm_base@11: error 4: xdg_surface buffer (1280 x 720) is larger than the configured fullscreen state (1024 x 600) HOT 3
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 1
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 16
- Does this project run without systemd? HOT 1
- Disconnecting mouse that is hovering over button on wayland client results in Segmentation fault HOT 4
- how to measure flutter performance on embedded device HOT 4
- Support multiple wl_seats for remote desktop sharing HOT 3
- Turning the display OFF/ON swaps the width and height of the application HOT 9
- Dart VM: Wrong full snapshot version, expected XXX, found YYY HOT 2
- Incorrect snapshot architecture HOT 7
- App crashes when non-ASCII characters are sent from input method
- Consider replace systemd with libuv? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-embedded-linux.