Scriptiz
Sorceror
When I'm debugging the server side of RunUO, each time a Gump is opened I get this exception wich stop the code and need to manually clic on continue executing button.
This exception is throwed because the method signature of compress2 as a variable number of parameters. To avoid this exception and continue to debug the server side-code, you just have to made a few fixes :
Change all line theses lines in Network/Comression.cs :
By this :
And theses :
By this :
That's 8 small lines to change from line 218 to 262.
That's is just saying that the method have a variable number of parameters and that it is normal.
Maybe there is a way to change debugging option to avoid this warning while executing the server, but I found that a proper way to fix this and avoiding others to have this problem while debugging server side code.
Thanks
PS : tested and approved
Code:
PInvokeStackImbalance was detected Message: A call to PInvoke function 'Server!Server.Network.Compressor32::compress2'
has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature.
Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
This exception is throwed because the method signature of compress2 as a variable number of parameters. To avoid this exception and continue to debug the server side-code, you just have to made a few fixes :
Change all line theses lines in Network/Comression.cs :
Code:
[DllImport( "zlib32" )]
Code:
[DllImport("zlib32", CallingConvention = CallingConvention.Cdecl)]
And theses :
Code:
[DllImport( "zlib64" )]
Code:
[DllImport("zlib64", CallingConvention = CallingConvention.Cdecl)]
That's 8 small lines to change from line 218 to 262.
That's is just saying that the method have a variable number of parameters and that it is normal.
Maybe there is a way to change debugging option to avoid this warning while executing the server, but I found that a proper way to fix this and avoiding others to have this problem while debugging server side code.
Thanks
PS : tested and approved