[fpc-pascal] Problem with interfaces
Joao Morais
post at joaomorais.com.br
Wed Aug 22 02:05:42 CEST 2007
Micha Nelissen wrote:
> Joao Morais wrote:
>> The first call that I make to DefaultObj from *another* unit recreate
>> the object, because, I don't know why, the _holder var points again to nil.
>
> Try to use a data watchpoint to watch when the variable is being
> changed. Hopefully that will point to the root cause.
Thanks for the advice.
Have tried 'watch _MVPFACTORY', gdb confirmed a hardware watchpoint, it
complains a little (Hardware watchpoint 1: _MVPFACTORY -- 20 times) when
I run the application but don't stop. Did I miss something?
> Did you also try
> printing the address of the variable (I assume global variables aren't
> moving, but who knows?)
Always the same address.
Well, what I have observed so far: this issue happens when the variable
points to an interface, changing to an object pointer the problem
disapear. Moreover the _release method of the interface isn't called so
it sounds rather impossible that my code is changing the value of the
variable. Compiling and launching the code with D5 the problem disapear.
I simply don't know how to register the issue since I can't create a
small sample that reproduce it, but I can send about 1 mb of sources to
a volunteer though.
Thanks for your help.
--
Joao Morais
More information about the fpc-pascal
mailing list