Forum > General

'fake' generation of function prototypes in IDE

(1/4) > >>

aducom:
I'm not sure if it's only me but on a regular basis in lazarus 32 as lazarus 64 as well the IDE generates function prototypes of some functions that already exists in my code. Perhaps I'm using some odd key combination that causes this as I work on a laptop and the touchpad sometimes fools me. But it could also be an issue that needs to be reported in the bugtracker. It's not a real big deal as te compiler ends in error and removing the function prototypes will solve the issue, but as it happens pretty often it is annoying. I had no such behaviour in 1.6, only in 1.8. Anybody experiencing the same problem or has a solution? If there are more I will post this to the bug tracker.

JuhaManninen:

--- Quote from: aducom on January 04, 2018, 11:43:54 am ---Anybody experiencing the same problem or has a solution?

--- End quote ---
Difficult to say without more information. Attach a minimal project to reproduce the problem.

Josh:
I too; have had this and still do; but mainly on large projects, it is frustrating and annoying.
I have not been able to pin point the cause; but is more prone when I have lots of nested {$ifdef}, that have the defines in the project options/custom defines section. If I add the defines as source code in the all units ir {$define xxx} then the errors are a lot less more unlikely to happen.

This started in 1.8 and is still in svn, as I have not been able to produce a sample project that exhibits the behaviour, unfortuanetly I cannot upload the projects that may exhibit this behavious for various reasons.

When it starts to happen, I find that doing a re-scan of sources will help for a while, but what does last much longer is exit lazarus; restart lazarus and rebuild lazarus. This seems to help but not eleminate it, as it will come back.
I have noticed that just prior to it doing this, I also get one or both of the following happening.
1)Clicking an existing  components event; produces an error along the longs of tform not found, and does not locate you the event code.
2)The autocomplete of code stops working. ie typing "form1." does not bring up a list of proc/funcs. record variables does not bring up popup of variables. ie "my3dobj." will not bring up variables of record like, x,y,z,s etc that are defined in its record.

It is worth noting that it does not matter if you compile you project during your lazarus session as it can happen before you have even compiled your project for the first time in the session.

Hopefully some of the observations I have found will be useful.

Thaddy:
I believe I answered that already last month: remove empty methods

JuhaManninen:

--- Quote from: josh on January 04, 2018, 04:08:55 pm ---When it starts to happen, I find that doing a re-scan of sources will help for a while, but what does last much longer is exit lazarus; restart lazarus and rebuild lazarus. This seems to help but not eleminate it, as it will come back.

--- End quote ---
That suggests some memory corruption or uninitialized variable issue. Strange. Anyway rebuilding Lazarus should not be needed, restarting it resets the situation.


--- Quote ---It is worth noting that it does not matter if you compile you project during your lazarus session as it can happen before you have even compiled your project for the first time in the session.

--- End quote ---
Naturally because Codetools and FPC are separate and independent.

Navigation

[0] Message Index

[#] Next page

Go to full version