flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.19k stars 27.26k forks source link

[Linux][GTK] Flutter apps will not display properly (Release mode) #59738

Open HidenoriMatsubayashi opened 4 years ago

HidenoriMatsubayashi commented 4 years ago

Sometimes, Flutter app is not displayed properly. In debug mode, It seems no problem.

Screenshot from 2020-06-17 21-35-01

Steps to Reproduce

  1. $ mkdir flutter_sample
  2. $ cd flutter_sample
  3. $ flutter create .
  4. $ flutter build linux
  5. $ ./build/linux/release/bundle/flutter_sample
  6. Exit the app
  7. go to No. 5 step. (Repeat several times)
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(108)] 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(108)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter doctor -v ``` $ flutter doctor -v [✓] Flutter (Channel master, 1.20.0-1.0.pre.91, on Linux, locale ja_JP.UTF-8) • Flutter version 1.20.0-1.0.pre.91 at /opt/flutter • Framework revision 9c3f0faa6d (6 hours ago), 2020-06-17 18:47:54 -0400 • Engine revision 965fbbed17 • Dart version 2.9.0 (build 2.9.0-14.0.dev 2b917f5b6a) [!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /home/matsu/Android/Sdk • Platform android-29, build-tools 29.0.2 • Java binary at: /usr/local/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) ✗ Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Chrome - develop for the web • Chrome at google-chrome [✓] Linux toolchain - develop for Linux desktop • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) • cmake version 3.10.2 • ninja version 1.8.2 • pkg-config version 0.29.1 [!] Android Studio (version 3.5) • Android Studio at /usr/local/android-studio ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) [✓] VS Code (version 1.46.0) • VS Code at /usr/share/code • Flutter extension version 3.11.0 [✓] Connected device (3 available) • Linux • Linux • linux-x64 • Linux • Web Server • web-server • web-javascript • Flutter Tools • Chrome • chrome • web-javascript • Google Chrome 83.0.4103.106 ! Doctor found issues in 2 categories. ```

Thank you.

stuartmorgan commented 4 years ago

Possibly related to #40068 since it's showing up only (or at least much more) in release mode.

HidenoriMatsubayashi commented 4 years ago

In the latest version, it doesn't appear until the mouse cursor moves over the window. The debug mode is the same.

phenbach commented 4 years ago

I have tried tried the sample counter program on different hardware and I get the same issue. ** (counter:112602): WARNING **: 09:58:55.135: Failed to start Flutter engine: Failed to create EGL surface: Bad Match Error waiting for a debug connection: The log reader stopped unexpectedly. Error launching application on Linux.

anonymouse64 commented 4 years ago

I see the same symptoms on Ubuntu 20.04 with nvidia proprietary drivers and the flokk-contacts snap (installed with snap install flokk-contacts):

$ flokk-contacts 
libEGL warning: DRI2: failed to authenticate
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(108)] 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(108)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter: FileSystemException: Cannot open file, path = '/home/ijohnson/snap/flokk-contacts/9/.local/share/flokk-contacts/app.settings' (OS Error: No such file or directory, errno = 2)
flutter: /##################################################
flutter: [BootstrapCommand]
flutter: DataDir is: /home/$USER/snap/flokk-contacts/9/.local/share/flokk-contacts
flutter: ##################################################
flutter: FileSystemException: Cannot open file, path = '/home/$USER/snap/flokk-contacts/9/.local/share/flokk-contacts/auth.dat' (OS Error: No such file or directory, errno = 2)
flutter: FileSystemException: Cannot open file, path = '/home/$USER/snap/flokk-contacts/9/.local/share/flokk-contacts/twitter.dat' (OS Error: No such file or directory, errno = 2)
flutter: FileSystemException: Cannot open file, path = '/home/$USER/snap/flokk-contacts/9/.local/share/flokk-contacts/github.dat' (OS Error: No such file or directory, errno = 2)
flutter: FileSystemException: Cannot open file, path = '/home/$USER/snap/flokk-contacts/9/.local/share/flokk-contacts/contacts.dat' (OS Error: No such file or directory, errno = 2)
flutter: #########################
flutter: BootstrapCommand Complete
flutter: #########################

flokk-contacts-broken

I assume that the FileSystemException errors are harmless and can be ignored, I have never used the application before so it makes sense to me that there is no local data files.

totof1169 commented 4 years ago

will not work in ubuntu 20.04 ,with the nvidia , with the same message as anonymouse64 work with the intel gpu

gspencergoog commented 3 years ago

There have been some recent changes that will be rolled in soon. We should retest this in a few days.

TahaTesser commented 3 years ago

Running Nvidia GTX RTX 2060 GPU Laptop on PopOS 20.10, can't reproduce any rendering issue in release build or debug build

flutter doctor -v ```bash [✓] Flutter (Channel master, 1.25.0-5.0.pre.65, on Linux, locale en_US.UTF-8) • Flutter version 1.25.0-5.0.pre.65 at /home/taha/Code/flutter_master • Framework revision 8f3a12f144 (4 hours ago), 2020-12-04 08:42:30 +0100 • Engine revision 20caf54969 • Dart version 2.12.0 (build 2.12.0-76.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /home/taha/Code/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /home/taha/Code/sdk • Java binary at: /home/taha/Code/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at google-chrome [✓] Linux toolchain - develop for Linux desktop • Ubuntu clang version 11.0.0-2 • cmake version 3.16.3 • ninja version 1.10.0 • pkg-config version 0.29.2 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions). [✓] VS Code (version 1.51.1) • VS Code at /usr/share/code • Flutter extension version 3.16.0 [✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Linux • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.66 ! Doctor found issues in 1 category. ```
marchellodev commented 3 years ago

+, when running flutter app in debug mode on external gpu (GeForce GTX 1050 Ti), the problem appears. Running the app on internal intel gpu works fine

(Pop!_Os 20.04, Proprietary nvidia drivers 460.73.01)

flutter-triage-bot[bot] commented 3 months ago

The triaged-desktop label is irrelevant if there is no team-desktop label or fyi-desktop label.

AkechiShiro commented 3 months ago

I believe this is still relevant.