Skip to content

Android studio: freezing color scheme and main editor functions when updating lib files #6385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ArZargaryan opened this issue Nov 2, 2022 · 17 comments

Comments

@ArZargaryan
Copy link

ArZargaryan commented Nov 2, 2022

Steps to Reproduce

just updating project lib file.
Here is the link to the video where you can see the problem.
When it happens, autocomplete doesn't work either.

About problem

In recent times android studio main functions doesn't work for a few seconds very often when updating any project file.
This is very annoying because you have to wait a few seconds(about 5) for the autocomplete to work, or to go to the resource.
This happens when i edit and save any lib file.
I thought my PC is weak and the problem is my PC, so i decided to build a new PC, but it turned out that this was not the problem.

My PC specs:
CPU- AMD Ryzen 7 5800x 8-cores 16-threads 3.8Ghz
GPU - Nvidia Geforce GTX 1650 DDR6 128bit 4gb
RAM - HyperX DDR4 3200Ghz 16gb * 2
Storage - Netac nv7000 (nvme 7gb/s) 1TB

I built this PC 2 weeks ago(all components are new).
I attached a screenshot where you can see that the color scheme is incorrect and when it looks like this, the most important functions that can be performed with the assistance of the editor become non-working

I want to note that the webstorm always works without such friezes.
Intellij IDEA freezes as well.
So i'm sure the problem is in the flutter plugin.
I also contacted android studio support, but they said that similar problems are related to the flutter plugin.

Sun Oct 30 2022 14_05_50 GMT+0400 (Armenia Standard Time)

Version info

Studio Build: Android Studio Dolphin | 2021.3.1 Patch 1 - Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Version of Gradle Plugin: kotlin-gradle-plugin 1.7.20
Version of Gradle: 7.0.2
OS: Windows 11 PRO x64

[√] Flutter (Channel stable, 3.3.5, on Microsoft Windows [Version 10.0.22000.1098], locale en-US)
• Flutter version 3.3.5 on channel stable at D:\Sdk\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d9111f6402 (2 weeks ago), 2022-10-19 12:27:13 -0700
• Engine revision 3ad69d7be3
• Dart version 2.18.2
• DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at D:\Sdk\Android-SDK
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = D:\Sdk\Android-SDK
• Java binary at: D:\Softwares\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.3)
• Android Studio at D:\Softwares\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 11.0.13+0-b1751.21-8125866)

[√] IntelliJ IDEA Ultimate Edition (version 2022.2)
• IntelliJ at D:\Softwares\IntelliJ IDEA 2022.2.3
• Flutter plugin version 70.2.5
• Dart plugin version 222.4345.14

[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.1098]
• Chrome (web) • chrome • web-javascript • Google Chrome 107.0.5304.88
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.66

[√] HTTP Host Availability
• All required HTTP hosts are available

! Doctor found issues in 1 category.

@mariusvn
Copy link

mariusvn commented Nov 2, 2022

I have the same problem

@ArZargaryan
Copy link
Author

ArZargaryan commented Nov 2, 2022

I have the same problem

It's so annoying.
Did you fix that?

@stevemessick
Copy link
Member

Does this problem occur when the Flutter app is not running?

Would it be possible for you to try older versions of the Flutter SDK to see if this problem was introduced recently? I'm asking about the Flutter SDK, not the plugin, because I suspect this is a performance issue in the Dart analyzer.

@stevemessick stevemessick added the waiting for customer response Auto-close if no response label Nov 2, 2022
@stevemessick
Copy link
Member

More specifically, does this problem occur with Flutter SDK 3.3.2 or 3.3.1? Those have earlier versions of the Dart SDK.

More info at https://docs.flutter.dev/development/tools/sdk/releases?tab=linux

@ArZargaryan
Copy link
Author

ArZargaryan commented Nov 2, 2022

More specifically, does this problem occur with Flutter SDK 3.3.2 or 3.3.1? Those have earlier versions of the Dart SDK.

More info at https://docs.flutter.dev/development/tools/sdk/releases?tab=linux

As you said i tried flutter 3.3.1 but it still freezes.
I used to have version 3.0.x and 2.8.x but this problem was also then (although on the last PC)

@github-actions github-actions bot removed the waiting for customer response Auto-close if no response label Nov 2, 2022
@stevemessick
Copy link
Member

Thanks for the info.

@stevemessick
Copy link
Member

This is a performance issue in the Dart analyzer. Please create a new issue here: https://github.com/dart-lang/sdk/issues

If you add a link to the issue you create then I'll add the proper labels to bring it to the attention of the analyzer team.

@ArZargaryan
Copy link
Author

This is a performance issue in the Dart analyzer. Please create a new issue here: https://github.com/dart-lang/sdk/issues

If you add a link to the issue you create then I'll add the proper labels to bring it to the attention of the analyzer team.

Thank you for creating an issue in dart-lang repo.
I guess I don't need to create an issue anymore?.

@github-actions github-actions bot removed the waiting for customer response Auto-close if no response label Nov 4, 2022
@stevemessick
Copy link
Member

No, but you could up-vote the one I made.

@srawlins
Copy link
Contributor

srawlins commented Nov 9, 2022

@ArZargaryan thanks for filing an issue! Can you indicate whether you have any analyzer plugins in play? These would likely be in analysis_options.yaml for one or more packages in your project. Examples include "Flutter Enhancement Suite plugin" and "Dart Code Metrics".

@ArZargaryan
Copy link
Author

@srawlins
NOTE: This is an auto-generated analysis file, i didn't change this file.

# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
  # The lint rules applied to this project can be customized in the
  # section below to disable rules from the `package:flutter_lints/flutter.yaml`
  # included above or to enable additional rules. A list of all available lints
  # and their documentation is published at
  # https://dart-lang.github.io/linter/lints/index.html.
  #
  # Instead of disabling a lint rule for the entire project in the
  # section below, it can also be suppressed for a single line of code
  # or a specific dart file by using the `// ignore: name_of_lint` and
  # `// ignore_for_file: name_of_lint` syntax on the line or in the file
  # producing the lint.
  rules:
    # avoid_print: false  # Uncomment to disable the `avoid_print` rule
    # prefer_single_quotes: true  # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

@AleksMx
Copy link

AleksMx commented Nov 10, 2022

I consider these are related issues.

#3255

@AleksMx
Copy link

AleksMx commented Nov 10, 2022

This is a performance issue in the Dart analyzer. Please create a new issue here: https://github.com/dart-lang/sdk/issues

If you add a link to the issue you create then I'll add the proper labels to bring it to the attention of the analyzer team.

No, it`s not a perfomance issue in the Dart analyzer. It's some kind of internal lock in the IDE.

@mariusvn
Copy link

It's still happenning on my side and everthing is updated

@ArZargaryan
Copy link
Author

It's still happenning on my side and everthing is updated

The same here

@srawlins
Copy link
Contributor

Please see #3255 (comment). This syntax highlighting issue should be tracked at https://youtrack.jetbrains.com/issue/WEB-56916 and may be fixed by changing line ending encoding.

@mariusvn
Copy link

mariusvn commented Dec 1, 2022

for anyone having the problem, change your line ending from CRLF to LF (unix style).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants