yamcs / yamcs-studio

Desktop TM/TC Client for Yamcs
https://docs.yamcs.org/yamcs-studio/
Eclipse Public License 2.0
27 stars 14 forks source link

Javascript one-line comments (//) stop the rest of the script execution in Yamcs Studio 1.0.5 #85

Closed tomvanbraeckel closed 5 years ago

tomvanbraeckel commented 5 years ago

We have a few displays with buttons that execute a .js file when you click it, but this no longer works in Yamcs Studio v1.0.5. Embedded Javascript works, though.

It works in Yamcs Studio v1.0.2.

The commit that seems to cause this regression is 1fa3337c44b326a0 because reverting it fixes the issue. But that commit fixes a memory leak so I don't want to revert it.

fqqb commented 5 years ago

I tried but could not reproduce this one as described. Can you send me a failing display file?

tomvanbraeckel commented 5 years ago

I've e-mailed the failing display file and the Javascript file that it references.

tomvanbraeckel commented 5 years ago

Changed the title to reflect the fact that it seems the issue is not external Javascript but the // comments used in such external Javascript...

tomvanbraeckel commented 5 years ago

Workaround appears to be using / and / comments.

fqqb commented 5 years ago

Thanks again for the good find.

Fixed on master and on v1.0.x branch. Included in yamcs-studio v1.0.6