I got annoing "End of source not found" when use autocompletion (Ctrl-Space) on random places of code. After adding/removing empty line in such place, autocompletion works, but over some time error repeats again. What's wrong? It's Codetools bug or some incorrect options setting? I not sure, but maybe that's begins after installing LAMW and laz4android modules from fpcupdeluxe.
Mailing lists / lazarus / 2018-05
"End of source not found" error in Trunk.
11 messages · 4 people · –
- SSergey Bodrov 5
- MMattias Gaertner 3
- OOndrej Pokorny 2
- LLazUser 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Show quoted text 6 lines
Can you reproduce it?
Mattias
Can you reproduce it?
Sure. Windows 10 (x64) under VirtualBox 5.2.6
1. download and run "fpcupdeluxe"
2. install FPC+Lazarus trunk
3. install arm-android crosscompiler
4. start Lazarus, open random project, test autocompletion (Ctrl-Space), it works.
5. run "fpcupdeluxe", install LAMW module
6. start Lazarus, open random project, test autocompletion (Ctrl-Space), it fail with message:
-----------------------------------
Codetools, Errors: 1
mainform.pas(86,4) Error: End of source not found. -----------------------------------
JDK, SDK, NDK, and other Android stuff was not installed, paths not set. But same error present when all paths properly set and project succesfully compiles and run on Android device.
Show quoted text 12 lines
In any unit?
Even in classes.pp?
Mattias
In any unit? Even in classes.pp?
No, I can't reproduce it inside classes.pp. But it occurs inside one of components code.
Show quoted text 7 lines
Please be more specific.
Mattias
Show quoted text 8 lines
I installed module "synapse" from fpcupdeluxe, then open my project, that uses "blcksock" unit. Then I open blcksock.pas in editor, go to TUDPBlockSocket.SetMulticastTTL() implementation (line 3730), type "synsock." and press Ctrl-Space for autocompletion. Error occur at line 3720, at last line of previous method implementation.
On Tue, 22 May 2018 16:57:19 +0300 Can you reproduce it? Mattias
Mattias Gaertner wrote 10 lines
I get this error massively as well after I updated trunk. Closing/reopening the file helps for some time but then the error is back again.
I don't remember it happened before.
Ondrej
Here the screenshot.
Ondrej
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CodeTools-EndOfSourceNotFound.png
Type: image/png
Size: 11782 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180524/bc34c533/attachment-0001.png>
On Tue, 22 May 2018 16:57:19 +0300 Can you reproduce it? Mattias
Can you reproduce it?
Upd: after some identifier edited (added-removed single character) pressing Ctrl-Space cause different line number in error message. On repeat, that number is decreased (points to other code block), and after some attempts error not occured. But on next try, error appear again with big line number.
Finally found a work-around for this obnoxious bug. This code-completion bug has appeared in every source file that DID NOT HAVE a "uses" clause in the implementation section. To stop the "end of source not found" simply place a uses clause in the implementation section of the source file and move one of your units in the interface section (that isn't needed in the interface) down to the uses clause in the implementation section. This has worked every time I've encountered this issue. Where is doesn't work however, is in the project source file...probably since it doesn't have an implementation section. Hopefully, this works for the rest of you...and will help others locate and fix the issue...
