Crash with rectangular select

Casper Boemann cbr at boemann.dk
Tue May 17 21:21:22 CEST 2005


On Tuesday 17 May 2005 17:37, Sven Langkamp wrote:
> Seems to be caused by this:
> > SVN commit 414895 by boemann:
> >
> > changed select rect to use actions again
> > changed select rect and select contiguous to first invert when
> > SELECTION_SUBTRACT and deselected to begin with
>
> Looks to me like the temp selection is added to the selection of the
>
> selection:
> > +                                       case SELECTION_ADD:
>
> +                                               selection->addSelection(tmp
>Sel);
>
> > +                                               break;
> > +                                       case SELECTION_SUBTRACT:
>
> +                                               selection->subtractSelectio
>n(tmpSel);
>
> > +                                               break;
> > +                                       default:
> > +                                               break;
ideed that was wrong.

However the crash itself was cause by the tmpSel not being a shared pointer.

When calling addSelection that takes a shared pointer, an automatic sharedPtr 
was created and destroyed therby destroying the selection as well. BANG.

I really,really,really hate shared pointers, if not native like in java. Just 
had to get that of my chest ;-)
-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list