xsharp.eu • Update causes Dispose() error.
Page 1 of 1

Update causes Dispose() error.

Posted: Wed Nov 14, 2018 11:42 am
by Anonymous
Hello,

We recently updated to the newest Xsharp (7), however a project that worked before, suddenly gives an error that I don't understand.

Here is the error:

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error	XS9067	Interface method System.IDisposable.Dispose() and implementation IC2ExtLibForVO.WCFService.Dispose(params Vulcan.__Usual[]) have different calling conventions.	IC2ExtLibForVO	C:XSharpProjectsIC2ExtLibForVOIC2ExtLibForVOWCFClientClassesViaVO.prg	27	
We get this error in the following class/method, on the line "VIRTUAL METHOD Dispose() AS VOID"

Code: Select all

CLASS WCFService IMPLEMENTS System.IDisposable

    PRIVATE servicechannel AS System.ServiceModel.ChannelFactory // was: USUAL
    PRIVATE address_http AS System.ServiceModel.EndpointAddress

    CONSTRUCTOR
	servicechannel := NULL
    RETURN 

    VIRTUAL METHOD IClientChannel
    RETURN TRUE
	
    VIRTUAL METHOD Dispose() AS VOID
            
    TRY
       
        SELF:Close_Channel()
    CATCH	exception1 AS System.ServiceModel.CommunicationException
		Console.WriteLine(exception1:Message)
    END TRY
What could be the cause of this and why would it pop up now and not with the older XSharp?

Update causes Dispose() error.

Posted: Wed Nov 14, 2018 3:32 pm
by robert
Dick ?
I think you have changed the compiler option (/vo5) that controls how methods without parameters are used (Implicit Clipper Calling convention)

Change:

VIRTUAL METHOD Dispose() AS VOID

to

VIRTUAL METHOD Dispose() AS VOID STRICT

and it should work

Robert

Update causes Dispose() error.

Posted: Wed Nov 14, 2018 4:18 pm
by ic2
robert wrote:Dick ?
Robert
Hello Robert,

No, it is Jelle.

I am currently not really following the X# developments I have to say, at least until Intelissense works as it does in C# (which is not great but acceptable). I fully understand that this has no priority but VO works still fine for me so I don't mind.

About the error: Jelle was a bit reluctant to update because he always came across something which stopped working after an update. Usually because the compiler is stricter (and better) but he doesn't like to need to solve that kind of issues. I am sure that he did not change any compiler options so if /the vo5 option is now switched off it must have been a side effect of installing the new version.

I recommended him to re-install an older version and check once again with the latest version if it's fixed or has another solution like this /vo5 parameter. Installing and de-installing goes fast. We'll hear it Monday.

Dick

Update causes Dispose() error.

Posted: Mon Nov 19, 2018 7:40 am
by IC2Fox2
Implicit Clipper Calling convention
Yes we indeed put this on true because last time we had some issues with it.

STRICT
Ah, thank you very much, the error indeed seems to be gone. Strange how it wasn't an issue before the update.

I am sure that he did not change any compiler options so if /the vo5 option is now switched off it must have been a side effect of installing the new version.
Maybe, I think this was always on True but when I had the error I didn't check. So maybe.

Anyways, thank you for the help! Now using Xsharp 7!