[Lazarus] RE : RE : RE : RE : RE : RE : RE : RE : Console AppDevelopment
Ludo Brands
ludo.brands at free.fr
Mon Aug 15 18:40:14 CEST 2011
> >
> > BuildTree is a complex piece of code and I'll need a good night of
> > rest before attacking this. BeginParsing(Range); increments the
> > refcount but that is as far as I got. Perhaps the author of
> the code
> > could shed some light?
> >
>
>
> I think I managed to trap that one.
>
> for the FIRST codebuffer opened, I got the following inc-ref.
> I have not
> checked dec ref.
>
>
> check the attached file, unrar, and import in debug history.
>
> unfortunately clicking stack frames will not jump. due to
> absolute path
> used. ( on my todo)
>
> requires laz trunk)
>
>
> the 2nd watch shows the ref count value. not sure if that is
> before or
> after change....
>
>
>
That'll be after the change. When I traced upto beginparsing, refcount is 1
(loaded the source form file).
This seems to match my findings. The 4th break where the refcount is
dropping to 1 is unfortunately an incomplete stack trace. Are these all
breakpoints you encountered for loading a single file? Ie. This is the end
of DOOPENEDITORFILE.
Since you have more success with watchpoints than I have (I just checked: my
gdb version is 7.1 on windows and linux), would you mind tracing into
DoOpenUnknownFile. This is used when opening a unit for the first time. That
is where I got the refcount=2. DoOpenEditorFile is used for files that where
already opened before.
Thanks, Ludo
More information about the Lazarus
mailing list