Page 1 of 1

IPersistStream problems in developing a Unit using C#

PostPosted: 05 September 2016, 08:24
by casterv
I'm developing a unit operation using C# and .Net 4.5.

IPersistSream has been implemented, and in GetSizeMax, I write pcbSize=0L; Both Save and Load is empty.

When I click save in COFE, debugger step into GetSizeMax, normally return , and then COFE crashed, did not enter Save.
No error message or rising any exception, just crashed and ask me to debug or close.

I have tried Aspen Plus and facing the same situation.

Anyone knows why? Thanks a lot.

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 05 September 2016, 09:06
by jasper
Do you see the same if you return a non-zero number, e.g. 1?

If not, can you make an example available for me to test against?

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 05 September 2016, 09:21
by casterv
jasper wrote:Do you see the same if you return a non-zero number, e.g. 1?

If not, can you make an example available for me to test against?


Yes, return 1 and still the same.

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 05 September 2016, 09:43
by jasper
Can you send me example code to test?

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 06 September 2016, 08:24
by jasper
Looks like there is a problem with the IPersistStream definition in the CAPE-OPEN PIA; I suspect the VTABLE order is incorrect in that definition. The problem has been submitted to the M&T SIG for further investigation.

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 06 September 2016, 10:02
by casterv
Thanks a lot. I declare the interface, and the problem is solved.

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 06 September 2016, 11:40
by jasper
I have logged the PIA defect - I will follow up once this has been resolved.

Re: IPersistStream problems in developing a Unit using C#

PostPosted: 31 July 2018, 16:40
by jasper
Sorry for not getting back to this - the issue was repaired in version 2.1.0.0 of the PIA, which was made available Sept 2016.