Memory mangement issue
I'm using FastReports VCL Embarcadero Edition in Delphi 11.3. I designed a report and this contains some bands tied to datasets, but the data sets are manually filled/managed as the data comes from some business object which is in memory.
I created a class which manages the creation of this type of report and the method called when the application wants to generate the report gets an IOrder interface reference passed. This contains some of the data to be printed on the report. I can check that the interface reference passed and assigned to a field of that class is not nil when I call this method.
In the report there is a OnGetValue event, which checks which component is requested by the report engine and returns the data for that one. Now when the OnGetValue event is called this interface reference is always nil, so I can't get at the data! The debugger shows nil for the reference and accessing it raisesn an AV.
I cannot see where it is freed and I even created a copy of that interface reference and passed that one to ensure that nobody frees the original behind the back of the report creation. With opy a deep copy is meant, not just assigning the interface reference to some other variable! But this didn't help either.
Any idea how to find out where the interface reference gets nilled?