[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gerbv crashes (was Re: gEDA-user: gerbv 1.0 on RH8)



oooooooooops...  My screen was cluttered with 5-8 different terminals,
applications etc.. I did not see (notice)  a small pop up window where
you can enter SCALE factor.
There is no more mystery regarding "set scale".

Everything on gerbv 1.0 works as advertised. Even creation of PNG output works.
Version 0.16 dumped the core in 20% of cases when I've selected PNG export.

Igor


On Sun, 6 Feb 2005 15:44:52 -0800, primorec <geda.mail@xxxxxxxxx> wrote:
> Yesssssssssssss.... That was it. Changing "1" to "2" did the trick.
> Core dumps is gone...
> "gerbv" works as a charm on RH8.
> 
> I hope that Stefan Petersen (maintainer) will find a time to fix this
> bug in the main gerbv 1.0 tree
> 
> Mario thanks for your help !!
> 
> Regards
> 
> Igor
> 
> P.S: do you know, perhaps, what  "set scale" selection in "Zoom" pull
> down menu does (should do) ?
> When I click on "set scale", nothing happens. The only difference is
> the "gerbv" does not work anymore. It does NOT crash...  simply it
> does not respond anymore to mouse clicks or keyboard selection.
> 
> 
> On Sun, 6 Feb 2005 12:09:12 +0100, Mario Klebsch <mario@xxxxxxxxxx> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi!
> >
> > Am 06.02.2005 um 04:21 schrieb primorec:
> >
> > > (gdb) list
> > > 842         filename = dirname(filename);
> > > 843         if (screen.path)
> > > 844             free(screen.path);
> > > 845         screen.path = (char *)malloc(strlen(filename) + 1);
> > > 846         strcpy(screen.path, filename);
> > > 847         screen.path = strncat(screen.path, "/", 1);
> >
> > This is it (in fact it is a classical one)!
> >
> > strlen(filename) gives the length of filename EXCLUDING the trailing
> > \0. A buffer of size strlen(filename)+1 does have just enough space to
> > include the trailing \0. When appending "/", you write past the end of
> > that buffer. You have to change the +1 to a +2.
> >
> > 73, Mario
> > - --
> > Mario Klebsch                                           mario@xxxxxxxxxx
> > PGP-Key available at http://www.klebsch.de/public.key
> > Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB  1483 30CE 9FB2 A047 9CE0
> >   Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5  8B98 9464 53FF 9382 F518
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.4 (Darwin)
> >
> > iD8DBQFCBfrdMM6fsqBHnOARAuBOAJ9f4Wi2KQApb2gVNOmQo5k8h3R+TgCgtPrd
> > K+xEIl55QGKlkjLBMh88fNw=
> > =rzlz
> > -----END PGP SIGNATURE-----
> >
> >
>