[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
RE: [XaraXtreme-dev] Abort on arrow keypress
- From: "Phil Martin" <Phil@xxxxxxxx>
- Date: Wed, 28 Jun 2006 16:25:53 +0100
- Subject: RE: [XaraXtreme-dev] Abort on arrow keypress
Thanks Gerry, I was was just thinking about looking into that problem
myself (it's a P1 on my list).
The use of StartSpread and CurrentSpread in CompleteTransformation is a
recent change I made to handle dragging across spread boundaries but
obviously I upset non-drag transforms without realising it.
The TransOperation cosntructor has worked for years without initialising
it's other variables so although it really should do so, I don't think
we'll find any new problems because of it.
Phil
> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx
> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Gerry Iles
> Sent: 28 June 2006 16:19
> To: dev@xxxxxxxxxxxxxx
> Subject: RE: [XaraXtreme-dev] Abort on arrow keypress
>
> Well, logically, I don't see any reason for the code to call
> Spread::FindActiveLayer when handling cursor keys as it
> doesn't do anything to the active layer (the active layer
> being the layer that newly created objects get put on).
>
> Looking at the code in CompleteTransformation, it should only
> be calling FindActiveLayer if the operation is moving the
> selection from one spread to another. This shouldn't happen
> in the text cursor case (until we have flowing text stories
> that can span multiple spreads :) and I wouldn't have thought
> the nudge operations would allow it either (though presumably
> dragging with the mouse would if you actually had more than
> one spread).
>
> Looking at the constructor for TransOperation it doesn't
> actually set all of its member variables sensibly. I've just
> committed a fix (r1382) that sets the StartSpread and
> CurrentSpread to NULL so that in release builds (when memory
> isn't auto-nulled on allocation) the test in
> CompleteTransformation works correctly.
>
> I haven't actually done a release build to test it but this
> should sort out this specific problem. There may be other
> problems caused by the other member variables not being
> initialised properly and these should really be sorted out too.
>
> Gerry
>
> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx
> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Martin Wuerthner
> Sent: 28 June 2006 15:30
> To: dev@xxxxxxxxxxxxxx
> Subject: [XaraXtreme-dev] Abort on arrow keypress
>
> When I press an arrow key (either to nudge an object or to
> move the cursor in a text object) XaraLX aborts with a
> SIGSEGV. This always happens in release builds, but not in
> debug builds. The abort happens in Spread::FindActiveLayer at
> node.h:1137 but also at other places inside this routine. It
> appears that the this pointer of the FindActiveLayer method
> call is invalid. The caller is TransOperation::CompleteTransformation.
>
> Interestingly, in a debug build, Spread::FindActiveLayer is
> not even called when handling an arrow key, neither when
> nudging an object nor when moving the cursor.
>
> So, something is seriously wrong with the program flow
> earlier on, but only in release builds.
>
> This is with the current svn version (1381), build on SUSE
> 10.0 using gcc 4.02.
>
> Martin
>