Ask Reuben

GST – False Positive, False Negative Syntax Check Errors.

Why does the Genero Studio Code Editor show that my file has a syntax error but when I compile it, it compiles? 

Why does my file not compile, but Genero Studio Code Editor indicates the file has no syntax errors? 

This is a question that gets asked when there has been a maintenance release for the compiler and runner, but there has been no maintenance release of Genero Studio like there is at the time of writing.  It also gets asked a lot during the Early Access Program program, and also gets asked by those using an out of support release of FGL but using the latest version of Genero Studio.  The question relates to why a compilation error is either detected in the Code Editor but not in an actual compile, or is not detected in the Code Editor but is in the actual compile.  That is a False Positive or False Negative.

The reason the error occurs is that the Genero compiler used for the real time syntax checking is NOT the Genero compiler that is used for your compilation.  For performance reasons Genero Studio comes complete with some special editions of the compiler that are used for functionality that Genero Studio requires such as the real time syntax checking.  After every keystroke you type in the code editor, this version of the compiler is being called rapidly to update the real time syntax checking.  The performance improvement from this design decision is most noticeable with a remote Genero Studio configuration.  If we did not do this and instead used the same remote Genero installation you were using for the actual compile, then there would be a LOT of network traffic as the unsaved code you were editing was shipped across the network on every keystroke and the compilation results sent back to update the real time syntax checking.  As it is going across the network then the response time is also not as quick as if it was compiled locally.  So there is this optimisation process using a local version of the compiler that is installed into Genero Studio that means there is no network traffic and allows the code editor to respond quicker.  If you had a local Genero Studio configuration it would still be an improvement as amongst other things it is not checking your license.

If you look inside Genero Studio, in %GSTDIR%/gst/bin/fgl/ (and equivalent directory for Linux and OSX installations) you will find folders with Genero version numbers as their names.



Inside these folders is the special version of the compiler that is used for the real time syntax checking etc.  You don’t need to do anything with this folder and should leave it alone.   Genero Studio looks at the version you are using for compilation and finds the best match from this list.  That screenshot is from Genero Studio 3.20.08 and if your current configuration points to a 3.20 version of FGL, it will use the version it has (FGL=3.20.08) for the real time syntax check, if your current configuration points to a 3.10 FGL version, it will use the version it has (FGL=3.10.21) for the real time syntax check etc.  When your Genero Studio configuration is pointing to a slightly different version than the versions available in this folder, this is when the false positives and negatives can occur.

To see an example, at the moment with GST=3.20.08 and a configuration that is pointing at  FGL=3.20.11.  This bug with the compiler FGL-5462 was fixed in FGL 3.20.11 but in Genero Studio the incorrect syntax error still appears in the real time syntax check because the real time syntax check is using the internal  FGL=3.20.08  …



… but if you have a configuration pointing at FGL=3.20.11, then you can click Build, the code will compile and execute, despite the syntax error that you can see in the Code Editor.

These False Positives (and False Negatives) can be irritating but should only happen very rarely, but when they do we get support calls saying “… you say you have fixed the issue but it is still appearing as an error inside Studio …”, or “… you have fixed it in the compiler but you have not fixed it inside Studio…”.  Perhaps we should add a button to Studio that will redo the syntax check in the Code Editor using the remote compiler?  Hopefully you can see that the contributing cause is us fixing an issue in the compiler.

In this example, the next maintenance release of Genero Studio would include at least FGL=3.20.11 internally for the real time syntax checking, and this false indication would no longer occur, (although it could occur in the other direction …)

I hope that gives you some insight why this situation can occur.