clion autocomplete keeps processing forever - autocomplete

I am using clion latest version 2020.2
Build #CL-202.6397.106, built on July 28, 2020
Autocomplete suddenly stopped working even though clion can build and complie my code just fine.
To make sure the issue is not project dependent, I started a new project. However, the problem still presists. As you can see in the attached image below. Whenever I explicity press (ctrl+space) I get this empty suggestion dropdown and the icon keeps rotating forever. (Note: If I don't press ctrl+space, the dropdown menu never shows up)
I made sure that PowerSaveMode is disabled.
I also tried File->Invalidate Cache/Restart->Invalidate and Restart
Did anyone face a similar issue? Any suggestions to what could be the cause of this problem?
Additonal information
gcc version: gcc (Ubuntu 4.8.5-4ubuntu8) 4.8.5
g++ version: g++ (Ubuntu 4.8.5-4ubuntu8) 4.8.5

I am posting this answer in case someone comes across this issue in the future.
The issue was definitly caused by the new update to clion. So I installed an older version. There is a tool named "JetBrains Toolbox" which is very convient when it comes managing multiple versions of any JetBrains software (clion in my case).
An additional note, if you want to run clion (or any other solution) as a superuser do not do that through the JetBrains toolbox. The toolbox will have the installtion location for each installed version, use it to run as a superuser from the terminal.

Related

Gdb stops when viewing variables in Eclipse

When debugging a c++ app, and hitting a breakpoint, gdb terminates the debug session when I click on a variable to expand its content in the Variables panel.
The displayed message is: <terminated, exit value: 0>gdb (10.1.90.20210103)
Printing the variable from the Debugger Console works correctly.
Debugging was working OK some weeks ago. The major changes that happen recently was a debian upgrade from 10 to 11 (bullseye), and an upgrade of the Eclipse version.
Activating gdb traces following where can I find GDB traces, I could see the commands sent to GDB, but no particular error before GDB stopped.
Any idea of what could cause this issue?
Eclipse Version: 2021-12 (4.22.0), Build id: 20211202-1639 running on linux debian bullseye.
I answer my own question.
After checking related answers, I suspect that the problem is linked to stl pretty printing in Eclipse (which was working fine before). I tried different version of Eclipse and gdb, and finally managed to fix the issue by using a previous version of gdb (8.3 instead of 10.1).
Here is the procedure that I followed (I'm not sure all steps are mandatory).
Reinstalled eclipse from scratch
Deleted the .metadata directory and recreated the eclipse workspace
Downloaded version 8.3 of gdb sources, and compiled it with python support ('./configure --with-python'). Note that libgmp-dev and python2.7-dev debian packages must be installed.
Copied gdb-8.3 somewhere under /usr/local/
Updated eclipse preference settings : C-C++/Debug/GDB and change GDB Debugger to the pach where gdb 8.3 executable was located under /usr/local/.
Checked in Debugger Console that the right gdb version is displayed. If this is not the case, you may have to set gdb using Debug As.../Debug Configurations/Debugger/GDB Debugger

debugging rust on Eclipse Corrosion no longer works on fresh install

I change my Hard drive and so I made a fresh Eclipse Corrosion install but I kept my Rust projets. Problem is I get an error when I launch my prog in debug mode. It seems to work in run mode but I didn't test this that much.
Error is
An internal error occurred during: "Launching my_prog".
Cannot read the array length because "launchConfigEnv" is null
Important note : it seems to be link with the use of an input file (debug configuration/common/input file)
I try many things, many installs, new projects, many, many things but nothing works (and I cannot figure out what launchConfigEnv is).
Any help welcome...
Edit : I install 2019.12 Eclipse and it works fine. I will work a little with this version and try out more configuration to shrink the problem.
As a workaround, add a single environment variable to the launch configuration, as follows:
Once that is done, re-launch it and it should work.
Note that in order to get rust debugging working in Eclipse I installed MSYS2 and the following MSYS2 packages.
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-gdb
pacman -S man
I followed some instructions in the Rust Corrosion Trouble Shooting guide to get a working GDB.
Reference: https://github.com/eclipse/corrosion/blob/master/documentation/Troubleshooting.md#debugging-on-windows
The Rust debugger command needs to be changed to rust-dbg.cmd, as follows:
However, the PATH environment wasn't working for me, so in the rust-gdb.cmd script I added this near the top:
SET PATH=%PATH%;F:\msys64\mingw64\bin;F:\Data\.cargo\bin
(Adjust as-per your installation of MSYS2 and Cargo/Rustup)
After which Eclipse was able to start a debug session and stop at a breakpoint.

Eclipse Neon.3 fails to launch after install

I've installed Eclipse Neon.3 on my windows 7 machine, after the install process has finished, the installer has an option to 'launch now', which I do and the IDE boots up and works as expected.
However when I close eclipse and then reopen it, I get a crash which prevents it from booting up (sorry for this being a picture, but there doesn't seem to be an easy way to copy the text):
The version I've installed is Release 4.6.3, and the build ID is 20170314. I've installed and removed it 3 times and observed the same behaviour each time. I've tried doing a reset between boots and installs. I've also tried inspecting my environment variables, which look like this:
JAVA_HOME:C:\Program Files\Java\jdk1.8.0_91
PATH: %PATH%;%JAVA_HOME%\jre\bin
Is this a known issue, or do I have something wrong in my setup? Prior to this I discovered 4 versions of the jre/jdk on my machine, and two versions of eclipse. I think I have correctly removed all but the one referenced from my java home, and I entirely removed eclipse and downloaded the latest version (neon.3).
I've fixed the issue, and whilst I'm still not entirely sure why it was a problem, here is how I fixed it.
I opened a terminal and ran 'java -version' (I should have done this first). It was failing to find java.exe, despite the bin folder being on the path. Running this revealed that it was actually calling a shortcut to java.exe found in 'c /programdata/oracle/java/javapath/' which pointed to a now non existent version of java.
So long story short, if you have a similar problem, check if you have shortcuts in the folder 'c /programdata/oracle/java/javapath/java.exe' and ensure they point to the correct program.

eclipse - swt - using windowbuilder in xfce env

I have some problems with eclipse indigo x64 Linux; The problem is using windowbuilder (the SWT); I tried using gwt or swing but they both cause either windowbuilder freeze or even eclipse crash...
The alike issue it seems I found related info in official eclipse indigo offline Help which says :
How can I prevent the preview window from flashing under Linux using Metacity
In order to create the graphics that you see in the design view,
WindowBuilder Pro creates an off screen window containing the various
widgets and they takes a screen snapshot of them. This works very well
under Windows, OSX and some versions of Linux. Recent versions of the
Metacity window manager (more recent than 2.1.4), however, have been
modified/"fixed" to disallow windows to be opened off screen. This
forces the preview window to appear on screen leading to an annoying
flashing effect any time you make a change. The solution is to disable
the Metacity "fully_onscreen" constraint by patching the Metacity
source code and rebuilding and installing the patched version into
your system.
Here are the steps to follow:
Download the Metacity source code from ftp://ftp.gnome.org/pub/gnome/sources/metacity/
Unpack the source code tarball into any temporary directory.
Chdir into this directory (with the unpacked code).
Find window.c file and open it with your favourite texteditor.
Find a line with "window->require_fully_onscreen = TRUE;"
Replace it with "window->require_fully_onscreen = FALSE;"
Save the changes and close the editor.
Open a terminal and chdir into the directory with the source code (nice if you have already done this)
Run "./configure".
Run "make all".
Make sure that steps 9 & 10 completed without errors.
Become root (or execute the next command via "sudo" depending on the Linux you are running)
Run "make install" (or "sudo make install").
Save your work and close any application you are working with.
End your session (or press Ctrl-Alt-Delete to restart the x-server) and log in again.
You are done!
well seems like I have the snapshot really but, as I can get it, the snapshot doesn't want to dispose or similar so I have either resize the whole eclipse or press F5 to refresh (which works not at once);
I am not sure how to fix the issue in case I have xfce+adwaita installed? I don't have metacity installed; Seems like xfce works with gtk instead of metacity (correct me if I am wrong);
So my question is... how to fix the "window flashing or freezing" if I have :
xfce4
adwaita-dark theme
linux arch x64ce
Thanks
Try to install install libswt-gtk-3-jni and libswt-gtk-3-java.

use c++11 on mac os x mountain lion with eclipse (Juno or Kepler)

hey everyone I am just starting to use c++11, which I need for uni, a have a mac and I am familiarise with eclipse (I have both Juno or Kepler with CDT), but as much as I tried I can not run properly any c++11 features in eclipse or compile any code, there is someone that has been in my same position and please help me, seriously I already try all the previous threads about, but for my frustration i am still compiling everything on terminal and editing all in gedit with is not the most confortable way, by the way I have to compile with g++-4.7 as command not g++ meaning that still I have the old OS gnu,please someone just explain me step by step what to do I am terribly frustrated, I beg!!!!
ps. just clarify i install gcc 4.7 with homebrew but the path is different than the original (/usr/local/bin instead of the regular /usr/bin which I believe eclipse use and the reason I can't work with it, thank you for all guys)
Well after trying different things and expending tedious time fixing my issue I will answer my own question with the hope someone with my same needs will not experiment such annoying situation.
First as in a lot of forums remark and is well know the gcc compiler provided for the Mac OS is old and obsolete (more than 5 years old is a lot in computing terms), so first step to work with c++11 is to get a new version of the gcc.
There are two options with the packets common managers (homebrew and macports), I have to say that I was that frustrated that i tried both to see if was a problem of the version in the packet manager even thought should be the same, but for my surprise there is a small difference which later I will explain, which bring me to suggest use macport because with macports the eclipse will work as smooth as with the old c++ while with the installation with homebrew the compilation will be the same than the macport but eclipse will complain about the new grammar in the c++11 (eclipse will tell you that the resource couldn't be resolve, even do compile properly ).
The steps for this are assuming you have the command line already:
download the appropriate macports from the official web page(google it)
in terminal type the following commands
sudo port selfupdate
sudo port upgrade outdated
sudo port install -d gcc47
port select --list gcc
with this you have gcc and will show you which are the gcc installed in you mac now just missing select as defauld the new gcc, do it with.
- sudo port select gcc mp-gcc47
3 having install in my case eclipse kepler create a new C++ project, but instead to left everything standar do the next:
- in the wizard window select as toolchain the cross GCC as the toolchain(for example ni the executable Hello World c++ project), put a random name and next , following window press next now here in the window for the selection of the compiler give the path for the new gcc(the default is /opt/local/bin) as prefix leave it empty and press now the finish bottom.
4 Now go to project properties and in c/c++ build select settings and in the tool settings tab go to miscellaneous in cross g++ compiler and in other flags add -std=c++11.
5 by the last go to c/c++ general -> paths and symbols and select the tab symbols and in select the gnu c++ language and press add to type GXX_EXPERIMENTAL_CXX0X as name just that and press ok.
Now just press apply and ok, after that your mac should be running c++11 in eclipse.
Hope works for you as for me see you around guys.
Note probably you will be to configurate the run but it is more simpler than you thing just go to run -> run configurations and double click in c/c++ application now almost everything is generate for you just you have to fill up the first label with the path to the out put of the compiler (I asumme that you already build the project which will generate the executable file ) normally that file is in the debug folder of the project with the same name than the file compiled n does all.
have a good one guys.