Ticket #166 (closed defect: fixed)

Opened 12 months ago

Last modified 12 months ago

COBIA fails to return the same object wrapper for the same object

Reported by: jasper Owned by: jasper
Priority: major Milestone: Maintenance of Phase II
Component: COMBIA Version:
Keywords: Cc:


If a COBIA object is asked to return an object, and it returns itself (or another already existing object) COBIA fails to recognize the object is the same, and creates a new COM object equivalent.

Change History

comment:1 Changed 12 months ago by jasper

An example scenario in which this happens is a unit operation that itself is also the port collection, and get_Ports returns the unit operation itself.

comment:2 Changed 12 months ago by jasper

  • Status changed from new to closed
  • Resolution set to fixed

comment:4 Changed 12 months ago by michelpons

I don't understand why COBIA is failing and creates a new COM object equivalent. Why isn't it a new COBIA object equivalent? Why does it happen only with COM?

comment:5 Changed 12 months ago by jasper

It should only create one COM object per COBIA object. Not sure what happens if this is not met - at the very least the unique dictionary entry gets overridden. I do not think the consequences are severe, but it was not designed like that.

The mistake is not present in the opposite direction (COM to COBIA marshaling).

comment:6 Changed 12 months ago by michelpons

I am a bit lost lost. Is it COMBIA that does not create a single COM object per COBIA object because COMBIA fails to recognize the COBIA object is the same and goes on with creating another COM Object? Why do you refer to marshaling? I need to have this right for the release notes of

I assume this fix better be applied to existing COBIA-based PMCs by applying

comment:7 Changed 12 months ago by jasper

COMBIA provides COBIA-COM interop through a form of marshaling as the memory spaces need to be tranformed to each other. This is in-thread and as it happens also using the same memory (allocated VARIANT space is wrapped as ICapeArray....).

Indeed the issue is fixed.

Release notes could read: under some circumstances, for example when an object is requested for another object and returns a reference to itself, such as a unit operation that also implements a port collection in the same object, COMBIA created a second COM wrapper around the same COBIA object. The issue is resolved.

Note: See TracTickets for help on using tickets.