You mean ctrl-space in YOUR program?
What can cause this error? Where to look for problems?
There isn't *one* specific place....
When you press ctrl-space the IDE must read all your sources, to find possible completion.
The part of the IDE that does that is called "codetool". It has it's own pascal parser. And that parser might have a bug. Therefore fpc may be able to compile. But codetool may not be able to read your code.
Are the error you get sporadic?
I.e. if you restart the IDE, can you then do the ctrl-space that failed before?
That is can you do it at least once, just after starting the IDE. Even if later it will fail again?
Then it may be that codetools cache gets corrupted.
If you do not want to restart the IDE, then try this
- go up one or two lines from the "jumped to" error pos.
- make any dummy change to the source
- invoke completion on the dummy change
- undo the change
That normally forces codetools to reread that unit.
There is the menu: View > IDE internals > show codetool node....
(or similar)
Lazarus would be better if it would just ignore the error and show a list anyways when there is an error. It could show the ctrl+w list as fallback if it really cannot get anything for the normal list
Lazarus would be better if it would just ignore the error and show a list anyways when there is an error. It could show the ctrl+w list as fallback if it really cannot get anything for the normal list