From helink at sandia.gov Mon Jan 25 23:20:28 2010 From: helink at sandia.gov (Hamilton Link) Date: Mon, 25 Jan 2010 15:20:28 -0700 Subject: [Python.NET] several questions: Q1 is it ok if I fold in several changes Message-ID: <4B5E192C.3090805@sandia.gov> As soon as I can figure out how to use svn and https from work (or as soon as I give up and do the following from home) my hope is to... - download the latest and greatest, which I suspect is not a lot different than 2.0 alpha2 - fold in Feihon Hsu's patch that fixes 2.0 alpha2 for .net 2.0 SP1 - fold in the "Python26 -> PYTHON26" fix mentioned a bit ago - run a test or two, commit the changes, and make a 2.0 alpha3 that includes setup.py, if I can figure out how to post such a file on sourceforge (I appear to still be a developer; thanks Would anyone have a problem with that? If people point me to any other fixes I'll include those too, please don't spam the list with redundant information on bug fixes, though, spam me out of band. h From helink at sandia.gov Tue Jan 26 00:39:48 2010 From: helink at sandia.gov (Hamilton Link) Date: Mon, 25 Jan 2010 16:39:48 -0700 Subject: [Python.NET] Q2: py.net problems w/python 2.6.2 Message-ID: <4B5E2BC4.8090801@sandia.gov> Could anyone conveniently try python.net with python 2.6.2? I am seeing two fatal problems in my lightly-patched python.net. I'm using ubuntu 9.04 python 2.6.2 python.net 2.0 alpha2 with Borzenkov's suggested PYTHON25 -> PYTHON26 changes and Feihong Hsu's changes mono 2.0.1 (this is the what mono --version says, which I think is packaged as distribution 1.9.something?) For all of this I'm using the python.exe that gets built alongside python.net, because ubuntu's python environments are irritatingly built with --disable-shared Here are the problems: If I try the following: >>> import clr >>> import System >>> STR = System.String('hithere') I get a fatal error "GCHandle value belongs to a different domain"... this is being thrown by the coercion of an IntPtr to a GCHandle, from within the coercion operation in ManagedType.GetManagedObject. If however I try the following: >>> import clr >>> from System.Drawing import Point >>> p = Point(5,5) then I can >>> p.X 5 >>> p.Y 5 >>> p.ToString() u'{X=5,Y=5}' >>> dir(p) ['Add', 'Ceiling', ..., '__class__', ...] No problem, right? Wrong: >>> p.__class__ dies in the most awful way, dumping all thread stacks and killing mono and python. I get a message saying "Got a SIGSEGV while executing native code. etc." If anyone has any clues about this, I'd love to hear them. My current plan is to install python 2.5.x as an alternate python, rebuild against that, and see if that works, and then perhaps dig into this further. I might also try 2.6.4 since someone on the list recently asserted they had it working with that. thanks, hamilton From mtigges at gmail.com Tue Jan 26 01:06:06 2010 From: mtigges at gmail.com (Mark Tigges) Date: Mon, 25 Jan 2010 16:06:06 -0800 Subject: [Python.NET] Q2: py.net problems w/python 2.6.2 In-Reply-To: <4B5E2BC4.8090801@sandia.gov> References: <4B5E2BC4.8090801@sandia.gov> Message-ID: I might be able to find time to test on windows tomorrow. Remind me if you haven't heard. On Mon, Jan 25, 2010 at 3:39 PM, Hamilton Link wrote: > Could anyone conveniently try python.net with python 2.6.2? ?I am seeing two > fatal problems in my lightly-patched python.net. > > I'm using ubuntu 9.04 > python 2.6.2 > python.net 2.0 alpha2 with Borzenkov's suggested PYTHON25 -> PYTHON26 > changes and Feihong Hsu's changes > mono 2.0.1 (this is the what mono --version says, which I think is packaged > as distribution 1.9.something?) > > For all of this I'm using the python.exe that gets built alongside > python.net, because ubuntu's python environments are irritatingly built with > --disable-shared > > Here are the problems: > > If I try the following: >>>> import clr >>>> import System >>>> STR = System.String('hithere') > > I get a fatal error "GCHandle value belongs to a different domain"... this > is being thrown by the coercion of an IntPtr to a GCHandle, from within the > coercion operation in ManagedType.GetManagedObject. > > If however I try the following: >>>> import clr >>>> from System.Drawing import Point >>>> p = Point(5,5) > > then I can >>>> p.X > 5 >>>> p.Y > 5 >>>> p.ToString() > u'{X=5,Y=5}' >>>> dir(p) > ['Add', 'Ceiling', ..., '__class__', ...] > > No problem, right? Wrong: >>>> p.__class__ > dies in the most awful way, dumping all thread stacks and killing mono and > python. ?I get a message saying "Got a SIGSEGV while executing native code. > ?etc." > > If anyone has any clues about this, I'd love to hear them. ?My current plan > is to install python 2.5.x as an alternate python, rebuild against that, and > see if that works, and then perhaps dig into this further. ?I might also try > 2.6.4 since someone on the list recently asserted they had it working with > that. > > thanks, > hamilton > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet > From nico_ml at mgdesign.fr Thu Jan 28 10:49:33 2010 From: nico_ml at mgdesign.fr (Nicolas Lelong) Date: Thu, 28 Jan 2010 10:49:33 +0100 Subject: [Python.NET] Q2: py.net problems w/python 2.6.2 In-Reply-To: <4B5E2BC4.8090801@sandia.gov> References: <4B5E2BC4.8090801@sandia.gov> Message-ID: <4B615DAD.4040802@mgdesign.fr> Le 26/01/2010 00:39, Hamilton Link a ?crit : > Could anyone conveniently try python.net with python 2.6.2? I am > seeing two fatal problems in my lightly-patched python.net. I'm currently running Python.NET in Python 2.6.2 on Windows for a few weeks. I tried your sample code, and everything works fine. I'm not using Mono though, but regular Microsoft .NET. I had a few issues at the beginning, as my (patched) version of Python.NET was not up to date with the Python.NET trunk. My vendor branch tells me I updated from Python.NET rev.98 to rev.101 and my problems went away (for now). HTH, Nicolas.