Ah, I was using a custom Branching which I created in the original space but then applied to the copy. Is there a way to clone the Branching alongside the space?
Malcolm On 05/02/2009, at 2:15 AM, Christian Schulte wrote: > That is absolutely bizarre! unforce de-registers a propagator that > requires > deletion (many propagators do not have to be deleted if their space > are > deleted. some need explicit deletion as they keep external memory for > example). > > So, I have no idea, I thought for a while. Do you use anything self- > built > (propagator, branching)? Or maybe is your copy function and/or the > constructor called by the copy function wrong (forgot something to > update > and just assigned it)? That is most likely. > > Christian > > -- > Christian Schulte, www.ict.kth.se/~cschulte/ > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf > Of Malcolm Ryan > Sent: Wednesday, February 04, 2009 10:03 AM > To: gecode list > Subject: Re: [gecode-users] Copying spaces > > On 04/02/2009, at 7:14 PM, Christian Schulte wrote: >> Copy() is an internal function (maybe we should make it protected) >> use by >> the clone() operation. So you have to use clone() to create a clone >> of a >> space! > > Thanks, that sorted out that problem... but left me with another. I > haven't quite isolated it down to a simple example yet, but can you > offer any idea what might be causing this: > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0033d000 > Gecode::Actor::unforce () at core.icc:1591 > 1591 while (this != *f) > > The GDB backtrace shows: > > #0 Gecode::Actor::unforce () at core.icc:1591 > #1 Gecode::Actor::unforce () at core.icc:1591 > #2 Gecode::Int::Extensional::Base<Gecode::Int::IntView, > true>::dispose (this=0x1031038, home=0xf23d20) at gecode/int/ > extensional.cc:145 > #3 0x0058ae7d in Gecode::Actor::unforce () at core.icc:1646 > #4 0x0058ae7d in > Gecode::Int::Extensional::Basic<Gecode::Int::IntView>::propagate > (this=0x1031038, home=0xf23d20) at gecode/int/extensional.cc:145 > #5 0x0026a043 in Gecode::Space::status (this=0xf23d20, p...@0x27c1b8) > at gecode/int/extensional.cc:145 > > It occurs at a point in the code where I have just cloned a space and > committed a Branching. Calling status() before the commit is fine. > Calling it again after the commit causes this crash. If I run the same > code on the original space (not the clone) it works fine. > > I know that this is not really enough detail, but if you could give me > any idea of what kind of problem I might be facing, it could help me > track down the bug. What is the unforce() function doing at this > point? > > Malcolm > _______________________________________________ > Gecode users mailing list > [email protected] > https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
