Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Web] Text doesn't render with Image on screen unless an activity (such as hover) is detected on page #94318

Closed
flutter/engine
#30680
Assignees
yjbanov
Labels
P1High-priority issues at the top of the work lista: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowe: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer version
@hugz6

Description

@hugz6

I discovered a problem on Flutter Web with Chrome.
The Text widget no longer appears once the Image.asset widget is rendered on the screen and then reappears when the user moves the mouse.
I realised that the Text appeared and then disappeared when the image was displayed because I used Chrome's profiling mode.

Steps to Reproduce

  1. Add a logo.jpg file in {project_root}/assets/images/ and add the path '/assets/images/logo.jpg' in pubspec.yaml
  2. Executeflutter run on the code sample
  3. Wait without doing anything until the page is fully loaded.
  4. You can now see that the Texts aren't displayed

Expected results: Visible Text widgets

Actual results: Invisible Text widgets

Code sample
import'package:flutter/material.dart';voidmain() {runApp(constMyApp());}classMyAppextendsStatelessWidget {constMyApp({Key? key}):super(key: key);// This widget is the root of your application.@overrideWidgetbuild(BuildContext context) {returnMaterialApp(      title:'Flutter Demo',      theme:ThemeData(// This is the theme of your application.//// Try running your application with "flutter run". You'll see the// application has a blue toolbar. Then, without quitting the app, try// changing the primarySwatch below to Colors.green and then invoke// "hot reload" (press "r" in the console where you ran "flutter run",// or simply save your changes to "hot reload" in a Flutter IDE).// Notice that the counter didn't reset back to zero; the application// is not restarted.        primarySwatch:Colors.blue,      ),      home:constMyHomePage(title:'Flutter Demo Home Page'),    );  }}classMyHomePageextendsStatefulWidget {constMyHomePage({Key? key,requiredthis.title}):super(key: key);// This widget is the home page of your application. It is stateful, meaning// that it has a State object (defined below) that contains fields that affect// how it looks.// This class is the configuration for the state. It holds the values (in this// case the title) provided by the parent (in this case the App widget) and// used by the build method of the State. Fields in a Widget subclass are// always marked "final".finalString title;@overrideState<MyHomePage>createState()=>_MyHomePageState();}class_MyHomePageStateextendsState<MyHomePage> {@overrideWidgetbuild(BuildContext context) {returnScaffold(      body:Center(        child:Column(          mainAxisAlignment:MainAxisAlignment.center,          children:<Widget>[constText('I am not rendering',            ),Text('THIS IS A TEXT NOT RENDERING',              style:TextStyle(                fontSize:36,              ),            ),Image.asset('assets/images/logo.jpg', fit:BoxFit.fitHeight),Text('THIS IS ALSO NOT',              style:TextStyle(                fontSize:36,              ),            ),          ],        ),      ),      floatingActionButton:FloatingActionButton(        onPressed: (){},        tooltip:'Increment',        child:constIcon(Icons.add),      ),// This trailing comma makes auto-formatting nicer for build methods.    );  }}
Logs

flutter run --verbose

flutter run --verbose[  +62 ms] executing: [F:\TOOLS\Flutter\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H[  +74 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H[        ] 8b1cf766e773ea8e966ff7c9e0c348709740b294[        ] executing: [F:\TOOLS\Flutter\flutter/] git tag --points-at 8b1cf766e773ea8e966ff7c9e0c348709740b294[  +64 ms] Exit code 0 from: git tag --points-at 8b1cf766e773ea8e966ff7c9e0c348709740b294[   +1 ms] executing: [F:\TOOLS\Flutter\flutter/] git describe --match *.*.* --long --tags 8b1cf766e773ea8e966ff7c9e0c348709740b294[  +83 ms] Exit code 0 from: git describe --match *.*.* --long --tags 8b1cf766e773ea8e966ff7c9e0c348709740b294[        ] 2.6.0-11.0.pre-847-g8b1cf766e7[   +8 ms] executing: [F:\TOOLS\Flutter\flutter/] git rev-parse --abbrev-ref --symbolic @{u}[  +46 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}[        ] origin/master[        ] executing: [F:\TOOLS\Flutter\flutter/] git ls-remote --get-url origin[  +46 ms] Exit code 0 from: git ls-remote --get-url origin[        ] https://github.com/flutter/flutter.git[ +117 ms] executing: [F:\TOOLS\Flutter\flutter/] git rev-parse --abbrev-ref HEAD[  +60 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD[        ] master[  +71 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.[   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.[  +65 ms] executing: D:\Users\Admin\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l[  +53 ms] List of devices attached[   +6 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.[   +5 ms] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.[  +84 ms] Multiple devices found:[  +54 ms] Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.45[   +1 ms] Edge (web)   • edge   • web-javascript • Microsoft Edge 96.0.1054.34[   +1 ms] [1]: Chrome (chrome)[        ] [2]: Edge (edge)[   +1 ms] Please choose one (To quit, press "q/Q")[        ] : [+11532 ms] 1[  +12 ms] Skipping pub get: version match.[ +125 ms] Launching lib\main.dart on Chrome in debug mode...[  +87 ms] Updating assets[  +78 ms] Waiting for connection from debug service on Chrome...[  +87 ms] <- reset[   +6 ms] F:\TOOLS\Flutter\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev F:\TOOLS\Flutter\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-rootF:\TOOLS\Flutter\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dillD:\Users\Admin\AppData\Local\Temp\flutter_tools.22c8b1c9\flutter_tool.e2380af1\app.dill --libraries-spec file:///F:/TOOLS/Flutter/flutter/bin/cache/flutter_web_sdk/libraries.json --packagesF:\PROJECT\issue\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-rootD:\Users\Admin\AppData\Local\Temp\flutter_tools.22c8b1c9\flutter_tools.7be6d818 --filesystem-scheme org-dartlang-app --initialize-from-dill build\b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.track.dill --platformfile:///F:/TOOLS/Flutter/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety[  +11 ms] <- compile org-dartlang-app:/web_entrypoint.dart[+12996 ms] Waiting for connection from debug service on Chrome... (completed in 13,1s)[   +1 ms] Synced 28.5MB.[        ] <- accept[        ] Caching compiled dill[ +517 ms] [CHROME]:[   +1 ms] [CHROME]:DevTools listening on ws://127.0.0.1:3747/devtools/browser/a59c4d44-f59b-4cda-95c9-28d1237bad8a[+3906 ms] DwdsInjector: Received request for entrypoint at http://localhost:3718/main_module.bootstrap.js[   +6 ms] MetadataProvider: Loading debug metadata...[  +11 ms] MetadataProvider: Loaded debug metadata (sound null safety)[   +6 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:3718/main_module.bootstrap.js[+6183 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true[  +66 ms] DevHandler: Debug service listening on ws://127.0.0.1:3783/TQ24KKypdZg=/ws[  +17 ms] This app is linked to the debug service: ws://127.0.0.1:3783/TQ24KKypdZg=/ws[   +8 ms] Debug service listening on ws://127.0.0.1:3783/TQ24KKypdZg=/ws[        ]  Running with sound null safety [   +3 ms]   To hot restart changes while running, press "r" or "R".[   +1 ms] For a more detailed help message, press "h". To quit, press "q".[   +1 ms] An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:3783/TQ24KKypdZg=[+4371 ms] The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:3783/TQ24KKypdZg=

flutter analyze

flutter analyzeAnalyzing issue...                                                         info - Prefer const with constant constructors - lib\main.dart:62:13 - prefer_const_constructors   info - Prefer const with constant constructors - lib\main.dart:64:22 - prefer_const_constructors   info - Prefer const with constant constructors - lib\main.dart:69:13 - prefer_const_constructors   info - Prefer const with constant constructors - lib\main.dart:71:22 - prefer_const_constructors4 issues found. (ran in 44.2s)

flutter doctor -v

flutter doctor -v[√] Flutter (Channel master, 2.6.0-12.0.pre.847, on Microsoft Windows [version 10.0.19043.1348], locale fr-FR)    • Flutter version 2.6.0-12.0.pre.847 at F:\TOOLS\Flutter\flutter    • Upstream repository https://github.com/flutter/flutter.git    • Framework revision 8b1cf766e7 (6 hours ago), 2021-11-28 10:47:02 -0500    • Engine revision 4536092a7f    • Dart version 2.16.0 (build 2.16.0-55.0.dev)    • DevTools version 2.8.0    • Pub download mirror https://pub.flutter-io.cn[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)    • Android SDK at D:\Users\Admin\AppData\Local\Android\Sdk    X cmdline-tools component is missing      Run `path/to/sdkmanager --install "cmdline-tools;latest"`      See https://developer.android.com/studio/command-line for more details.    X Android license status unknown.      Run `flutter doctor --android-licenses` to accept the SDK licenses.      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.[√] Chrome - develop for the web    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)    • Visual Studio at D:\Program Files (x86)\Visual Studio    • Visual Studio Community 2019 version 16.8.30804.86    • Windows 10 SDK version 10.0.19041.0[√] Android Studio (version 4.1)    • Android Studio at D:\Program Files (x86)\Android Studio    • Flutter plugin can be installed from:       https://plugins.jetbrains.com/plugin/9212-flutter    • Dart plugin can be installed from:       https://plugins.jetbrains.com/plugin/6351-dart    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)[√] IntelliJ IDEA Community Edition (version 2021.1)    • IntelliJ at D:\Program Files (x86)\IntelliJ IDEA Community Edition 2021.1.1    • Flutter plugin can be installed from:       https://plugins.jetbrains.com/plugin/9212-flutter    • Dart plugin can be installed from:       https://plugins.jetbrains.com/plugin/6351-dart[√] VS Code (version 1.62.3)    • VS Code at D:\Users\Admin\AppData\Local\Programs\Microsoft VS Code    • Flutter extension version 3.25.0[√] Connected device (3 available)    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [version 10.0.19043.1348]    • Chrome (web)      • chrome  • web-javascript • Google Chrome 96.0.4664.45    • Edge (web)        • edge    • web-javascript • Microsoft Edge 96.0.1054.34! Doctor found issues in 1 category.
issue.mp4

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowe: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp