View Issue Details

IDProjectCategoryView StatusLast Update
0035289LazarusIDEpublic2020-01-11 18:18
ReporterDejan Boras Assigned ToJuha Manninen  
Status resolvedResolutionfixed 
Product Version2.0 
Summary0035289: Get "end of source not found" message on identifier completion
DescriptionSometime, when trying to complete an identifier (ctrl+space) a "end of source not found" error message is thrown which seems related to codetools.
Steps To ReproduceNo discernible pattern was observed that leads to being able to reproduce this.
Additional InformationClosing and reopening Lazarus helps resolve the issue.
This occurs also on other platforms (fedora 29) even though the platform I've set is the one I use the most currently.
TagsNo tags attached.
Fixed in Revisionr61368, r61373
Attached Files


related to 0035632 closedMattias Gaertner Function result of TPascalParserTool.DoAtom is not set in all cases 


Serge Anvarov

2019-03-29 13:09

reporter   ~0115103

Confirm. (Window 7, x86_64). In version 2.0.0 happens, but it is difficult to reproduce.
Steps to reproduce the bug in version 2.1.0 (rev 60763):
1. Create a new project (application)
2. Double-click the form (to create the FormCreate method)
3. Above FormCreate write any function, for example:
function Test: string;
  Result := '';
4. Go back to the FormCreate method, write "Cap" and press Ctrl + space

If you add "uses" (example "uses Types;") to the beginning of the implementation section, the error disappears. But sometimes it does not help.

Maciej Izak

2019-04-03 22:12

developer   ~0115203

I was able to reproduce with IDE recompiled with "Normal IDE" profile. Almost is impossible to work with larger project ("end of source not found" occurs very often in different and hard to reproduce situations).

Probably important but maybe coincidence: I was also not able to reproduce problem with "Debug IDE" profile.

Maybe is something wrong with AVL tree? This make sense for me why restarting Lazarus is the solution... btw. Probably 0028439 is related.

Mattias Gaertner

2019-04-03 22:23

manager   ~0115204

What makes you think it has to with AVL tree?

When it the next time occurs, please test the following:
Add a space between unit keyword and unitname. Press Shift+Ctrl+Down. Undo the space. Then do again whatever you did.

Maciej Izak

2019-04-03 23:32

developer   ~0115208

Last edited: 2019-04-04 10:02

View 2 revisions

The non generic version of AVL tree was my initial base for implementation of rtl-generics versions of TAVLTree<T>/TAVLTreeMap<TKey,TValue> but deletion of nodes sometimes was proper and sometimes not (at some point tree was broken), so I dropped the initial implementation where my base was/is used in Lazarus AVL tree and I started my own from scratch.

I was trying to reproduce situation for bug report - without success, so I guess maybe my mistake, but may be worth to do some extensive test.

Maciej Izak

2019-04-04 09:12

developer   ~0115221

The delete operation from Lazarus/FPC non-generic AVL tree seems non standard and too much simplified:


especially I mean part for "if (ANode.Left <> nil) and (ANode.Right <> nil) then"

Also the delete operation from AVL tree is not often used in Lazarus but occurs in code tools which seems like good point to check. Anyway I don't have proof that something is wrong :\.


2019-04-29 22:37

reporter   ~0115904

are there any updates about that issue?
Regarding the message,45062.msg318964.html#msg318964 this topic is not that rare.
Best regards,


2019-06-15 02:20

reporter   ~0116728

This error often occurs to me.

In addition to this other: Ctrl Space jumping to other parts of the code.

They occur when there is no uses in implementation section.

The workaround is to create a empty class just to place a uses in implementation.

unit myunit;




uses <--- Without this uses then editor get lost

Jonas Maebe

2019-06-15 11:20

manager   ~0116732

This may have been caused by 0035632


2019-06-20 23:07

reporter   ~0116810

Seems to be fixed by the fix to 0035632.

Juha Manninen

2019-12-30 13:41

developer   ~0120148

Dejan Boras, can you also confirm this is fixed by the related issue?

Juha Manninen

2020-01-11 15:29

developer   ~0120332

Resolving ...

Issue History

Date Modified Username Field Change
2019-03-27 13:52 Dejan Boras New Issue
2019-03-27 15:08 Mattias Gaertner Assigned To => Mattias Gaertner
2019-03-27 15:08 Mattias Gaertner Status new => assigned
2019-03-29 13:09 Serge Anvarov Note Added: 0115103
2019-04-03 22:12 Maciej Izak Note Added: 0115203
2019-04-03 22:23 Mattias Gaertner Note Added: 0115204
2019-04-03 23:32 Maciej Izak Note Added: 0115208
2019-04-04 09:12 Maciej Izak Note Added: 0115221
2019-04-04 10:02 Maciej Izak Note Edited: 0115208 View Revisions
2019-04-29 22:37 antispam88 Note Added: 0115904
2019-06-15 02:20 Macfly Note Added: 0116728
2019-06-15 11:20 Jonas Maebe Note Added: 0116732
2019-06-20 23:07 Bloodbatgot Note Added: 0116810
2019-12-30 13:40 Juha Manninen Relationship added related to 0035632
2019-12-30 13:40 Juha Manninen Assigned To Mattias Gaertner => Juha Manninen
2019-12-30 13:41 Juha Manninen Status assigned => feedback
2019-12-30 13:41 Juha Manninen LazTarget => -
2019-12-30 13:41 Juha Manninen Note Added: 0120148
2020-01-11 15:29 Juha Manninen Status feedback => resolved
2020-01-11 15:29 Juha Manninen Resolution open => fixed
2020-01-11 15:29 Juha Manninen Fixed in Revision => r61368, r61373
2020-01-11 15:29 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-01-11 15:29 Juha Manninen Note Added: 0120332