cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE corrupts its index very often without any apparent reason.

HTD
Senior III

Each time I want to edit C++ code, I have first rebuild the index. It gets corrupted on each application start, it also gets corrupted when I add an empty line to a code file. It's always problem with C++ files, never with C files.

Usually the behavior I have is "unresolved reference to X", where X is basically any EXISTING and INCLUDED type or class. This occurs without any file is even written.

I've just built my project with no errors and warnings. The work is done, I save all changes and close the IDE. When I open it next time it shows like 30 errors with "unresolved reference to X". Those messages disappear when I rebuild the index or use "Freshen all files" options. This should not happen, because my options are set to update index after every disk write. I save a code file, the index is updated.

The project I'm working on is relatively big and rebuilding the index takes over a minute. I have to rebuild it like 10 times during editing just ONE file. I add a new line - suddenly 30 errors appear, index is broken, I rebuild it, errors disappear, but they reappear after 3 minutes of either editing the file, or even if I don't do anything. I click a mouse on the editor and index breaks.

I can't describe how to exactly reproduce this behavior because it's not simply deterministic, it occurs randomly, yet very, very often. I work with a TouchGFX project for STM32H745I-DISCO board, so - in order to reproduce the behavior you can start a new STM32H745I-DISCO project in TouchGFX Designer, then try to edit some C++ files generated by the Designer. Yes, the index breaks the same no matter if I edit my own code or TouchGFX generated code. It never breaks with C, it breaks only with C++.

The problem occurs in the current version of STM32CubeIDE, but it's present at least since 2 earlier versions.

0 REPLIES 0