Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Alpha_shape_2::find_optimal_alpha(1) returning invalid pointer value

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Alpha_shape_2::find_optimal_alpha(1) returning invalid pointer value


Chronological Thread 
  • From: "Dave Potts" <>
  • To:
  • Subject: Re: [cgal-discuss] Alpha_shape_2::find_optimal_alpha(1) returning invalid pointer value
  • Date: Mon, 13 Feb 2012 07:15:24 -0000
  • Importance: Normal

Hi

I managed to discover the reason why I was having the problem.

I only had two entries in the Alpha array, with the result that
find_optimal_alpha return a value of zero.

Try and dereference that and you get a core dump, I found method that
return the number of entries in the Alpha array and I will not use the
A.find_optimal_alpha until there are at least 3 items in the Alpha array.


Dave.
Sebastien Loriot (GeometryFactory) wrote:
> On 02/11/2012 02:10 PM, Dave Potts wrote:
>> I have inherited a program that uses cgal library, it makes a call to
>>
>> Alpha_shape_2::find_optimal_alpha(1)
>>
>> This method returns a value of 0,if you attempt to deference this value,
>> you get a core dump.
>>
>> There is no == operator define for this method so I can not say
>>
>> if(A.find_optimal_alpha(1) ==0)
>>
>
> try A.find_optimal_alpha(1)!=A.alpha_end()
>
> but this is quite strange as you should not get alpha_end().
> Do you have a minimal but complete example showing the problem?
>
> Sebastien.
>
>>
>> How can I test for a zero return value? or if the values used in A to
>> get an optimal_alpha value are correct?
>>
>>
>> regards
>>
>>
>> Dave Potts.
>
>
> --
> 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