Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Crashed problems of insertion operation in bezier arrangement

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Crashed problems of insertion operation in bezier arrangement


Chronological Thread 
  • From: Stzpz <>
  • To:
  • Subject: Re: [cgal-discuss] Crashed problems of insertion operation in bezier arrangement
  • Date: Wed, 23 Mar 2011 23:11:29 +0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=QosP35RShXnAN2QTl9ik1dvxZIZUitsm5pnu3vaJcXF1/hu606D03pkFYLe9LjjpEi szEsYeyKH7ZUlUDJbgGML5esBD+eufDbVMn0VaiAJxYmBsF6RhwqHdUqJPEV3GtgCVd8 8znhJh7Cu3Tq6Uq4DIlS4QEbfHE/5ZEgAcgNo=

Does anyone know how to solve this problem?

Thanks!

Stzpz



2011/3/17 Stzpz <>
I am using CGAL 3.8 beta1 now. It seems that there still have some problems in the insert() function when a lot of curves are inserting into the bezier arrangement. 

When I insert the bezier curves to the arrangement one by one, the assertion violation may appear at the time of inserting the 106th curves. I have tried some different data, and it crashed at the same point. The assertion information is:
  CGAL error: precondition violation!
  _expression_ : p.get_originator (_curve, _xid) != p.originators_end()
  File       : D:\CGAL-3.8-beta1\include\CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h
  Line       : 1343
  Explanation:

When I insert the bezier curves aggregately, the assertion violation may appear when there contains 107 curves. The assertion information is:
  CGAL error: assertion violation!
  _expression_ : ! t_vals.empty()
  File       : D:\CGAL-3.8-beta1\include\CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h
  Line       : 1597
  Explanation:

The attachment contains the code and the test data. 

Does anybody knows how to solve it?

Thanks!

Stzpz


2011/3/7 Sebastien Loriot (GeometryFactory) <sloriot.ml@gmail.com>

It is working fine on my machine. Maybe the patched file I posted was incomplete. Try with the one attached.

S.

Stzpz wrote:
I am sorry, but could you try it one more time for the first test data? I have tried to rebuild the CGAL library, but the assertion violation problem still existed. I have also tried to run it under Windows 7 64bit with VS2008 SP1 and Ubuntu 10.04 64bit, and the problem occurred on both machine.

The assertion information is listed below:
   CGAL error: assertion violation!
   _expression_ : s_vals.size() == t_vals.size()
   File       : D:\CGAL-3.7\include\CGAL/Arr_geometry_traits/Bezier_cache.h
   Line       : 418
   Explanation:
   Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html

The attachment is the code and the test data. The necessary solution file and make file for VS2008 and Ubuntu are generated using cgal_create_cmake_script and cmake.

Thanks very much!

Stzpz


2011/3/7 Sebastien Loriot (GeometryFactory) <sloriot.ml <http://sloriot.ml>@gmail.com <http://gmail.com>>


   stzpz wrote:

       When I inserting a lot of bezier curves into the bezier
       arrangement, two
       crash problems may occurred. Here is the code for test:

   attaching the file directly should avoid bad formatting.

   [snip]


       (1) Using the above code, with a test_data.txt contains a lot of
       bezier
       curves, the insert() is likely to crash because of assertion
       violation. It
       may sometimes running normally, but it seems that, the more the
       curves, the
       higher probability of being crashed.

   I ran it ten times without any errors.


   Here is the test data:

       ==================== test_data.txt BEGIN ========================

       (2) Using the above code, with a lot of bezier curves of the
       same control
       points, the requiring memory of the code will increasing rapidly
       and finally
       run out of memory. Here is the test data:

   The code in CGAL is able to handle identical curves, but as I
   already said, for efficiency reason, if you know that you are having
   such
   degenerate cases in your examples, I suggest to pre-process
   your input to remove duplicated curves (a simply sort on the degree
   and comparison of control points should be sufficient).

   S.

   [snip]



   --     You are currently subscribed to cgal-discuss.
   To unsubscribe or access the archives, go to
   https://lists-sop.inria.fr/wws/info/cgal-discuss




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Archive powered by MHonArc 2.6.16.

Top of Page