lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
980 stars 388 forks source link

Deprecated options in lcm-spy and lcm-logplayer-gui on 18.04 and 20.04 #331

Open lauralindzey opened 4 years ago

lauralindzey commented 4 years ago

After installing LCM on 18.04 or 20.04 (as described in #330), attempting to run lcm-spy results in the error:

lindzey@ubuntu:~/lcm-1.4.0/build$ lcm-spy
Unrecognized option: -Xincgc
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

This has a simple fix: edit the lcm-spy and lcm-logplayer-gui executables to remove the -Xincgc option.

ashuang commented 4 years ago

Thanks for the report, do you mind submitting a PR?

lauralindzey commented 4 years ago

I just took a quick look, and I have no idea where to make the change -- searching the repo for "Xincgc" doesn't show up anywhere in code. Maybe this has been fixed since the last release?

(We are not installing from head -- I have release 1.4, from here)

hoxell commented 4 years ago

The Xincgc option was dropped in https://github.com/lcm-proj/lcm/commit/f8543c750346c6f29a524cc6c6f6e2b9e9e2dff2 which was merged after 1.4 was released, so if you can build from master or just manually update lcm-spy.sh.in, this should be resolved.

changzhengwu commented 3 years ago

The Xincgc option was dropped in f8543c7 which was merged after 1.4 was released, so if you can build from master or just manually update lcm-spy.sh.in, this should be resolved.

I have done this step "build from master"|, and solved the problem

xieyuxi1107 commented 3 years ago

I checked that the -Xincgc option is not in lcm-spy.sh.in but still get the same error. I made sure to build again after I checked that. Strange! Anyone knows the issue here?

hoxell commented 3 years ago

Do you have (or have had) different versions installed? What's the output of cat $(which lcm-spy)?

xieyuxi1107 commented 3 years ago

@hoxovic Hey! Thanks for the fast response! I suspected that I had other versions installed from before too. However, cat $(which lcm-spy) seems to show that I got the master branch lcm-spy. The ouput ends with this: # Launch the applet exec java -server -Djava.net.preferIPv4Stack=true -Xmx128m -Xms64m -ea -cp "$jars" lcm.spy.Spy "$@"

hoxell commented 3 years ago

That's odd 🤔 Could you provide the exact error msg?

xieyuxi1107 commented 3 years ago

I actually just tried again(without changing anything I swear) and it worked somehow!! Whoa, maybe there was a glitch somewhere earlier. Thanks for your help!! :)

Jelly123456 commented 2 years ago

Do you have (or have had) different versions installed? What's the output of cat $(which lcm-spy)?

Hi, I am facing a similar issue.

I installed an old version of LCM and run "lcm-spy", the error showed: image

Then I installed LCM by cloning the latest git and the same error showed. I checked "lcm-spy.sh.in" file, it does not include "-Xincgc" option. image

I run command "cat $(which lcm-spy)" and it showed that it still included "-Xincgc". image

How could I find where to remove "-Xincgc" option?

hoxell commented 2 years ago

The file without the option is from your local source folder while the cat command will output the contents of the installed file.

Then I installed LCM by cloning the latest git and the same error showed.

Cloning does not install it, so did you build master and install it?

If installing the newer version of lcm doesn't update the file for whatever reason, you can find the path to the installed version using which lcm-spy and then use your favourite editor to manually update it or overwrite it with the newer file (unless there are any incompatible changes between versions).