Recent

Author Topic: FPC 3.2.2: Is TFPGInterfacedObjectList working correctly?  (Read 1072 times)

antispam88

  • Jr. Member
  • **
  • Posts: 60
FPC 3.2.2: Is TFPGInterfacedObjectList working correctly?
« on: July 19, 2022, 06:12:10 am »
Hi,

we want to upgrade our application working with fpc 3.0.4/lazarus 2.0.8 to the latest version 3.2.2/2.2.2.
In our app we are using interfaces (IUnknown) managed by TFPGList/TFPGMap. It worked as expected and we never had any problems regarding memory leaks.

But with fpc 3.2.2 our application is crashing regarding the TFPGMap. In the topic https://forum.lazarus.freepascal.org/index.php/topic,54089.0.html I have already got the hint to use TFPGMapInterfacedObjectData. But exchanging TFPGMapwith TFPGMapInterfacedObjectDatacauses an access violation.

I have created a test app with TFPInterfacedObjectList which throws also the access violation (fgl.pp 1197; TFPGInterfacedObjectList.Deref). Furthermore I have tested the code also with 3.0.4/2.0.8 getting the same access violation.

Is our use case not supported or is this an error in TFPGInterfacedObjectList/TFPGMapInterfacedObjectData?
Has anyone a solution for our problem?


Best regards
antispam88

antispam88

  • Jr. Member
  • **
  • Posts: 60
Re: FPC 3.2.2: Is TFPGInterfacedObjectList working correctly?
« Reply #1 on: July 26, 2022, 11:58:25 am »
No comment at all?

PascalDragon

  • Hero Member
  • *****
  • Posts: 6396
  • Compiler Developer
Re: FPC 3.2.2: Is TFPGInterfacedObjectList working correctly?
« Reply #2 on: July 26, 2022, 09:20:15 pm »
I have created a test app with TFPInterfacedObjectList which throws also the access violation (fgl.pp 1197; TFPGInterfacedObjectList.Deref). Furthermore I have tested the code also with 3.0.4/2.0.8 getting the same access violation.

Is our use case not supported or is this an error in TFPGInterfacedObjectList/TFPGMapInterfacedObjectData?

Please report a bug with an example that does not depend on the LCL.

 

TinyPortal © 2005-2018