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

run lsp-dart-run will lose response for a long time(several mintues) and high CPU/memory usage if current connected to a device. #132

Closed
zw963 opened this issue Jan 6, 2022 · 4 comments

Comments

@zw963
Copy link

zw963 commented Jan 6, 2022

Describe the bug

Perhaps not a lsp-dart issue, anyway, let me report here, for check it out.

I use emacs with emacs-daemon, that is, start emacs use emacs --daemon, then connect to server use emacsclient

lsp-dart-run work quite well in most of time, but, when occasionally, i am working on a dart project, then, i need working on another project, which we assume, ruby, it not too hard to open a ruby file buffer use same buffer as dart-lsp, and some times, i quit this buffer,
and close window, then use emacsclient open another ruby file.

until now, all works file, but, when i reopen my dart file buffer, lsp server still work, but i can't see those buttons for reload, restart e.g.

Then i want to reload my android app with lsp-dart-run, but for now, issue was happen, my arch linux + GNOME Wayland window system mouse/keyboard was lose any response temporarily for about 4 minutes, then i get failing message, like following:

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 33s
Exception: Gradle task assembleDebug failed with exit code 1
Process terminated! null, SIGTERM

Yes, my code have error, but the problem is, no error will same, it spend 4m 33s to finish, and within this time, my gnome lose response because i guess, virtualbox issue, just for guess, previous virtual andorid device session not get terminate correctly, then i start a new one, failed.

In fact,, after 4 minutes, my system is back, but my emulator device was gone, my genymotion android device lose response when click on it, i have to close it, and restore to factory settings, and restart it, i don't know if genymotion cause this issue, or lsp-dart.

for this case, maybe the correct way is, to run lsp-dart-dap-flutter-hot-restart to make those button back? I test it just now, it seem like works.

maybe, we can do some check on lsp-dart-run, if current connection to a device, just restart it, instead rerun it, and meet issue.

Thank you.

Version
[LSP Dart] 1.21.0 at 2022.01.06 @ Emacs 28.0.90
[Dart SDK] Dart SDK version: 2.15.1 (stable) (Tue Dec 14 13:32:21 2021 +0100) on "linux_x64"

[Flutter SDK] /home/zw963/flutter/
[Flutter project] true
[Project entrypoint] /home/zw963/Magpie/magpie-mobile-app/lib/main_local.dart
Mark set

@ericdallo
Copy link
Member

Never faced that issue, sounds like a issue with genymotion connection or something else

@zw963
Copy link
Author

zw963 commented Jan 6, 2022

Hi, which one android emulator you use?

@ericdallo
Copy link
Member

I use the emulator from android-sdk, the same that is bundled with android-studio and that flutter uses when using flutter emulators

@zw963
Copy link
Author

zw963 commented Jan 9, 2022

Hi, this issue caused by OOM, and no swap partition was created, it so surprised, 16 GB memory, open a virtualbox (win7), start a android emulator, emacs + lsp-art, docker-compose start serveral services, it is so easy to OOM.

i add swap partition, i guess the final solution is, add memory.

@zw963 zw963 closed this as completed Jan 9, 2022
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

2 participants