IPersistStream problems in developing a Unit using C#

Post Reply
casterv
Posts: 3
Joined: 17 July 2016, 11:25

IPersistStream problems in developing a Unit using C#

Post 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.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: IPersistStream problems in developing a Unit using C#

Post 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?
casterv
Posts: 3
Joined: 17 July 2016, 11:25

Re: IPersistStream problems in developing a Unit using C#

Post 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.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: IPersistStream problems in developing a Unit using C#

Post by jasper »

Can you send me example code to test?
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: IPersistStream problems in developing a Unit using C#

Post 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.
casterv
Posts: 3
Joined: 17 July 2016, 11:25

Re: IPersistStream problems in developing a Unit using C#

Post by casterv »

Thanks a lot. I declare the interface, and the problem is solved.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: IPersistStream problems in developing a Unit using C#

Post by jasper »

I have logged the PIA defect - I will follow up once this has been resolved.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: IPersistStream problems in developing a Unit using C#

Post 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.
Post Reply

Return to “Unit Operations”