goptical
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Goptical] spot analysis problems


From: Alexandre Becoulet
Subject: Re: [Goptical] spot analysis problems
Date: Sat, 16 Feb 2013 16:35:57 +0100
User-agent: KMail/4.9.5 (Linux/3.7.4-1-ARCH; KDE/4.9.5; x86_64; ; )

On Thursday 14 February 2013 21:24:56 Richard Graham wrote:

Hi Richard,

> I checked image.get_system() and it points correctly to the system.
> Running with valgrind I get:
> 
> ==1468== Invalid read of size 8
> ==1468==    at 0x40A55C:
> _Goptical::Trace::Result::get_intercepted(_Goptical::Sys::Surface
> const&) const (result.hxx:54)
> ==1468==    by 0x40923F: main (asphere.cc:609)
> ==1468==  Address 0x180 is not stack'd, malloc'd or (recently) free'd

It looks like Tracer::_result_ptr is NULL. You should trigger the ray tracing 
by calling one of the analysis function before calling get_trace_result(). 
Maybe it would be great to have a public function for starting the ray trace 
directly on the Analysis classes.

Use the const version of the get_tracer() function if you do not want the 
result to be invalidated:

const_cast<const 
Analysis::Spot&>(spot).get_tracer().get_trace_result().get_intercepted(image).size();

-- 
Alexandre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]