Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Syntax error in code and rls consumes half my ram and 100% of my CPU #1698

Open
jeena opened this issue Sep 11, 2020 · 0 comments
Open

Syntax error in code and rls consumes half my ram and 100% of my CPU #1698

jeena opened this issue Sep 11, 2020 · 0 comments

Comments

@jeena
Copy link

jeena commented Sep 11, 2020

I had a syntax error in my code:

        let login: gtk::Dialog = gtk::Dialog::new_with_buttons(Some("Login"),
                                                                Some(&widget),
                                                                gtk::DialogFlags::MODAL | g
                                                                tk::DialogFlags::DESTROY_WITH_PARENT |
                                                                gtk::DialogFlags::USE_HEADER_BAR,
                                                                &[cancel_button, login_button]);

And when using GNOME Builder my computer started behaving really weird until I closed Builder. I checked top and it showed that rls was using one core 100% and 52% of my 16 GB RAM when Builder was running. The mouse stopped working, YouTube playback started stuttering and I couldn't basically use my computer until I closed Builder. rustc wasn't able to compile it either but instead giving me a syntax error it got killed after some time:

error: could not compile `feedthemonkey`.

Caused by:
  process didn't exit successfully: `rustc --crate-name feedthemonkey --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=865c8db208de96f3 -C extra-filename=-865c8db208de96f3 --out-dir /home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps -C incremental=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/incremental -L dependency=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps --extern gdk=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgdk-e4b722cd8d9463f2.rlib --extern gettextrs=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgettextrs-ea5a2d7dbdfe566e.rlib --extern gio=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgio-f7947b8dfd7a35ba.rlib --extern glib=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libglib-e7c2c93c3f636c78.rlib --extern gtk=/home/jeena/.cache/gnome-builder/projects/FeedTheMonkey/builds/net.jeena.feedthemonkey.json-flatpak-org.gnome.Platform-x86_64-3.34-master/target/debug/deps/libgtk-7e1f83000f401ea8.rlib` (signal: 9, SIGKILL: kill)
FAILED: src/feedthemonkey 

The syntax error is that g at the end of line 3 which was supposed to be in line 4. So while rustc at least timed out rls just kept cranking and making my computer unusable. I just wanted to report it because I guess it's a rare occurence that something like that happens but it was nicely reproducable. As soon as I fixed the syntax error the problems stopped.

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

No branches or pull requests

1 participant