latest master

Dirk Hohndel dirk at
Tue Feb 18 16:30:01 UTC 2014

On Tue, 2014-02-18 at 16:25 -0800, Thiago Macieira wrote:
> Em ter 18 fev 2014, às 16:16:10, Dirk Hohndel escreveu:
> > On Feb 18, 2014, at 3:47 PM, Tomaz Canabrava <tcanabrava at> wrote:
> > > dirk, can you test the patch? I couldn`t really understand why it crashed
> > > if not static, since we should always have that object. saing that - the
> > > correct way to handle that should be from the Settings, no?
> > The patch does indeed fix things - and I am extremely curious to understand
> > WHY.
> I'm curious too.
> If dive_list() returns a null pointer, it's undefined behaviour to call a 
> member function (lastUsedImageDir). It's technically undefined even to call a 
> static member -- any dereferencing of a null pointer is undefined behaviour. 
> Kernel devs must remember a GCC issue with that.
> Can someone verify whether the pointer was null? It looks unlikely though.

Definitely not null. And adding qDebug() to the lastUsedImageDir()
function I was able to see that it got called. But something in that
process destroyed the MainWindow object. Specifically, returning from
that function appeared to cause bad things to happen inside the
MainWindow object. And Valgrind didn't find ANYTHING.

I can easily reproduce the situation if you want to poke at it on a life
machine :-)

> I'll debug to see what's happening.

Let me know if you need help reproducing the issue


More information about the subsurface mailing list