Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101468
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Strange crash while running a script with a embedded python interpreter |
| Date | 2016-01-11 19:09 +1100 |
| Message-ID | <mailman.6.1452499783.13488.python-list@python.org> (permalink) |
| References | <4ac97a67-2527-424e-90e2-b714528977c8@googlegroups.com> <mailman.80.1452292120.2305.python-list@python.org> <c0a4d342-f8b5-48a6-b260-89d0458137cd@googlegroups.com> |
On Mon, Jan 11, 2016 at 6:55 PM, Rickard Englund <gefle.rickard@gmail.com> wrote: > On Friday, January 8, 2016 at 11:28:53 PM UTC+1, Michael Torrie wrote: >> On 01/08/2016 09:18 AM, Rickard Englund wrote: >> > First, some system info >> > * Windows 7 (also tested on 8 and 10) >> > * Python 3.5.1 64bit (previously also tested using several 3.x versions) (also tested with 32 bit, but with 3.4.2) >> > * Microsoft Visual Studio 2015 (earlier version of python also tested with Visual Studio 2013) >> >> Are you using the same version of Visual Studio that Python itself was >> compiled with? If not there can be subtle problems with incompatible >> msvcrt dlls. No idea if this would be contributing to the problem or >> not, though. > > I've just downloaded the python source code and build it myself, the compiler settings in our project is the same as in the python projects. > > > Though, your comment led me in the correct direction. When using the libs/binary I built my self it let me see the values of the PyObjects around the crash and it seems like it is related to our modules and/or how we expose them to the interpreter. When disabling our own modules everything seems to be working as it should. > Interesting. So somewhere along the way, you have native code (C code?) that's creating a module, and that's where the trouble starts? I would first look at all your refcount management; if that goes wrong, all sorts of craziness could happen (if you still have a pointer to a block of memory that gets released and reused, hilarity will ensue - or, something will). Have you considered using Cython? That might let you do what you need without worrying about all those annoying internal API details. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Strange crash while running a script with a embedded python interpreter Rickard Englund <gefle.rickard@gmail.com> - 2016-01-08 08:18 -0800
Re: Strange crash while running a script with a embedded python interpreter Rickard Englund <gefle.rickard@gmail.com> - 2016-01-08 08:29 -0800
Re: Strange crash while running a script with a embedded python interpreter Michael Torrie <torriem@gmail.com> - 2016-01-08 15:28 -0700
Re: Strange crash while running a script with a embedded python interpreter Rickard Englund <gefle.rickard@gmail.com> - 2016-01-10 23:55 -0800
Re: Strange crash while running a script with a embedded python interpreter Chris Angelico <rosuav@gmail.com> - 2016-01-11 19:09 +1100
Confused by python-dbus weird behavior Travis Griggs <travisgriggs@gmail.com> - 2016-01-11 14:14 -0800
csiph-web