Bug#276103: kcdlabel: crash on save

2005-05-05 Thread Frank Lichtenheld
On Mon, Oct 11, 2004 at 09:23:33PM -0400, Stephen Gran wrote:
 Since it does not happen here, with tonight's sid, I am downgrading to
 normal for now, and tagging.  Let me know if you can dig out any
 additional information that may be pertinent.  I woul dsuggest
 rebuilding the package with debugging symbols enabled, except that all
 of the libraries installed will also be stripped, so it will be largely
 useless.

FWIW, I can fully reproduce both SEGV mentioned in this bug report.
Any hints for where to start digging into this?

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#276103: kcdlabel: crash on save

2005-05-05 Thread Stephen Gran
This one time, at band camp, Frank Lichtenheld said:
 On Mon, Oct 11, 2004 at 09:23:33PM -0400, Stephen Gran wrote:
  Since it does not happen here, with tonight's sid, I am downgrading to
  normal for now, and tagging.  Let me know if you can dig out any
  additional information that may be pertinent.  I woul dsuggest
  rebuilding the package with debugging symbols enabled, except that all
  of the libraries installed will also be stripped, so it will be largely
  useless.
 
 FWIW, I can fully reproduce both SEGV mentioned in this bug report.
 Any hints for where to start digging into this?

Well, the original crash (on save) is in kcdlabel/kcdlabel.cpp, in the
function KCDLabel::slotFileSave, and the write begins on about line 477.

It should be possible to figure out the cause by changing statements of
the type
foo-do; (or foo.do;)

to 

err = foo-do; 
if (err) printf something went wrong in foo.do: %s,err;

But my c++ is terribly rusty these days.

The cddb crash is kcdlabel/cddbaccessdialog.cpp, I believe, and if it
crashes for you when you click OK, then the problem is in
CDDBAccessDialog::CmOk, starting on line 53.

Thanks so much for anything you can come up,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgpxOP8j8b6El.pgp
Description: PGP signature


Bug#276103: kcdlabel: crash on save

2005-05-05 Thread Frank Lichtenheld
tags 276103 patch
tags 276103 - help
thanks

On Thu, May 05, 2005 at 08:19:00AM -0400, Stephen Gran wrote:
 This one time, at band camp, Frank Lichtenheld said:
  On Mon, Oct 11, 2004 at 09:23:33PM -0400, Stephen Gran wrote:
   Since it does not happen here, with tonight's sid, I am downgrading to
   normal for now, and tagging.  Let me know if you can dig out any
   additional information that may be pertinent.  I woul dsuggest
   rebuilding the package with debugging symbols enabled, except that all
   of the libraries installed will also be stripped, so it will be largely
   useless.
  
  FWIW, I can fully reproduce both SEGV mentioned in this bug report.
  Any hints for where to start digging into this?
 
 Well, the original crash (on save) is in kcdlabel/kcdlabel.cpp, in the
 function KCDLabel::slotFileSave, and the write begins on about line 477.
[...]
 The cddb crash is kcdlabel/cddbaccessdialog.cpp, I believe, and if it
 crashes for you when you click OK, then the problem is in
 CDDBAccessDialog::CmOk, starting on line 53.

Actually a gdb backtrace on a unstripped kcdlabel pointed me to the
right locations. The following patch seems to fix both segfaults:

diff -ur kcdlabel-2.13-KDE3.bak/kcdlabel/kcoverfont.cpp 
kcdlabel-2.13-KDE3/kcdlabel/kcoverfont.cpp
--- kcdlabel-2.13-KDE3.bak/kcdlabel/kcoverfont.cpp  2003-10-27 
15:59:02.0 +0100
+++ kcdlabel-2.13-KDE3/kcdlabel/kcoverfont.cpp  2005-05-05 15:07:20.582490928 
+0200
@@ -51,9 +51,9 @@

// save the font information
QFontInfo fi(*Font);
-   r1 = strlen(fi.family());
+   r1 = fi.family().length();
file.writeBlock( (char *)r1, sizeof(int) );
-   file.writeBlock( fi.family(), r1 );
+   file.writeBlock( fi.family().ascii(), r1 );
r1 = fi.pointSize();
file.writeBlock( (char *)r1, sizeof(int) );
r1 = fi.weight();
diff -ur kcdlabel-2.13-KDE3.bak/kcdlabel/psocket.cpp 
kcdlabel-2.13-KDE3/kcdlabel/psocket.cpp
--- kcdlabel-2.13-KDE3.bak/kcdlabel/psocket.cpp 2005-03-01 08:26:27.0 
+0100
+++ kcdlabel-2.13-KDE3/kcdlabel/psocket.cpp 2005-05-05 14:39:17.423370008 
+0200
@@ -102,11 +102,11 @@
 /** write a block of data of maximum len bytes */
 int PSocket::writeBlock(char * buffer, int len)
 {
-char *msg = NULL;
+char *msg = (char*)malloc(len+2);
 if ( State!=StateType(CONNECTED))
return -1;
 
-   snprintf(msg, len, %s\n, buffer);
+   snprintf(msg, len+1, %s\n, buffer);
 // int r = send(sockfd, buffer, len, MSG_NOSIGNAL );

fprintf(sk, %s\n, msg);


But given the quality of the code I've seen during my search I would
really recommend to remove this package instead. The whole thing just
screems for segfaults and I doubt this were the lasts to be found...

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#276103: kcdlabel: crash on save

2005-05-05 Thread Stephen Gran
This one time, at band camp, Frank Lichtenheld said:
 Actually a gdb backtrace on a unstripped kcdlabel pointed me to the
 right locations. The following patch seems to fix both segfaults:

Also good :)

 But given the quality of the code I've seen during my search I would
 really recommend to remove this package instead. The whole thing just
 screems for segfaults and I doubt this were the lasts to be found...

Yeah - it's full of unchecked actions, that could lead to a segfault if
something goes wrong.  OTOH, it was my first Debian package, and I do
feel a little sentimental :)

Thanks very much for your checking into this.  I'll upload the fixed
version, forward the patch upstream, and have a hard think about
removing it.

Take care,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgp09SxaIkSA4.pgp
Description: PGP signature


Bug#276103: kcdlabel: crash on save

2005-03-30 Thread Stephen Gran
On Tue, Mar 29, 2005 at 02:04:37PM -0600, Chris Weiss said:
 that's easy enough :)
 
 still crashes :/

Damn.  And to add to it, I can no longer reproduce it here :(

Are you able to rebuild with debugging, and do some tests?  Or I can
send you a .deb with unstripped binaries so the gdb output is useful.

Thanks again,
-- 
 --
|  Stephen Gran  | Schshschshchsch.   -- The Gorn, |
|  [EMAIL PROTECTED] | Arena, stardate 3046.2|
|  http://www.lobefin.net/~steve | |
 --


pgpldahi315Xa.pgp
Description: PGP signature


Bug#276103: kcdlabel: crash on save

2005-03-30 Thread Stephen Gran
This one time, at band camp, Chris Weiss said:
 well, gentoo's works.  from the about box it's version 2.12(k3)

This suggests my first guess was correct, and it is some library issue.
Damnit.  That will certainly make it harder to track down.  Does ldd
output look different between gentoo and debian?

Can you try copying libraries (make backups first!) from the gentoo box
to the debian one until it no longer segfaults, and then we can figure
out which is problematic.  Assuming, of course, that you're willing to
go that much effort :)

Thanks again,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgpAeQPFctwCK.pgp
Description: PGP signature


Bug#276103: kcdlabel: crash on save

2005-03-30 Thread Stephen Gran
On Wed, Mar 30, 2005 at 07:32:44PM -0600, Chris Weiss said:
 well, I'm not using debian at home any more, and at work I don't realy
 have time to compile it.
 
 I'm using gentoo at home now (better amd64 suppport than debian). 
 unfortunatly i disabled aRts when I compiled kde, the configure for
 kcdlabel requires aRts, and now I have to rebuild kde.  this could
 take a while.

Don't kill yourself, unless you want to :)

I suspect that we are triggering some wierdness in the qt libraries, or
(possibly) some inter-library dependency bug like qt = libfoo1, but kde
= libfoo2 .  I have not actually found evidence of this, you
understand, but this is my gut feeling for why it can be so totally
unreproducible for me but consistent for you.

Thanks again for your help so far,
-- 
 --
|  Stephen Gran  | To be great is to be misunderstood.   - |
|  [EMAIL PROTECTED] | - Ralph Waldo Emerson   |
|  http://www.lobefin.net/~steve | |
 --


pgpiGmOnJLYlF.pgp
Description: PGP signature


Bug#276103: kcdlabel: crash on save

2005-03-29 Thread Stephen Gran
Hi there,

The (hopefully) fixed version finally made it into sarge.  Can you give
it a try and see if it still crashes on save?

Thanks,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgp318AxEpqZ2.pgp
Description: PGP signature


Bug#276103: kcdlabel: crash on save

2005-02-28 Thread Stephen Gran
This one time, at band camp, Stephen Gran said:
 This one time, at band camp, Chris Weiss said:
  #16 0x40eac3af in QFile::writeBlock () from /usr/lib/libqt-mt.so.3
 
 So QFile::writeblock caused a segfault.

Aha.  Foolish me.  QFile::writeBlock takes a parameter that was being
silently discarded.  I have uploaded a version that (I hope) does the
right thing.  It appears to work here, so I have hopes that it is
corrected for you as well.

However, it will be some time before it makes it into sarge - it has a
giant dependancy tree, being a KDE app, and so a bug in any of a hundred
packages could keep it out of sarge for some time.  Later today, the
source apckage will be available in sid, and I would greatly appreciate
it if you could try grabbing the new source and compiling it to try it
out.

The way to do this is to download the full source package
(.orig.targ.gz, .dsc, and .diff.gz), and then

dpkg-source -x kcdlabel_2.12-KDE3-3.dsc
apt-get build-dep kcdlabel
cd kcdlabel-2.12-KDE3
fakeroot debian/rules binary
dpkg -i ../kcdlabel_2.12-KDE3-3_i386.deb

Thanks a lot,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgpbTypS46knT.pgp
Description: PGP signature