[Kst] Crash trace...
staikos at kde.org
Wed Mar 16 21:04:14 CET 2005
On Wednesday 16 March 2005 14:34, Andrew Walker wrote:
> As before, create a plot in a window, set number of columns to 10, shrink
> window in horizontal direction, crash...
> On Wednesday 16 March 2005 11:33 am, George Staikos wrote:
> > Which of your testcases caused this? (Or was it a different one?)
> > On Wednesday 16 March 2005 14:28, Andrew Walker wrote:
> > > Here's a trace of the crash (caused by the newly introduced assert)
> > > when the pixmap size goes to zero:
> > > [KCrash handler]
> > > #4 0xf6fe97a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> > > #5 0xf5b0e955 in raise () from /lib/tls/libc.so.6
> > > #6 0xf5b10319 in abort () from /lib/tls/libc.so.6
> > > #7 0xf5b07f41 in __assert_fail () from /lib/tls/libc.so.6
> > > #8 0x080adde3 in Kst2DPlot::draw (this=0x9c9c260) at qpixmap.h:271
Ok got it. The problem is having more plots than there are pixels in a
given dimension. This can be a problem for the layout algorithm too, so
let's prevent it. (It's a nonsensical case anyway, so there's no issue with
preventing it, as you already identified with the cap.) The view widget
should have a minimum size too.
Now we also have the issue of resizing and moving plots manually, ie: not in
columns. It should be impossible to resize a plot smaller than 1x1 already.
However the regrid code could be abused also. A user could create 1000 plots
and then regrid with a minimum size window. Again, it's absurd and that
itself should probably be guarded against.
The problem with a null pixmap is that it implies view objects that can't be
manipulated. I think it's completely wrong to have this happen, ever. I
think a good start is:
- Set maximum number of columns (done)
- Set minimum size of kstviewwidget to at least 40x25
- Set maximum number of 2dplot children of any view object to 200
This still doesn't deal with the nested view object case, but I think it
mostly covers us. A kst file or dcop call that tries to create a null view
object should trigger an error and refuse to load further.
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst