Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem

Subject: CGAL users discussion list

List archive

Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem


Chronological Thread 
  • From: "Max" <>
  • To: "" <>
  • Subject: Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem
  • Date: Thu, 10 Jan 2008 17:21:03 +0800
  • Disposition-notification-to: "Max" <>
  • Organization: LoadCom

Hello Peter

It looks like even stranger. I remember I've tested your code addition
last time and the program paused at the last new line with an assertion
failure. But now with a latest trial I get: the program outputs "test
first sedge 0 0 1" and then stopped at the same position in object_handle.h:

template <class T>
bool assign(T &t) const
{

const Handle_wrapper<T> *wp =
dynamic_cast<const Handle_wrapper<T> *>(Ptr()); // HERE !!
if ( wp == static_cast<Handle_wrapper<T> *>(0) )
return false;
t = *(wp);

Thanks.


B/Rgds
Max

----- Original Message ----
From: Peter Hachenberger
To:

Sent: 2008-01-09 18:57:22
Subject: Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem

>

> Unfortunately my program behaves exactly as you expected. It passes
> the first line you gave me and then raise an assertion error at the last
> new line of code. Then, according to your point, it seems to be true that
> the cause of the problem is from the installation of my CGAL(but I'm still
> not sure, or, in other words, I don't know why).

Before I give you hints of what to do with your CGAL installation, let's
get one thing clear. Do you get an assertion in the last line of the new
code or do you get another error?

> Once a time I also suspected if there's problem related to my installation,
> and I've unpacked the CGAL 3.3.1 package file into the existing
> installation
> folder to overwrite any inadvertant code change, if exists.
>
> Thank you very much for your time and help.
> It has been helpful indeeded.
>
> B/Rgds
> Max
>
> ----- Original Message ----
> From: Peter Hachenberger
> To:
>
> Sent: 2008-01-08 20:59:03
> Subject: Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem
>
> >
> Oh, that was not my brightest idea. Unfortunately, the output function
> does not give me the desired information, because it uses the same
> problematic call to show the desired information.
>
> I still think that it is not a problem of my code, but of your CGAL
> installation, but I don't want you to go fishing for problems with your
> installation before I did not have good evidence for this assumption. To
> provemy assumption, kick out the new line in polyhedron_to_nef3.h and
> replace it with
>
> std::cerr << "test first sedge "
> << SM.shalfedges_begin()->source()->point()
> << std::endl;
>
> typename SNC_structure::Object_list ol;
> ol.push_back(SM.shalfedges_begin());
> typename SNC_structure::SFace_cycle_iterator sfci(ol.begin());
> CGAL_assertion(sfci.is_shalfedge());
>
> That fourth line is the same call that causes the problem. The
> is_shalfedge() command calls a dynamic cast that decides whether the
> Object_handle sfci points to can be cast to an shalfedge. With the lines
> above I put a valid shalfege into sfci. I know that it's valid from the
> output generated by the first lines. So, if you know get a correct
> output by the first line and then got a fault in the assertion line (not
> a thrown assertion, but the same error as before), then I'm right and
> there is some problem with the installation.
>
> Peter
>
>
> On Tue, 2008-01-08 at 09:12 +0800, LoadCom wrote:
> > Hello Peter Hachenberger
> >
> > I've made change as you suggested to polyhedron_3_to_nef_3.h(not
> > polyhedron_to_nef_3.h).
> >
> > The program's output before error occur is as dos.png.
> > The context at the stop point is as snapshot.png.
> >
> > The 2 files are as attached.
> > Thanks for your help.
> >
> > B/Rgds
> > Max
> >
> > ----- Original Message ----
> > From: Peter Hachenberger
> > To:
> >
> > Sent: 2008-01-07 20:49:42
> > Subject: Re: Re: Re: [cgal-discuss][Polyhedron] Simple program problem
> >
> > >
> > Hi Max,
> >
> > Looking at the latest debug picture 1.png, we can try the following
> > stuff:
> >
> > The programm stops at an integrity check of the data structure. I want
> > to check whether the data structure really lacks integrity or whether
> > its something else. Please add the line
> >
> > CGAL::SM_io_parser<SM_decorator>::dump(SM, std::cerr);
> >
> > in front of the fifth line from the end in polyhedron_to_nef_3.h, which
> > looks as follows:
> >
> > SM.check_integrity_and_topological_planarity();
> >
> > So that it looks like
> >
> > CGAL::SM_io_parser<SM_decorator>::dump(SM, std::cerr);
> > SM.check_integrity_and_topological_planarity();
> > }
> >
> > index_adder.resolve_indexes();
> > }
> >
> > at the end of the file. Then compile and execute your program again and
> > send me the output, please.
> >
> > Peter
> >
> >
> > On Fri, 2008-01-04 at 16:25 +0800, LoadCom wrote:
> > > Hello Mahmood NT,
> > >
> > > This time the point the program stoped at is different.
> > > The location as well as the call stack is captered as
> > > attached.
> > >
> > > Thanks for your help.
> > > Max
> > >
> > >
> > > Re: Re: [cgal-discuss][Polyhedron] Simple program problem
> > >
> > > >Thank you very much for your reply.
> > >
> > > >My environment:
> > > >CGAL 3.3.1
> > > >Windows XP/SP2
> > > >VS 2003
> > >
> > > >The program causes a runtime error, see the attached 1.png. (debug
> > > >mode)
> > >
> > > Did you set project properties properly. check your project propeties
> > > with a simple example or demo (if you use QT).
> > >
> > > Also it would be helpful to post the call stack.
> > >
> > >
> > > Mahmood NT
> > >
> > --
> > 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
>
--
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