Forum > General

"Demo" project size for possible bug(s)

<< < (2/5) > >>

TRon:

--- Quote from: 440bx on May 18, 2024, 05:34:19 pm ---Yes, the headers are only for Windows but, there are more headers than there would normally be because I use my own Windows headers. I don't use the windows, messages, etc units, I use my own and I had to include those that were necessary to compile the project. That's 139K uncompressed and maybe 10K compressed (all text with lots of whitespace, 7zip squeezes that stuff really well.)  That's nothing compared to the full size of all the headers, about 17MB, it takes time to extract from there to create a small custom version just for that test program (that's not a problem, it's already done because I intended to share the final result anyway.)  In that project, what takes a fair amount of space is the dll, its 224K compressed, a little over 1MB uncompressed.

--- End quote ---
Ah, thanks for clarifying 440bx.

That is unfortunate because that leaves out a simple test to check if the issues you face are perhaps platform related. E.g. As long as the project (the library in this case) is well maintained it should not have to be a problem to build the library for a given/supported platform.

440bx:

--- Quote from: Martin_fr on May 18, 2024, 05:39:19 pm ---First of all, it would be good to know where about in the IDE the deficiencies are.

--- End quote ---
The two main problems I've been experiencing very often are:

1. attempting to jump to a function declaration jumps to a place that is not remotely related to the function it was supposed to jump to.  (I've tried replicating the problem in a smaller program but, the problem usually goes away.)

2. similar to the above and possibly related, when hovering over a constant identifier, e.g, const SOMECONSTANT = 'constanttext', sometimes there is no popup window at all, sometimes there is a popup window but it is grey (in spite of the TP design package being installed) and sometimes it is yellow as expected.  The behavior depends on the identifier hovered onto and I have not been able to discern a pattern that causes a specific behavior.  Of course, if there is no popup then attempting to jump to the constant definition is futile.    I've also tried, unsuccessfully, to replicate this problem in a smaller program.

One thing I've noticed is that, for what it cannot locate correctly, it seems to always jump to the same place (totally unrelated to where it should have jumped.)

Now that I'm typing this stuff, I'm thinking that maybe what I should do is finish the project.  Once it's done, rewrite it a little bit at a time testing every behavior I've noticed in the development of the original and post those smaller "snapshots" that exhibit the problems I came across while coding the finished version.  The real problem right now is that I'm coding and coding and by the time I notice a problem in Lazarus, I have no idea of which one of the many changes/additions I made may have triggered it.  Rewritting from scratch focusing on the appearance of those problems would likely yield useful information.

Just FYI, I normally have very few to no dependencies.  The only dependency I can think of is that TP design package that gives the nice yellow hints.  Other than that, everything I use is out of the box and my own code (which I would supply of course.)

The problem with what I've got at this time is that it's about 6K lines of code (that's the actual program), 25,500 total source lines (reported by FPC.)   Depending on the nature of the bug, that many lines of code may be a real hindrance.

440bx:

--- Quote from: TRon on May 18, 2024, 05:46:14 pm ---Ah, thanks for clarifying 440bx.

--- End quote ---
You're welcome.  I understand that, the project being Windows-specific leaves out the possibility of finding out if the problems are platform specific or not.

Josh:
Have you tried rescanning the  sources, i had a similar issue where jump to dfinition, jump to proc went 'off its head', and this seemed to fix it.

Martin_fr:

--- Quote from: 440bx on May 18, 2024, 06:12:32 pm ---
1. attempting to jump to a function declaration jumps to a place that is not remotely related to the function it was supposed to jump to.  (I've tried replicating the problem in a smaller program but, the problem usually goes away.)

2. similar to the above and possibly related, when hovering over a constant identifier, e.g, const SOMECONSTANT = 'constanttext', sometimes there is no popup window at all, sometimes there is a popup window but it is grey (in spite of the TP design package being installed) and sometimes it is yellow as expected.  The behavior depends on the identifier hovered onto and I have not been able to discern a pattern that causes a specific behavior.  Of course, if there is no popup then attempting to jump to the constant definition is futile.    I've also tried, unsuccessfully, to replicate this problem in a smaller program.

--- End quote ---

Those may be the same thing... or not.

The big question is, can it be reproduced, with a freshly started IDE? I.e, is it always reproducible?

Also, when it happens, check the "messages window" => is there a message from codetools, claiming there is an error in the source ? (even if the source is fine).

If codetool believes there is an error in that source, then it may jump there (there is a setting to turn that off, but then it will just print the error and do nothing else).
And if codetool believes there is an error, it may not be able to provide the hint either.


If that is the case, the workaround (without restarting the IDE) is:

Edit the code one or two lines above the claimed error, and introduce a real error there. Attempt to "Jump to declaration" from the word after the edit you done. (will fail). Undo the edit, and do the "jump to declaration" from the word after the edit again.
After that codetool should be fine again.

Background: Something goes wrong with a cache in codetool. Editing the code in the described way clears that cache.

If that is the issue that you have
- It is really old, and so far evaded any attempt of locating it.
- If you have a case that can always reproduce it => great. (include your IDE config, just in case).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version