Quantcast

Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Drak
This post was updated on .
I've noticed that by playing with the radius value and the resolution of the cylinder, the boolean operation filter may or may not crash

Here is my code bellow.    

    // The outer cylinder
    vtkCylinderSource * _cylinderSource1 = vtkCylinderSource::New();
    _cylinderSource1->SetCenter(0, 0, 0);
    _cylinderSource1->SetHeight(0.02);
    _cylinderSource1->SetRadius(0.13);
    _cylinderSource1->SetResolution(10);
    _cylinderSource1->Update();

    vtkTriangleFilter * _cylinder1Triangle = vtkTriangleFilter::New();
    _cylinder1Triangle->SetInputData(_cylinderSource1->GetOutput());
    _cylinder1Triangle->Update();

    // The inner cylinder
    vtkCylinderSource * _cylinderSource2 = vtkCylinderSource::New();
    _cylinderSource2->SetCenter(0, 0, 0);
    _cylinderSource2->SetHeight(0.02+0.01);
    _cylinderSource2->SetRadius(0.001);
    _cylinderSource2->SetResolution(20);
    _cylinderSource2->Update();

    vtkTriangleFilter * _cylinder2Triangle = vtkTriangleFilter::New();
    _cylinder2Triangle->SetInputData(_cylinderSource2->GetOutput());
    _cylinder2Triangle->Update();

    vtkBooleanOperationPolyDataFilter * _filter = vtkBooleanOperationPolyDataFilter::New();
    _filter->SetOperationToDifference();
    _filter->SetInputData(0, _cylinder1Triangle->GetOutput());
    _filter->SetInputData(1, _cylinder2Triangle->GetOutput());
    _filter->Update(); // CRASH

What should I do to make it work 100 % of the time? I don't care if I have sometimes weird holes, but I cannot accept to have crashes in my program :\ .

the reason I'm using the filder is to have a cylinder with a hole in it, where I can modify the inner and outer radius.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

josci
Hi Drak,

where you able to solve your problem? I'm experiencing the same with spherical surface read from an stl file. My second geometry is generated by spheresource->trianglefilter.

I'm trying to reproduce this error. If I'm successful doing this I'll post the stl file and the source code here.


Best regards

Johannes

P.s.: Is the mailinglist the proper place for a bug report?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
Hi Johannes,

Yes, the mailing list is a suitable place for a bug report.

Thanks,
Cory

On Wed, Sep 16, 2015 at 8:42 AM, josci <[hidden email]> wrote:
Hi Drak,

where you able to solve your problem? I'm experiencing the same with
spherical surface read from an stl file. My second geometry is generated by
spheresource->trianglefilter.

I'm trying to reproduce this error. If I'm successful doing this I'll post
the stl file and the source code here.


Best regards

Johannes

P.s.: Is the mailinglist the proper place for a bug report?





--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5733960.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
In reply to this post by Drak
Hi Drak,

Two things:

1). You might want to try the master branch in VTK's git repository. There have been some recent changes that might fix your problem.

2). Would it be possible to post a stack trace where your program crashes? Or report radius values that lead to the crash?

Thanks,
Cory



On Wed, Aug 19, 2015 at 4:56 PM, Drak <[hidden email]> wrote:
I've noticed that by playing with the radius value and the resolution of the
cylinder, the boolean operation filter may or may not crash

Here is my code bellow.

    // The outer cylinder
    vtkCylinderSource * _cylinderSource1 = vtkCylinderSource::New();
    _cylinderSource1->SetCenter(0, 0, 0);
    _cylinderSource1->SetHeight(width);
    _cylinderSource1->SetRadius(0.13);
    _cylinderSource1->SetResolution(10);
    _cylinderSource1->Update();

    vtkTriangleFilter * _cylinder1Triangle = vtkTriangleFilter::New();
    _cylinder1Triangle->SetInputData(_cylinderSource1->GetOutput());
    _cylinder1Triangle->Update();

    // The inner cylinder
    vtkCylinderSource * _cylinderSource2 = vtkCylinderSource::New();
    _cylinderSource2->SetCenter(0, 0, 0);
    _cylinderSource2->SetHeight(width+0.01);
    _cylinderSource2->SetRadius(0.001);
    _cylinderSource2->SetResolution(20);
    _cylinderSource2->Update();

    vtkTriangleFilter * _cylinder2Triangle = vtkTriangleFilter::New();
    _cylinder2Triangle->SetInputData(_cylinderSource2->GetOutput());
    _cylinder2Triangle->Update();

    vtkBooleanOperationPolyDataFilter * _filter =
vtkBooleanOperationPolyDataFilter::New();
    _filter->SetOperationToDifference();
    _filter->SetInputData(0, _cylinder1Triangle->GetOutput());
    _filter->SetInputData(1, _cylinder2Triangle->GetOutput());
    _filter->Update(); // CRASH

What should I do to make it work 100 % of the time? I don't care if I have
sometimes weird holes, but I cannot accept to have crashes in my program :\
.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

josci
In reply to this post by Cory Quammen-2
Hi Cory Quammen-2,

thanks for your reply. If written some code to reproduce the crash:

#include <vtkPolyData.h>
#include <vtkSTLReader.h>
#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkSphereSource.h>
#include <vtkTriangleFilter.h>
#include <vtkBooleanOperationPolyDataFilter.h>
#include <vtkMassProperties.h>

int main ( int argc, char *argv[] )
{
        double volume, r0;
       
        r0 = 0.013;

        vtkSmartPointer<vtkSTLReader> reader1 = vtkSmartPointer<vtkSTLReader>::New();
        reader1->SetFileName(argv[1]);
        reader1->Update();
       
        vtkSmartPointer<vtkSphereSource> sphere_source_2 = vtkSmartPointer<vtkSphereSource>::New();
        sphere_source_2->SetCenter(0,0,0);
        sphere_source_2->SetRadius(r0);
        sphere_source_2->SetThetaResolution(16);
        sphere_source_2->SetPhiResolution(16);
        sphere_source_2->Update();

        vtkSmartPointer<vtkTriangleFilter> sphere_triangle_2 = vtkSmartPointer<vtkTriangleFilter>::New();
        sphere_triangle_2->SetInputConnection(sphere_source_2->GetOutputPort());
        sphere_triangle_2->Update();

        vtkSmartPointer<vtkBooleanOperationPolyDataFilter> booleanOperation = vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();
        booleanOperation->SetOperationToIntersection();
        booleanOperation->SetInputConnection(0, reader1->GetOutputPort());
        booleanOperation->SetInputConnection(1, sphere_triangle_2->GetOutputPort());
        booleanOperation->Update();

        vtkSmartPointer<vtkMassProperties> massprop = vtkSmartPointer<vtkMassProperties>::New();
        massprop->SetInputConnection(booleanOperation->GetOutputPort());

        for (double r = r0; r < 0.03; r+=0.001)
        {
                sphere_source_2->SetRadius(r);
                sphere_source_2->Update();
                sphere_triangle_2->Update();
                booleanOperation->Update(); //crash :if SetThetaResolution = SetThetaResolution = 8 and r = 0.015
                                                                                                //no crassh :if SetThetaResolution = SetThetaResolution = 16 and r = 0.015 or r = 0.016
                                                                                                //no crassh :if SetThetaResolution = SetThetaResolution = 8 and r = 0.014 or r = 0.016
                massprop->Update();
                volume = massprop->GetVolume();
                printf("r = %1.5f: intersection volumt = %1.16f\n", r, volume);
        }
       
        return EXIT_SUCCESS;
}

just pass the filename of the stl (file attached) as first and only parameter to the program. In the source code there are a few cases discribed, which work and one "parameter combination" which leads to the crash.

single_sphere.stl

Best regards




Cory Quammen-2 wrote
Hi Johannes,

Yes, the mailing list is a suitable place for a bug report.

Thanks,
Cory

On Wed, Sep 16, 2015 at 8:42 AM, josci <[hidden email]> wrote:

> Hi Drak,
>
> where you able to solve your problem? I'm experiencing the same with
> spherical surface read from an stl file. My second geometry is generated by
> spheresource->trianglefilter.
>
> I'm trying to reproduce this error. If I'm successful doing this I'll post
> the stl file and the source code here.
>
>
> Best regards
>
> Johannes
>
> P.s.: Is the mailinglist the proper place for a bug report?
>
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5733960.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

josci
Hi Cory Quammen-2,

I although tested the code with the current developer version (6.3 master branch). Sadly it gives the same result.

Johannes


josci wrote
Hi Cory Quammen-2,

thanks for your reply. If written some code to reproduce the crash:

#include <vtkPolyData.h>

...........



Cory Quammen-2 wrote
Hi Johannes,

Yes, the mailing list is a suitable place for a bug report.

Thanks,
Cory

On Wed, Sep 16, 2015 at 8:42 AM, josci <[hidden email]> wrote:

> Hi Drak,
>
> where you able to solve your problem? I'm experiencing the same with
> spherical surface read from an stl file. My second geometry is generated by
> spheresource->trianglefilter.
>
> I'm trying to reproduce this error. If I'm successful doing this I'll post
> the stl file and the source code here.
>
>
> Best regards
>
> Johannes
>
> P.s.: Is the mailinglist the proper place for a bug report?
>
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5733960.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
Hi Johannes,

I can confirm the crash you see with the parameters you cite. The crash occurs in the vtkDelaunay2D filter that is used by the boolean operations filter. Specifically, the crash is in vtkDelaunay2D::RecoverEdge() due to an invalid memory access, but I don't see an obvious underlying cause. Unfortunately, I'm not sure when I'll have time to debug it further.

- Cory

On Wed, Sep 16, 2015 at 2:04 PM, josci <[hidden email]> wrote:
Hi Cory Quammen-2,

I although tested the code with the current developer version (6.3 master
branch). Sadly it gives the same result.

Johannes



josci wrote
> Hi Cory Quammen-2,
>
> thanks for your reply. If written some code to reproduce the crash:
>
> #include
> <vtkPolyData.h>
> ...........
>
>
> Cory Quammen-2 wrote
>> Hi Johannes,
>>
>> Yes, the mailing list is a suitable place for a bug report.
>>
>> Thanks,
>> Cory
>>
>> On Wed, Sep 16, 2015 at 8:42 AM, josci &lt;

>> jojo2100@

>> &gt; wrote:
>>
>>> Hi Drak,
>>>
>>> where you able to solve your problem? I'm experiencing the same with
>>> spherical surface read from an stl file. My second geometry is generated
>>> by
>>> spheresource->trianglefilter.
>>>
>>> I'm trying to reproduce this error. If I'm successful doing this I'll
>>> post
>>> the stl file and the source code here.
>>>
>>>
>>> Best regards
>>>
>>> Johannes
>>>
>>> P.s.: Is the mailinglist the proper place for a bug report?
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5733960.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>> Cory Quammen
>> R&D Engineer
>> Kitware, Inc.
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers





--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5733973.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

josci
Hi Cory,

thank your for taking a look into this issue. If there is anthing which I can contribute to track down this bug, like a "smaller data set (in best case reduced to a few triangles)" for example, please let me know.

Johannes


<quote author="Cory Quammen-2">
Hi Johannes,

I can confirm the crash you see with the parameters you cite. The crash
occurs in the vtkDelaunay2D filter that is used by the boolean operations
filter. Specifically, the crash is in vtkDelaunay2D::RecoverEdge() due to
an invalid memory access, but I don't see an obvious underlying cause.
Unfortunately, I'm not sure when I'll have time to debug it further.

- Cory

On Wed, Sep 16, 2015 at 2:04 PM, josci <[hidden email]> wrote:

> Hi Cory Quammen-2,
>
> I although tested the code with the current developer version (6.3 master
> branch). Sadly it gives the same result.
>
> Johannes
>
>
>
> josci wrote
> > Hi Cory Quammen-2,
> >
> > thanks for your reply. If written some code to reproduce the crash:
> >
> > #include
> > <vtkPolyData.h>
> > ...........
> >
> >
> > Cory Quammen-2 wrote
> >> Hi Johannes,
> >>
> >> Yes, the mailing list is a suitable place for a bug report.
> >>
> >> Thanks,
> >> Cory
> >>
> >> On Wed, Sep 16, 2015 at 8:42 AM, josci <
>
> >> jojo2100@
>
> >> > wrote:
> >>
> >>> Hi Drak,
> >>>
> >>> where you able to solve your problem? I'm experiencing the same with
> >>> spherical surface read from an stl file. My second geometry is
> generated
> >>> by
> >>> spheresource->trianglefilter.
> >>>
> >>> I'm trying to reproduce this error. If I'm successful doing this I'll
> >>> post
> >>> the stl file and the source code here.
> >>>
> >>>
> >>> Best regards
> >>>
> >>> Johannes
> >>>
> >>> P.s.: Is the mailinglist the proper place for a bug report?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

normanius
Hi Cory
Hi Johannes

Is there anything new regarding the crash? I can reproduce the problem with Jo's sample program for vtk-6.2.0 and vtk-6.3.0. However, the problem does not occur in 5.10.1. (Tested on Mac OS 10.7, everything compiled with clang 6.0, I've built vtk from source.)

Switching back to vtk-5 is connected to quite some effort on my side, so I was wondering how to fix or work around the problem with vtk-6.

Let me know if I can support you in a way.

Thanks,
Norman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
Norman,

There might be a fix for this in gitlab.


You can try out this branch and see if it fixes the crash for you. You can get it with:

git fetch https://gitlab.kitware.com/jpouderoux/vtk.git FixDelaunay2DBug
git checkout -b jpouderoux/vtk-FixDelaunay2DBug FETCH_HEAD

Best regards,
Cory

On Thu, Dec 3, 2015 at 8:17 AM, normanius <[hidden email]> wrote:
Hi Cory
Hi Johannes

Is there anything new regarding the crash? I can reproduce the problem with
Jo's sample program for vtk-6.2.0 and vtk-6.3.0. However, the problem does
not occur in 5.10.1. (Tested on Mac OS 10.7, everything compiled with clang
6.0, I've built vtk from source.)

Switching back to vtk-5 is connected to quite some effort on my side, so I
was wondering how to fix or work around the problem with vtk-6.

Let me know if I can support you in a way.

Thanks,
Norman




--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5735281.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

normanius
Excellent!!! The fix works as far as I can tell. Johannes' sample does not crash anymore, neither does my application (I will do some more extensive testing next week).

Thanks for the hint. Hope to see the fix in the next release.

Norman :)))
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

David E DeMarle
In reply to this post by josci
There is a current merge request that sounds related. Cory would please check if it does and let us know.

On Wednesday, September 23, 2015, josci <[hidden email]> wrote:
Hi Cory,

thank your for taking a look into this issue. If there is anthing which I
can contribute to track down this bug, like a "smaller data set (in best
case reduced to a few triangles)" for example, please let me know.

Johannes



Hi Johannes,

I can confirm the crash you see with the parameters you cite. The crash
occurs in the vtkDelaunay2D filter that is used by the boolean operations
filter. Specifically, the crash is in vtkDelaunay2D::RecoverEdge() due to
an invalid memory access, but I don't see an obvious underlying cause.
Unfortunately, I'm not sure when I'll have time to debug it further.

- Cory

On Wed, Sep 16, 2015 at 2:04 PM, josci &lt;jojo2100@&gt; wrote:

> Hi Cory Quammen-2,
>
> I although tested the code with the current developer version (6.3 master
> branch). Sadly it gives the same result.
>
> Johannes
>
>
>
> josci wrote
> > Hi Cory Quammen-2,
> >
> > thanks for your reply. If written some code to reproduce the crash:
> >
> > #include
> > <vtkPolyData.h>
> > ...........
> >
> >
> > Cory Quammen-2 wrote
> >> Hi Johannes,
> >>
> >> Yes, the mailing list is a suitable place for a bug report.
> >>
> >> Thanks,
> >> Cory
> >>
> >> On Wed, Sep 16, 2015 at 8:42 AM, josci &lt;
>
> >> jojo2100@
>
> >> &gt; wrote:
> >>
> >>> Hi Drak,
> >>>
> >>> where you able to solve your problem? I'm experiencing the same with
> >>> spherical surface read from an stl file. My second geometry is
> generated
> >>> by
> >>> spheresource->trianglefilter.
> >>>
> >>> I'm trying to reproduce this error. If I'm successful doing this I'll
> >>> post
> >>> the stl file and the source code here.
> >>>
> >>>
> >>> Best regards
> >>>
> >>> Johannes
> >>>
> >>> P.s.: Is the mailinglist the proper place for a bug report?






--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5734067.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


--
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
Dave,

I think you are talking about this MR: https://gitlab.kitware.com/vtk/vtk/merge_requests/455

Norman tested it and says it solves his issue.

I'll work with Joachim to get this merged in before VTK 7.

Thanks,
Cory

On Fri, Dec 4, 2015 at 8:47 PM, David E DeMarle <[hidden email]> wrote:
There is a current merge request that sounds related. Cory would please check if it does and let us know.


On Wednesday, September 23, 2015, josci <[hidden email]> wrote:
Hi Cory,

thank your for taking a look into this issue. If there is anthing which I
can contribute to track down this bug, like a "smaller data set (in best
case reduced to a few triangles)" for example, please let me know.

Johannes



Hi Johannes,

I can confirm the crash you see with the parameters you cite. The crash
occurs in the vtkDelaunay2D filter that is used by the boolean operations
filter. Specifically, the crash is in vtkDelaunay2D::RecoverEdge() due to
an invalid memory access, but I don't see an obvious underlying cause.
Unfortunately, I'm not sure when I'll have time to debug it further.

- Cory

On Wed, Sep 16, 2015 at 2:04 PM, josci &lt;jojo2100@&gt; wrote:

> Hi Cory Quammen-2,
>
> I although tested the code with the current developer version (6.3 master
> branch). Sadly it gives the same result.
>
> Johannes
>
>
>
> josci wrote
> > Hi Cory Quammen-2,
> >
> > thanks for your reply. If written some code to reproduce the crash:
> >
> > #include
> > <vtkPolyData.h>
> > ...........
> >
> >
> > Cory Quammen-2 wrote
> >> Hi Johannes,
> >>
> >> Yes, the mailing list is a suitable place for a bug report.
> >>
> >> Thanks,
> >> Cory
> >>
> >> On Wed, Sep 16, 2015 at 8:42 AM, josci &lt;
>
> >> jojo2100@
>
> >> &gt; wrote:
> >>
> >>> Hi Drak,
> >>>
> >>> where you able to solve your problem? I'm experiencing the same with
> >>> spherical surface read from an stl file. My second geometry is
> generated
> >>> by
> >>> spheresource->trianglefilter.
> >>>
> >>> I'm trying to reproduce this error. If I'm successful doing this I'll
> >>> post
> >>> the stl file and the source code here.
> >>>
> >>>
> >>> Best regards
> >>>
> >>> Johannes
> >>>
> >>> P.s.: Is the mailinglist the proper place for a bug report?






--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5734067.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


--
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
Hi all,

The fix in question has been merged into VTK master. It will be available in VTK 7.

Cheers,
Cory

On Sat, Dec 5, 2015 at 9:24 AM, Cory Quammen <[hidden email]> wrote:
Dave,

I think you are talking about this MR: https://gitlab.kitware.com/vtk/vtk/merge_requests/455

Norman tested it and says it solves his issue.

I'll work with Joachim to get this merged in before VTK 7.

Thanks,
Cory

On Fri, Dec 4, 2015 at 8:47 PM, David E DeMarle <[hidden email]> wrote:
There is a current merge request that sounds related. Cory would please check if it does and let us know.


On Wednesday, September 23, 2015, josci <[hidden email]> wrote:
Hi Cory,

thank your for taking a look into this issue. If there is anthing which I
can contribute to track down this bug, like a "smaller data set (in best
case reduced to a few triangles)" for example, please let me know.

Johannes



Hi Johannes,

I can confirm the crash you see with the parameters you cite. The crash
occurs in the vtkDelaunay2D filter that is used by the boolean operations
filter. Specifically, the crash is in vtkDelaunay2D::RecoverEdge() due to
an invalid memory access, but I don't see an obvious underlying cause.
Unfortunately, I'm not sure when I'll have time to debug it further.

- Cory

On Wed, Sep 16, 2015 at 2:04 PM, josci &lt;jojo2100@&gt; wrote:

> Hi Cory Quammen-2,
>
> I although tested the code with the current developer version (6.3 master
> branch). Sadly it gives the same result.
>
> Johannes
>
>
>
> josci wrote
> > Hi Cory Quammen-2,
> >
> > thanks for your reply. If written some code to reproduce the crash:
> >
> > #include
> > <vtkPolyData.h>
> > ...........
> >
> >
> > Cory Quammen-2 wrote
> >> Hi Johannes,
> >>
> >> Yes, the mailing list is a suitable place for a bug report.
> >>
> >> Thanks,
> >> Cory
> >>
> >> On Wed, Sep 16, 2015 at 8:42 AM, josci &lt;
>
> >> jojo2100@
>
> >> &gt; wrote:
> >>
> >>> Hi Drak,
> >>>
> >>> where you able to solve your problem? I'm experiencing the same with
> >>> spherical surface read from an stl file. My second geometry is
> generated
> >>> by
> >>> spheresource->trianglefilter.
> >>>
> >>> I'm trying to reproduce this error. If I'm successful doing this I'll
> >>> post
> >>> the stl file and the source code here.
> >>>
> >>>
> >>> Best regards
> >>>
> >>> Johannes
> >>>
> >>> P.s.: Is the mailinglist the proper place for a bug report?






--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5734067.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


--
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Cory Quammen
R&D Engineer
Kitware, Inc.



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

updega2
Hi all,

Looking at this post, I think now is a good time to mention that I have been working on an alternate boolean operation. I realize this was more an issue with Delaunay 2D, and I actually noticed some of the Delaunay 2D problems while working on this new boolean, and I worked with Joachim to get those issues fixed.

I have just recently finished it up, and I figured maybe it could be added as a second boolean operation in vtk? It created a very similar vtkIntersectionPolyDataFilter with a couple small differences. The boolean however is more similar to the GTS implementation to identify boolean regions instead of a signed distance algorithm. This improves the speed and quality, and also allows open surface booleans.

I have created a fork, and I have started to clean up the code for vtk format. If this sounds helpful and something that might be possible, let me know!

Thanks!

Adam Updegrove
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

Cory Quammen-2
I'm happy to look into alternate, more robust implementations.

Thanks,
Cory

On Mon, Dec 7, 2015 at 10:45 AM, updega2 <[hidden email]> wrote:
Hi all,

Looking at this post, I think now is a good time to mention that I have been
working on an alternate boolean operation. I realize this was more an issue
with Delaunay 2D, and I actually noticed some of the Delaunay 2D problems
while working on this new boolean, and I worked with Joachim to get those
issues fixed.

I have just recently finished it up, and I figured maybe it could be added
as a second boolean operation in vtk? It created a very similar
vtkIntersectionPolyDataFilter with a couple small differences. The boolean
however is more similar to the GTS implementation to identify boolean
regions instead of a signed distance algorithm. This improves the speed and
quality, and also allows open surface booleans.

I have created a fork, and I have started to clean up the code for vtk
format. If this sounds helpful and something that might be possible, let me
know!

Thanks!

Adam Updegrove



--
View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567p5735363.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

updega2
Great! I will work at getting it into my fork in the next couple of days, and then we can work at trying to get it contributed if possible.

Adam
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

normanius
I've tested the code in python on different datasets (~100 boolean operations) and my code never crashed.

Looking forward to the release,
Norman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP]

esean
Hi all,

Sorry for bumping this old thread, but I think I am running into the same issue but using latest VTK 7.1. In searching for a solution, Google brought me here.

I have an STL I'm opening and looking for the intersection with a cube using vtkBooleanOperationPolyDataFilter. But am getting a seg fault 11 when performing vtkBooleanOperationPolyDataFilter->Update(). I have found changing the cube dimensions will prevent the crash.

I've attached a small piece of code and STL which is recreating the problem for me on every run. Can someone more knowledgable than me check if this is the same issue, or a new crash?

Thanks!

Sean


boolcrash.zip

And if the attachment doesn't work, I placed a temporary copy in Dropbox
https://www.dropbox.com/s/bkrqqr529kjov8f/boolcrash.zip?dl=0


Loading...