[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
RE: [XaraXtreme-dev] Abort on arrow keypress
- From: "Gerry Iles" <GerryI@xxxxxxxx>
- Date: Wed, 28 Jun 2006 16:19:26 +0100
- 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