Stefan writes:
Quote
Hi all,
I have reported this to SOCK Software and got this answer:
"We have now reproduced it here, and a fix will be included in the
next update to CodeHealer, which we expect to be within the next few
weeks." /Stefan
Hi All,
We've just updated Stefan and the author of FastObj with the following,
it turned out NOT to be us, but actually an issue in FastObJ.
We've send a sample project demonstrating the problem to Andy and
Gabriel via email as we didn't want to go public until we knew for
sure, but I guess it is public now, so here it is!
Best regards,
SOCK Software support
---
We appear to have discovered a problem in FASTObj, so I thought that
you would like to know - from the source code you are obviously
expecting it to happen, but assuming the majority of cases are ok, so I
thought you would like a concrete example!
It showed up because of an assertion failure in our singleton object
handling, but only when running with DelphiSpeedUp, which obviously
uses FastObj.
We override the TObject.NewInstance method to ensure that the instance
is unique, but your replacement code for creating an object appears to
not correctly handle the creation of an object that has an override of
its NewInstance Class method, so it ends up calling the overridden
NewInstance method a second time, so that it 'looks' like the object
instance is created twice!
Our NewInstance method stores the class name in an array, which means
that it ends up getting added twice, and that then triggers our
assertion failure on exit because it is only freed once.
This is obviously reasonably obscure, but not that unusual!
We've put together a sample project that shows the problem (heavily
edited and simplified obviously) , and included it as an attachment for
you to work with, and we will obviously also be forwarding it to the
DelphiSpeedUp authors for their information and input, since they may
well see this from other people with IDE enhancements.
Please let me know what you find, or if you have any further questions,
we'd obviously like to come up with an acceptable workaround for all of
us as soon as we can.
All the best,
Jud (Cole)
SOCK Software
www.socksoftware.com