Skip to content

[windows] DPI computation returns 0 for anything older than Windows 10 v1703 #572

@mastermind-computing

Description

@mastermind-computing

Hello everyone! I was trying to test my Windows build on some devices.I've transferred windows file in build file to computers and tried to run my app.On some devices the app runs,I mean I can see the window title and borders but inside is just black screen.I couldn't figure out what was happening so I've installed flutter to one of them and this is the output I get when I run the app.I don't know If It's related but flutter asked me to install Windows SDK 8.1 to run the app

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
Syncing files to device Windows...
flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════

flutter: The following assertion was thrown during performLayout():

flutter: 'package:flutter/src/rendering/view.dart': Failed assertion: line 161 pos 12: '_size.isFinite': is

flutter: not true.

flutter:

flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially

flutter: more information in this error message to help you determine and fix the underlying cause.

flutter: In either case, please report this assertion by filing a bug on GitHub:

flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md

flutter:

flutter: When the exception was thrown, this was the stack:

flutter: #2      RenderView.performLayout (package:flutter/src/rendering/view.dart:161:12)

flutter: #3      RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1578:7)

flutter: #4      PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:844:18)

flutter: #5      RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:340:19)

flutter: #6      WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:776:13)

flutter: #7      RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:279:5)

flutter: #8      SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1040:15)

flutter: #9      SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:982:9)

flutter: #10     SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:791:7)

flutter: #19     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)

flutter: #20     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)

flutter: #21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

flutter: (elided 10 frames from class _AssertionError, package dart:async, and package dart:async-patch)

flutter:

flutter: The following RenderObject was being processed when the exception was fired: RenderView#4fbdc NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE:

flutter:   debug mode enabled - windows

flutter:   window size: Size(784.0, 561.0) (in physical pixels)

flutter:   device pixel ratio: 0.0 (physical pixels per logical pixel)

flutter:   configuration: Size(Infinity, Infinity) at 0.0x (in logical pixels)

flutter: This RenderObject had the following descendants (showing up to depth 5):

flutter:     child: RenderSemanticsAnnotations#bd593 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

flutter:       child: RenderPointerListener#605f4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

flutter:         child: RenderAbsorbPointer#2cc6c NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

flutter:           child: RenderSemanticsAnnotations#cf142 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

flutter:             child: _RenderTheatre#bfeb1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════

And this is the doctor output.

C:\Users\ERDEM>flutter doctor -v
[√] Flutter (Channel unknown, v1.10.6-pre.29, on Microsoft Windows [Version 10.0.10240], locale tr-TR)
    • Flutter version 1.10.6-pre.29 at C:\flutter
    • Framework revision 919cc97f6a (3 days ago), 2019-09-20 14:57:05 -0700
    • Engine revision 99092a0436
    • Dart version 2.6.0 (build 2.6.0-dev.1.0 7c1821c4aa)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.


[√] Visual Studio - develop for Windows (Visual Studio Community 2017 15.9.16)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
    • Visual Studio Community 2017 version 15.9.28307.858

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[!] VS Code (version 1.38.1)
    • VS Code at C:\Users\ERDEM\AppData\Local\Programs\Microsoft VS Code
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (1 available)
    • Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.10240]

! Doctor found issues in 3 categories.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions