fbpx

Update causes Dispose() error.

More
2 months 4 days ago #1 by Jelle
Update causes Dispose() error. was created by Jelle
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:
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:\XSharpProjects\IC2ExtLibForVO\IC2ExtLibForVO\WCFClientClassesViaVO.prg	27	

We get this error in the following class/method, on the line "VIRTUAL METHOD Dispose() AS VOID"
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?

Please Log in or Create an account to join the conversation.

More
2 months 4 days ago #2 by Robert van der Hulst
Replied by Robert van der Hulst on topic Update causes Dispose() error.
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
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

More
2 months 4 days ago #3 by Dick
Replied by Dick on topic Update causes Dispose() error.

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

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks ago #4 by Jelle
Replied by Jelle on topic Update causes Dispose() error.

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!

Please Log in or Create an account to join the conversation.