Hi
All of a sudden, an ugly exception has begun to appear, when I close/free a TTabSheet containing a TFrame containing a TListView. It appears to be Font related as the fpdebugger takes me to: TFont.FreeReference; namely this piece of code:
procedure TResourceCacheItem.DecreaseRefCount;
procedure RaiseRefCountZero;
begin
RaiseGDBException('TResourceCacheItem.DecreaseRefCount=0 '+ClassName);
end;
begin
//debugln('TResourceCacheItem.DecreaseRefCount ',ClassName,' ',dbgs(Self),' ',dbgs(FReferenceCount));
if FReferenceCount = 0 then <--- I land here with the debugger ? ! ?
RaiseRefCountZero;
dec(FReferenceCount);
if FReferenceCount = 0 then
Cache.ItemUnused(Self);
//debugln('TResourceCacheItem.DecreaseRefCount END ');
end;
I have NO MonkeyBusiness going on, none whatsoever, just 3 event-handlers:
- OnDblClick
- OnKeyDown
- OnSelectItem
Would it perhaps be of any use, to disconnect them just before it all gets freed?!? (never had to do that before, but there's a first time for everything, I guess).
If I step it further in the debugger/cpuwindow everything around it seems to be nil...
For now I've wrapped the dang thing in exception handlers and the "DivisionByZero" exception from"RaiseGDBException" changes into an Access Violation when I can catch it.
It's safe to say, it annoys the h*** out of me :'(
I'd be much obliged for any help you can give me

Regards Benny