latest master

Thiago Macieira thiago at macieira.org
Tue Feb 18 16:25:51 UTC 2014


Em ter 18 fev 2014, às 16:16:10, Dirk Hohndel escreveu:
> On Feb 18, 2014, at 3:47 PM, Tomaz Canabrava <tcanabrava at kde.org> 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.

I'll debug to see what's happening.

> > QSettings s;
> > s.value("lastUsedImageDirectory").toString() or something
> 
> I’ll be happy to look at different implementations, but having spent way too
> much time trying to track this one down, I really want to know why it
> caused the crash in the first place.
> 
> It clearly overwrote private data in the MainWindow object (in the case that
> I can reliably reproduce the ui member of the MainWindow object suddenly
> contained invalid data).
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the subsurface mailing list