Author Topic: IDE borked after onclick edit  (Read 386 times)


  • Full Member
  • ***
  • Posts: 215
IDE borked after onclick edit
« on: October 30, 2022, 11:46:48 am »

I have a project with one main form and another unit.

I needed to change the onclick method of an object on the main form. I clicked on the onclick entry in the property editor and this highlighted the currently define responce method ( which was the onclick of a menu item , I wanted to separate this ).

I pressed Backspace key expecting to delete what was there. ( The correct thing would be select none, but you'd think when something is selected the delete key may do something ).  When this did not have the expected result, I think that I clicked Backspace a second time.

I don't know where these keystroked were sent but now the IDE is borked.

It seems the second one was sent to source code window and removed the n in unit of the first line. As well as I recall I pressed F9 and the error picked up. I realised there was an edit problem and corrected "unit".

The code still builds and runs as it is BUT...

If I click on the property editor to create the new onclick even , I see the drop down list is empty !  There are about 2 dozen events in this file for this form .

I doubleclick to create a new method and it fails and refers me to the message window.

It tells me it can't find ExtCtrls !  That's BS since the program still builds from run build  and still runs from F9.
On the console I see the same error msg plus a similar one about LResources.
Code: Pascal  [Select][+][-]
  1. ApplyFPCSrcFiles /svn/FPCSource/ FileCount=17882
  2. ApplyFPCSrcFiles SrcCache.Update ...
  3. ApplyFPCSrcFiles BuildBoss.RescanCompilerDefines ...
  4. ### TCodeToolManager.HandleException: [20170421200312] "unit not found: LResources" at Line=13 Col=3 in "~/laz/hill_main.pas"
  5. ### TCodeToolManager.HandleException: [20170421200056] "unit not found: ExtCtrls" Col=3 in "~/laz/hill_main.pas"

More troubling is that I cannot select any other form object in the IDE.  The selection frame with the dots remains on the Panel object in question.

If I doubleclick on other objects, it jumps to their onclick. I can select other object in the property editor but the IDE highlight remains on the broken panel in form view window. 

I've tried restarting Lazarus and it comes back in the same state.

This has screwed the project . Not good.

I have no idea where that key stroke was sent but it seems to have destroyed some internal object of that Tpanel and rendered it uneditable.

Not good.

Lazarus 2.3.0 (rev main-2_3-2165-gc63984efd6) FPC 3.3.1 x86_64-linux-gtk2


  • Full Member
  • ***
  • Posts: 179
Re: IDE borked after onclick edit
« Reply #1 on: October 30, 2022, 01:04:10 pm »
have you installed your own (or other untested) package recently? Some symptomps you described may point that IDE is not stable. Anyway, if so - uninstall that package or reinstall  Lazarus.
IDE should be ready to prepare "Hello world" application in GUI version before a serious ussage.

Platforms: Win7/64, Linux Mint Ulyssa/64


  • Administrator
  • Hero Member
  • *
  • Posts: 8754
  • Debugger - SynEdit - and more
    • wiki
Re: IDE borked after onclick edit
« Reply #2 on: October 30, 2022, 01:23:41 pm »
No idea....

But anyway a few generic tips.

Check for ppu (and o) files in your project dir.
The only ones you should have are for your own units. (e.g. hill_main.ppu and hill_main.o)

Menu: Tools > Options
Page: Environment > Files
Check that the "Lazarus directory" point to your installation dir (especially if that changed at some point)

Open the package LCL.
Menu: Packages > Open Package File (lpk)
Then navigate to your installation folder, and open it.

For the files ExtCtrls.pas ExtCtrls.ppu ExtCtrls.o, make sure there is
- Only/Exactly one of each in your Lazarus install directory
- Maximum one (but maybe none) in your /home/username/.lazarus

About (2)
The IDE caches (in its config folder:  ~/.lazarus ) the location of lpk files. If you installed a new Lazarus to a new folder, then that may have the old path (normally it will update, but...)


  • Full Member
  • ***
  • Posts: 215
Re: IDE borked after onclick edit
« Reply #3 on: October 30, 2022, 02:42:12 pm »
Thanks Martin but the errors are entirely spurious since I can : Run |build  and Run|run

It is the IDE with its knickers in a twist.

This was directly after I backspaced with the onclick method selected in property editor.

I did finally clear the problem though not exactly how ( much flipping to other projects which also had the same problem initially. ).

I just reported this so that it is known.


TinyPortal © 2005-2018