[Mono-dev] Debugging Embedded Mono in Python C extension

Cronan ivan.cronyn at gmail.com
Wed Jan 25 09:22:38 UTC 2017


Hi everyone, first post on the list

I've written a python extension in C that uses Embedded Mono calls to my C#
library.
I've got it working, but am having a problem with making SQL calls across my
network.

Running normally, I get the following exception when I try to connect to the
database:

System.ArgumentException: Value does not fall within the expected range.\r\n 
at System.Net.Sockets.Socket.SetSocketOption 
(System.Net.Sockets.SocketOptionLevel optionLevel,
System.Net.Sockets.SocketOptionName optionName, System.Int32 optionValue) 
[0x00061] in <5071a6e4a4564e19a2eda0f53e42f9bd>:0 \r\n  at
Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource,
System.Int32 port, System.Int32 packetSize, System.Int32 timeout,
Mono.Data.Tds.Protocol.TdsVersion tdsVersion)

What is strange, is that when I run this in gdb (attempting to get a handle
on what values are being passed, etc), everything works fine, and my
database call succeeds.

Does anyone have any ideas?

I'm running in Windows 7, using Python 2.7, and my C code is compiled using
Python distutils, compiling with the gcc from minGW.



--
View this message in context: http://mono.1490590.n4.nabble.com/Debugging-Embedded-Mono-in-Python-C-extension-tp4669812.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list