Version: HEAD (using KDE KDE 3.5.0) Installed from: Compiled From Sources OS: Linux PROBLEM: Kst will crash when the user resizes a plot STEPS TO REPRODUCE: Start Kst Create a single plot Enter layout mode Resize the plot from the lower centre resize point RESULTS: Crash kst: kstviewobject.cpp:1464: virtual void KstViewObject::updateFromAspect(): Assertion `_geom.left() >= 0 && _geom.top() >= 0 && !_geom.size().isNull()' failed. KCrash: Application 'kst' crashing... EXPECTED RESULT: The plot resizes correctly
Appears to be related to the merge of the view aspect branch. I will back out that merge if the fix isn't obvious. I'm working on it. It's really unfortunate that this stuff wasn't tested thoroughly while it was in the branch. From now on I won't merge any branches unless they're fully tested.
SVN commit 568394 by arwalker: BUG:131625 Correctly normalize the new QRect M +11 -0 kstgfxmousehandlerutils.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kstgfxmousehandlerutils.cpp #568393:568394 @@ -152,6 +152,17 @@ newSize.setRight(anchorPoint.x() - int(newHalfWidth)); } + if (newSize.width() < 0) { + int width = newSize.width(); + newSize.setLeft(newSize.left() + width); + newSize.setRight(width * -1); + } + if (newSize.height() < 0) { + int height = newSize.height(); + newSize.setTop(newSize.top() + height); + newSize.setHeight(height * -1); + } + newSize = newSize.normalize(); return newSize;
The problem is that KstViewObject::move is being called on the plot with an invalid pos of (-1,0). I don't know where this call is originating from, or why it's happening- can anyone more familiar with the architecture explain? Duncan. On Mon, 2006-07-31 at 23:42 +0000, George Staikos wrote: [bugs.kde.org quoted mail]