[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: segfault in OPStatusBarManager::registerClient()
From:       Simon Hausmann <tronical () gmx ! net>
Date:       1999-06-24 12:46:47
[Download RAW message or body]

On Thu, 24 Jun 1999, Simon Hausmann wrote:

> On Thu, 24 Jun 1999, Michael Koch wrote:
> 
> > HI,
> > 
> > 
> > I tried to use a Statusbar in my apps, but it segfaults.
> > 
> > The first registering is ok. but if I start my app and the loading a file via
> > the file menu the statusbar gets registered the second time. Then it segfaults
> > in OPStatusBarManager::registerClient(). I donīt know much about OP and I have
> > all done like Simon wrote it in his great KOM/OP-HOWTO.
> > 
> > Can anybody help my to find this bug. I wondered why noone is using a statusbar
> > in his/her app. Now I know.   ;-)
> 
> OPStatusBar is successfully used in KoHTML and in Konqueror..
> 
> but I'll look into it.

Uhm, before I start digging into kformeditor: I saw a lot of plain
m_vStatusBar->something() calls. Make sure to check agains nil before
doing invokations, because the shell might say: Hey, I don't want any part
to display a statusbar, and the m_vStatusBar will always be nil. The shell
can do this by leaving out the creation of the statusbarmanager. This is
usually done in the shell constructor, via (void)opStatusBarManager() ,
which, in contrary to the interface method, creates a new statusbar
manager if it doesn't exist yet (OPMainWindowIf::statusBarManager()
instead doesn't automatically allocate one) .

Ciao,
  Simon

--
Simon Hausmann       <hausmann@kde.org>
http://www.kde.org/  <tronical@gmx.net>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic