# qgit segfaults after b237b00

3 messages from 2006-09-12 to 2006-09-13. Participants: Andreas Ericsson, Marco Costalba.
Thread: https://gitlist.dev/t/5542

## Andreas Ericsson, 2006-09-12 10:01

Subject: qgit segfaults after b237b00
Message-ID: <45068577.2020608@op5.se>
URL: https://gitlist.dev/e/45068577.2020608%40op5.se

```
What subject says, really. Tried cold cache, hot cache, with and without 
qgit.dat, 3 different repos and 14 different repo-tips. Same result 
every time. A segfault before anything is drawn.

Backtrace isn't very helpful (to me anyways):
#0  0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x458525d2 in QGVector::insert () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#2  0x080aa19a in MainImpl::setupPixmaps (this=0x8191520, h=18)
     at /usr/lib/qt-3.3/include/qptrvector.h:67
#3  0x080b1ad1 in MainImpl::adjustFontSize (this=0x8191520, delta=0)
     at mainimpl.cpp:981
#4  0x080bae05 in MainImpl (this=0x8191520, cd=@0xbf92b094, p=0x0, name=0x0)
     at mainimpl.cpp:142
#5  0x080c4cdf in main (argc=0, argv=0x0) at qgit.cpp:14
(gdb) quit

c++ is a scary thing to me, and my familiarity with QT is akin to the 
common cavemans grasp of piloting fighter-jets. I thus refrain from 
guessing where the problem might be.

qgit-1.5.1 works wonderfully, so I've reset to that and am using it 
meanwhile.

btw, kudos for a great tool.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```

## Marco Costalba, 2006-09-12 17:39

Subject: Re: qgit segfaults after b237b00
Message-ID: <e5bfff550609121039h1ef25bc8y25186c321d555b8e@mail.gmail.com>
URL: https://gitlist.dev/e/e5bfff550609121039h1ef25bc8y25186c321d555b8e%40mail.gmail.com
In-Reply-To: <45068577.2020608@op5.se>

```
Hi Andreas,

On 9/12/06, Andreas Ericsson <ae@op5.se> wrote:
> What subject says, really. Tried cold cache, hot cache, with and without
> qgit.dat, 3 different repos and 14 different repo-tips. Same result
> every time. A segfault before anything is drawn.
>

Sorry but I am not able to reproduce the bug here. Also from the trace I see
that the segfault happens in a part of code that has not been touched
by b237b00.
And that _should_  not segfault in any way.

The code there is the same of qgit-1.5.1 so perhaps could be some
platform related issue,
please write me Qt and gcc versions and processor used and, in case,
do a complete rebuild with also reconfiguration (autoreconf -i).

What about the current qgit HEAD  (6128112f36) , could you reproduce
the bug also there?

>From the trace I see the segfault occurs in main view constructor,
i.e. before to touch anything.
So it is not related to a particular repository.

> c++ is a scary thing to me,

C++ is really scary not because we don't understand the code, but
because we _think_ to understand what the code does ;-)

Principle of least surprise is not exactly one of the design
cornerstones of C++, at least for normal people sense of surprise.

>
> btw, kudos for a great tool.
>
Thanks to you for using it, and reporting bugs.

Any suggestion is very appreciated!

  Marco

```

## Andreas Ericsson, 2006-09-13 08:45

Subject: Re: qgit segfaults after b237b00
Message-ID: <4507C52A.6040902@op5.se>
URL: https://gitlist.dev/e/4507C52A.6040902%40op5.se
In-Reply-To: <e5bfff550609121039h1ef25bc8y25186c321d555b8e@mail.gmail.com>

```
Marco Costalba wrote:
> Hi Andreas,
> 
> On 9/12/06, Andreas Ericsson <ae@op5.se> wrote:
>> What subject says, really. Tried cold cache, hot cache, with and without
>> qgit.dat, 3 different repos and 14 different repo-tips. Same result
>> every time. A segfault before anything is drawn.
>>
> 
> Sorry but I am not able to reproduce the bug here. Also from the trace I 
> see
> that the segfault happens in a part of code that has not been touched
> by b237b00.
> And that _should_  not segfault in any way.
> 
> The code there is the same of qgit-1.5.1 so perhaps could be some
> platform related issue,

Probably, yes. Some more digging indicates it comes from trying to fetch 
the system default-font and setting it as the default application-font.

> please write me Qt and gcc versions and processor used and, in case,
> do a complete rebuild with also reconfiguration (autoreconf -i).
> 

Naturally. Forgot it in the first mail *blush*. Mainly running Fedora 
Core 5, except for the kernel which I compile myself.

nox!exon:~/git/qgit$ gcc --version
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

nox!exon:~/git/qgit$ rpm -q qt
qt-3.3.6-0.4.fc5
nox!exon:~/git/qgit$ uname -a
Linux nox.op5.se 2.6.18-rc6 #1 Wed Sep 6 15:41:35 CEST 2006 i686 i686 
i386 GNU/Linux
nox!exon:~/git/qgit$


Rebuilding with full autoreconf -i does indeed seem to solve the 
problem. I'm guessing some yum update changed the qt-version and the 
configure.cache kept the old settings so that it wasn't checked.

Sorry for the noise.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```
