Re: PyGILState_Release called twice in embedded application

2023-03-23 Thread Arnaud Loonstra
On 23-03-2023 13:33, Barry Scott wrote: On 23 Mar 2023, at 08:46, Arnaud Loonstra wrote: Hi all, I'm running in a crash due to a ResourceWarning (some socket is not closed in a used module) after calling PyGILState_Release. I'm running Python in a native thread (so a thread cr

PyGILState_Release called twice in embedded application

2023-03-23 Thread Arnaud Loonstra
Hi all, I'm running in a crash due to a ResourceWarning (some socket is not closed in a used module) after calling PyGILState_Release. I'm running Python in a native thread (so a thread created by C not Python). I'm acquiring the GIL through PyGILState_Ensure before doing any CPYthon calls a

Re: Embedding Python crash on PyTuple_New

2021-11-24 Thread Arnaud Loonstra
On 24-11-2021 01:46, MRAB wrote: On 2021-11-23 20:25, Arnaud Loonstra wrote: On 23-11-2021 18:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 18:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got P

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running int

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 13:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here. I'm creating a Tuple in

Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here. I'm creating a Tuple in C but it crashes on creating it after a while. It doesn't make se

Re: return a ctypes object to C

2019-11-07 Thread Arnaud Loonstra
On 31-10-2019 15:39, Arnaud Loonstra wrote: On 31-10-2019 14:44, Thomas Jollans wrote: On 31/10/2019 14.13, Arnaud Loonstra wrote: On 30-10-2019 09:32, Arnaud Loonstra wrote: Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and

Re: return a ctypes object to C

2019-10-31 Thread Arnaud Loonstra
On 31-10-2019 14:44, Thomas Jollans wrote: On 31/10/2019 14.13, Arnaud Loonstra wrote: On 30-10-2019 09:32, Arnaud Loonstra wrote: Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and then return from python to C. So a python meth

Re: return a ctypes object to C

2019-10-31 Thread Arnaud Loonstra
On 30-10-2019 09:32, Arnaud Loonstra wrote: Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and then return from python to C. So a python method is called from C and needs to return an object which we then process in C again

return a ctypes object to C

2019-10-30 Thread Arnaud Loonstra
Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and then return from python to C. So a python method is called from C and needs to return an object which we then process in C again. I have a binding to access and create the C methods

Embedding Python (3.7) on OSX crash on Py_Initialize when run as bundle

2019-02-28 Thread Arnaud Loonstra
Hi, I'm trying to wrap my head around an OSX app which has python embedded. This works fine if I run the build on the same machine as it is build on. However when using Travis to build the app I can only get it to run from the terminal. A double click on the appdir (or using open) results in