Bug 123048

Summary: Unable to render plots with KDE 3.5.1
Product: [Applications] kst Reporter: D. V. Wiebe <dvw>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal CC: eprv
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description D. V. Wiebe 2006-03-04 00:35:48 UTC
Version:           1.3.0_devel (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.4.5 
OS:                Linux

Slackware-current recently upgraded to KDE 3.5.1 and qt 3.3.5.  After recompiling kst against these, kst is unable to render plots.  When kst tries to render a plot, I get a stream of X Errors (see below), and nothing is drawn.  I've tested this with 1.2.0dr1, 1.2.0, 1.3.0_devel (SVN 515492) and all have the same problem.  Plotting used to work fine with the 1.2.0 versions on the Slackware 10.2 configuration of KDE 3.4.2 and qt 3.3.4.

I'm not sure this is a kst bug or just a misconfiguration with slackware's KDE, but this is the only application which demonstrates this behaviour.

kst console output follows:

[dwiebe@legolas:0 kst 0,10041]$ kst
kst: WARNING: KGenericFactory: instance requested but no instance name or about data passed to the constructor!
kst: WARNING: addBindingsClass() KJSEmbed::KJSEmbedPart not known
kst: WARNING: addBindingsClass() KJSEmbed::Bindings::Config not known
kst: WARNING: addBindingsClass() KstUIMerge not known
kst: WARNING: KGenericFactory: instance requested but no instance name or about data passed to the constructor!
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  70
  Minor opcode:  0
  Resource id:  0x0
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  70
  Minor opcode:  0
  Resource id:  0x0
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  66
  Minor opcode:  0
  Resource id:  0x0
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  67
  Minor opcode:  0
  Resource id:  0x0
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  66
  Minor opcode:  0
  Resource id:  0x0
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  152
  Minor opcode:  4
  Resource id:  0x0
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: RenderBadPicture (invalid Picture parameter) 174
  Major opcode:  152
  Minor opcode:  23
  Resource id:  0x1200ea9
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  62
  Minor opcode:  0
  Resource id:  0x1200eaa
(&c.)
Comment 1 Ted Kisner 2006-03-04 01:03:06 UTC
This is the same problem experienced by debian unstable a while back.

See this thread:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329231

The bug was in kst and dealt with the following:

--- quoted from Josh Metzler -----

"Finally, I ran kst under gdb with qt-x11-free-dbg installed and set a 
breakpoint at QPixmap::init just before creating a plot.  After lots of 
continues with valid parameters (w or h is 0 and depth is 0, or depth is 
-1 or 24 on my display), I got one with depth set to 8.  This doesn't 
cause a problem here because w = h = 0, so a null pixmap of depth 8 is 
created.  When it is resized, however, it causes a problem.  With the old 
qt behavior, an invalid depth was ignored when creating a null pixmap.

So, the bug is in lines 84, 124, 389 of kst/kst/kst2dplot.cpp where it 
specifies a depth of 8 when creating the KstBackBuffer.  It should 
probably use the default of -1 and let qt create a QPixmap of the 
appropriate bit depth."

---- end quote ------

So, not sure if this is related.  For what it's worth, I'm using KDE 3.5.1 and 
Qt 3.3.4 on Kubuntu without problems.

-Ted
Comment 2 Ted Kisner 2006-03-04 01:26:31 UTC
Doing a quick grep, I don't see any place that a QPixmap is getting 
initialized with an invalid depth...  I wonder if there is some other change 
in Qt 3.3.4 --> 3.3.5 that enforces a more strict behaviour that we are 
violating somewhere?

-Ted

On Friday 03 March 2006 16:02, Ted Kisner wrote:
| This is the same problem experienced by debian unstable a while back.
|
| See this thread:
|
| http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329231
|
| The bug was in kst and dealt with the following:
|
| --- quoted from Josh Metzler -----
|
| "Finally, I ran kst under gdb with qt-x11-free-dbg installed and set a
| breakpoint at QPixmap::init just before creating a plot.  After lots of
| continues with valid parameters (w or h is 0 and depth is 0, or depth is
| -1 or 24 on my display), I got one with depth set to 8.  This doesn't
| cause a problem here because w = h = 0, so a null pixmap of depth 8 is
| created.  When it is resized, however, it causes a problem.  With the old
| qt behavior, an invalid depth was ignored when creating a null pixmap.
|
| So, the bug is in lines 84, 124, 389 of kst/kst/kst2dplot.cpp where it
| specifies a depth of 8 when creating the KstBackBuffer.  It should
| probably use the default of -1 and let qt create a QPixmap of the
| appropriate bit depth."
|
| ---- end quote ------
|
| So, not sure if this is related.  For what it's worth, I'm using KDE 3.5.1
| and Qt 3.3.4 on Kubuntu without problems.
|
| -Ted
|
| _______________________________________________
| Kst mailing list
| Kst@kde.org
| https://mail.kde.org/mailman/listinfo/kst
Comment 3 George Staikos 2006-03-04 18:17:42 UTC
SVN commit 515703 by staikos:

fix Qt 3.3.5 crash
BUG: 123048


 M  +3 -3      kst2dplot.cpp  


--- branches/kst/1.2/kst/kst/kst2dplot.cpp #515702:515703
@@ -89,7 +89,7 @@
                  KstScaleModeType xscale_in,
                  double xmin_in, double ymin_in,
                  double xmax_in, double ymax_in)
-: KstPlotBase("Kst2DPlot"), _buffer(8) {
+: KstPlotBase("Kst2DPlot") {
   // must stay here for plot loading correctness
   _pos_x = 0.0;
   _pos_y = 0.0;
@@ -140,7 +140,7 @@
 
 
 Kst2DPlot::Kst2DPlot(const QDomElement& e)
-: KstPlotBase(e), _buffer(8) {
+: KstPlotBase(e) {
   QString in_tag = "unknown";
   KstScaleModeType yscale_in = AUTOBORDER, xscale_in = AUTO;
   double xmin_in = 0, ymin_in = 0, xmax_in = 1, ymax_in = 1;
@@ -414,7 +414,7 @@
 // FIXME: broken copy constructor
 // what is broken?
 Kst2DPlot::Kst2DPlot(const Kst2DPlot& plot, const QString& name)
-: KstPlotBase(plot), _buffer(8) {
+: KstPlotBase(plot) {
   QString plotName;
 
   _type = "Plot";
Comment 4 George Staikos 2006-05-25 14:16:07 UTC
*** Bug 127999 has been marked as a duplicate of this bug. ***