Skip to content
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

Strange behavior in profile mode #2586

Closed
Goolpe opened this issue Jun 26, 2020 · 7 comments
Closed

Strange behavior in profile mode #2586

Goolpe opened this issue Jun 26, 2020 · 7 comments
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug
Milestone

Comments

@Goolpe
Copy link

Goolpe commented Jun 26, 2020

If I run profile mode with launch.json sometimes the app gets stuck on the splash screen with these dependencies.
flutter run --profile works fine

launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Flutter (Profile)",
            "request": "launch",
            "type": "dart",
            "flutterMode": "profile"
        }
    ]
}
Dependencies
dependencies:
  flutter:
    sdk: flutter
  flutter_secure_storage: ^3.3.3
  yandex_mapkit: ^0.3.9

Steps to Reproduce

  1. flutter create app
  2. add launch.json, dependencies
  3. update minSdkVersion: 18
  4. start debugging (F5)
flutter doctor -v
[✓] Flutter (Channel beta, 1.19.0-4.2.pre, on Linux, locale ru_RU.UTF-8)
    • Flutter version 1.19.0-4.2.pre at /home/ads/flutter
    • Framework revision 9b9b543d92 (4 дня назад), 2020-06-22 12:19:28 -0700
    • Engine revision 9a28c3bcf4
    • Dart version 2.9.0 (build 2.9.0-14.1.beta)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /home/ads/Android/Sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /snap/android-studio/84/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /snap/android-studio/84/android-studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Community Edition (version 2019.3)
    • IntelliJ at /home/ads/idea
    • Flutter plugin version 44.0.3
    • Dart plugin version 193.6911.25

[✓] VS Code (version 1.42.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.8.1

[✓] Connected device (3 available)
    • ZTE BLADE A0622 • 320376181424 • android-arm    • Android 7.1.1 (API 25)
    • Web Server      • web-server   • web-javascript • Flutter Tools
    • Chrome          • chrome       • web-javascript • Google Chrome 80.0.3987.116

• No issues found!
console logs
Running "flutter pub get" in example...                             0,4s
Launching lib/main.dart on ZTE BLADE A0622 in profile mode...
✓ Built build/app/outputs/flutter-apk/app-profile.apk (56.5MB).
Installing build/app/outputs/flutter-apk/app.apk...                12,4s
W/yandex.maps(28793): yandex::maps::runtime::locale::internal::detectCountry: Empty operatorInfo!
W/FlutterActivity(28793): Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@f5bd25e) but could not find and invoke the GeneratedPluginRegistrant.
W/yandex.maps(28793): yandex::maps::runtime::locale::internal::detectCountry: Empty operatorInfo!
I/OpenGLRenderer(28793): Initialized EGL, version 1.4
D/OpenGLRenderer(28793): Swap behavior 1
V/BoostFramework(31722): mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
V/BoostFramework(31722): mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
V/BoostFramework(31722): mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
V/BoostFramework(31722): mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
V/BoostFramework(31722): mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
V/BoostFramework(31722): BoostFramework() : mPerf = com.qualcomm.qti.Performance@cf8f0e
@DanTup
Copy link
Member

DanTup commented Jun 29, 2020

Could you try capturing a verbose log?

  • Run the Dart: Capture Logs command
  • Untick Analysis Server but leave everything else ticked and click OK
  • Run the app, reproducing the issue (leave the log running for around 60 seconds after it seems to get stuck, just in case anything is still happening so the log doesn't get cut short)
  • Click Cancel on the logging dialog to stop logging and open the log
  • Provide the log here

Also - can you reproduce from an empty project (created with Flutter: New Project, adding the dependencies) or only a specific project?

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Jun 29, 2020
@Goolpe
Copy link
Author

Goolpe commented Jun 30, 2020

Created an empty project with dependencies - the problem still exists
Dart-Code-Log.txt

@DanTup
Copy link
Member

DanTup commented Jun 30, 2020

Thanks! I was able to repro this (sometimes). It was a race condition in the debugger connection code. If the thread was in the PauseStart state when we first found it, everything worked fine. However if it was in the None state initially, and changed to PauseStart before we'd finished the rest of the startup code, the event would be dropped.

To fix it, any incoming events wait for the initialisation to complete before being processed.

If all the tests pass, I'll make a debug build for you to try out for a while before merging it.

@DanTup DanTup added in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug and removed awaiting info Requires more information from the customer to progress labels Jun 30, 2020
@DanTup DanTup added this to the v3.13.0 milestone Jun 30, 2020
@Goolpe
Copy link
Author

Goolpe commented Jul 1, 2020

Ok, thanks!

@DanTup DanTup closed this as completed in 29d0245 Jul 1, 2020
@DanTup
Copy link
Member

DanTup commented Jul 1, 2020

Please try out the build here:

https://github.com/Dart-Code/Dart-Code/releases/tag/v3.13.0-alpha.1

It should solve this issue. It's safe to stick on that version if it works - when v3.13 release stable, you'll be automatically upgraded back to the stable versions.

If you still see the issue (or notice any new issues that may be caused by the fix), please let me know!

@Goolpe
Copy link
Author

Goolpe commented Jul 1, 2020

Works great! Thanks!

@DanTup
Copy link
Member

DanTup commented Jul 1, 2020

Great! The next planned release will be around the end of the month, so you should stick on this version until then (and if anything comes up in the meantime, let me know so we can address it before releasing). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in debugger Relates to the debug adapter or process of launching a debug session in flutter Relates to running Flutter apps is bug
Projects
None yet
Development

No branches or pull requests

2 participants