Segfault importing vtk on master

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Segfault importing vtk on master

Prabhu Ramachandran-3

Hi all,

With VTK 8.2.x (master), I run into a segfault when I "import vtk" on Python 3.7 (I doubt it is specific to a particular Python version).  By simply commenting out

from .vtkPythonInterpreter import *

in the all.py module, the segfault is fixed.  I am not sure why this module should be put into all.py? If someone desires it they can manually import it.  Or is there something I am missing?

Thanks!

cheers,

Prabhu


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Segfault importing vtk on master

Utkarsh Ayachit
It's getting added to all.py through the CMake code that simply adds
all wrapped modules to it. I can't think of reason why the
vtkPythonInterpreter module should be Python wrapped at all, however.
Can you try the attached patch, please? Does it work?

Thanks
Utkarsh
On Sun, Nov 25, 2018 at 8:30 PM Prabhu Ramachandran
<[hidden email]> wrote:

>
> Hi all,
>
> With VTK 8.2.x (master), I run into a segfault when I "import vtk" on Python 3.7 (I doubt it is specific to a particular Python version).  By simply commenting out
>
> from .vtkPythonInterpreter import *
>
> in the all.py module, the segfault is fixed.  I am not sure why this module should be put into all.py? If someone desires it they can manually import it.  Or is there something I am missing?
>
> Thanks!
>
> cheers,
>
> Prabhu
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtk-developers
>

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers


dont-wrap-pythoninterpreter.patch (508 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Segfault importing vtk on master

Prabhu Ramachandran-3
Hi Utkarsh,

Yes, I can confirm that this fixes the issue.  Can you please merge this to master and the 8.2.0 release?  Thanks!

Regards,
Prabhu

On 11/26/18 9:42 AM, Utkarsh Ayachit wrote:
It's getting added to all.py through the CMake code that simply adds
all wrapped modules to it. I can't think of reason why the
vtkPythonInterpreter module should be Python wrapped at all, however.
Can you try the attached patch, please? Does it work?

Thanks
Utkarsh
On Sun, Nov 25, 2018 at 8:30 PM Prabhu Ramachandran
[hidden email] wrote:
Hi all,

With VTK 8.2.x (master), I run into a segfault when I "import vtk" on Python 3.7 (I doubt it is specific to a particular Python version).  By simply commenting out

from .vtkPythonInterpreter import *

in the all.py module, the segfault is fixed.  I am not sure why this module should be put into all.py? If someone desires it they can manually import it.  Or is there something I am missing?

Thanks!

cheers,

Prabhu

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Segfault importing vtk on master

David Gobbi
EXCLUDE_FROM_WRAPPING might be better than EXCLUDE_FROM_PYTHON_WRAPPING, for consistency with the rest of the Utilities modules.

On Mon, Nov 26, 2018 at 11:56 AM Prabhu Ramachandran <[hidden email]> wrote:
Hi Utkarsh,

Yes, I can confirm that this fixes the issue.  Can you please merge this to master and the 8.2.0 release?  Thanks!

Regards,
Prabhu

On 11/26/18 9:42 AM, Utkarsh Ayachit wrote:
It's getting added to all.py through the CMake code that simply adds
all wrapped modules to it. I can't think of reason why the
vtkPythonInterpreter module should be Python wrapped at all, however.
Can you try the attached patch, please? Does it work?

Thanks
Utkarsh
On Sun, Nov 25, 2018 at 8:30 PM Prabhu Ramachandran
[hidden email] wrote:
Hi all,

With VTK 8.2.x (master), I run into a segfault when I "import vtk" on Python 3.7 (I doubt it is specific to a particular Python version).  By simply commenting out

from .vtkPythonInterpreter import *

in the all.py module, the segfault is fixed.  I am not sure why this module should be put into all.py? If someone desires it they can manually import it.  Or is there something I am missing?

Thanks!

cheers,

Prabhu

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Segfault importing vtk on master

Utkarsh Ayachit
Here's the MR: https://gitlab.kitware.com/vtk/vtk/merge_requests/4920
On Mon, Nov 26, 2018 at 2:14 PM David Gobbi <[hidden email]> wrote:

>
> EXCLUDE_FROM_WRAPPING might be better than EXCLUDE_FROM_PYTHON_WRAPPING, for consistency with the rest of the Utilities modules.
>
> On Mon, Nov 26, 2018 at 11:56 AM Prabhu Ramachandran <[hidden email]> wrote:
>>
>> Hi Utkarsh,
>>
>> Yes, I can confirm that this fixes the issue.  Can you please merge this to master and the 8.2.0 release?  Thanks!
>>
>> Regards,
>> Prabhu
>>
>> On 11/26/18 9:42 AM, Utkarsh Ayachit wrote:
>>
>> It's getting added to all.py through the CMake code that simply adds
>> all wrapped modules to it. I can't think of reason why the
>> vtkPythonInterpreter module should be Python wrapped at all, however.
>> Can you try the attached patch, please? Does it work?
>>
>> Thanks
>> Utkarsh
>> On Sun, Nov 25, 2018 at 8:30 PM Prabhu Ramachandran
>> <[hidden email]> wrote:
>>
>> Hi all,
>>
>> With VTK 8.2.x (master), I run into a segfault when I "import vtk" on Python 3.7 (I doubt it is specific to a particular Python version).  By simply commenting out
>>
>> from .vtkPythonInterpreter import *
>>
>> in the all.py module, the segfault is fixed.  I am not sure why this module should be put into all.py? If someone desires it they can manually import it.  Or is there something I am missing?
>>
>> Thanks!
>>
>> cheers,
>>
>> Prabhu
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Segfault importing vtk on master

Utkarsh Ayachit
This fix is now merged in master and the release branch.

Utkarsh
On Mon, Nov 26, 2018 at 3:45 PM Utkarsh Ayachit
<[hidden email]> wrote:

>
> Here's the MR: https://gitlab.kitware.com/vtk/vtk/merge_requests/4920
> On Mon, Nov 26, 2018 at 2:14 PM David Gobbi <[hidden email]> wrote:
> >
> > EXCLUDE_FROM_WRAPPING might be better than EXCLUDE_FROM_PYTHON_WRAPPING, for consistency with the rest of the Utilities modules.
> >
> > On Mon, Nov 26, 2018 at 11:56 AM Prabhu Ramachandran <[hidden email]> wrote:
> >>
> >> Hi Utkarsh,
> >>
> >> Yes, I can confirm that this fixes the issue.  Can you please merge this to master and the 8.2.0 release?  Thanks!
> >>
> >> Regards,
> >> Prabhu
> >>
> >> On 11/26/18 9:42 AM, Utkarsh Ayachit wrote:
> >>
> >> It's getting added to all.py through the CMake code that simply adds
> >> all wrapped modules to it. I can't think of reason why the
> >> vtkPythonInterpreter module should be Python wrapped at all, however.
> >> Can you try the attached patch, please? Does it work?
> >>
> >> Thanks
> >> Utkarsh
> >> On Sun, Nov 25, 2018 at 8:30 PM Prabhu Ramachandran
> >> <[hidden email]> wrote:
> >>
> >> Hi all,
> >>
> >> With VTK 8.2.x (master), I run into a segfault when I "import vtk" on Python 3.7 (I doubt it is specific to a particular Python version).  By simply commenting out
> >>
> >> from .vtkPythonInterpreter import *
> >>
> >> in the all.py module, the segfault is fixed.  I am not sure why this module should be put into all.py? If someone desires it they can manually import it.  Or is there something I am missing?
> >>
> >> Thanks!
> >>
> >> cheers,
> >>
> >> Prabhu
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers