Update causes Dispose() error.

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Anonymous

Update causes Dispose() error.

Post 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?
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Update causes Dispose() error.

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1798
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Update causes Dispose() error.

Post 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
IC2Fox2

Update causes Dispose() error.

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