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

List:       kde-devel
Subject:    Re: Debugging an IOSlave
From:       Alessandro Praduroux <pradu () thekompany ! com>
Date:       2000-10-28 18:26:39
[Download RAW message or body]

the 19:36, sabato 28 ottobre 2000, Stephan Kulow wrote:
> Alessandro Praduroux wrote:
> > the 23:00, venerd́ 27 ottobre 2000, Waldo Bastian wrote:
> > > On Friday 27 October 2000 06:20, Alessandro Praduroux wrote:
> > > > the Friday 27 October 2000 16:13, David Faure wrote:
> > > > > On Friday 27 October 2000 12:57, Alessandro Praduroux wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > I am the author of KDB (see
> > > > > > http://www.thekompany.com/projects/kdb ) and I am trying to debug
> > > > > > the sql ioslave that is shipped with kdb.
> > > > > >
> > > > > > This is the problem I get:
> > > > > > The ioslave uses the kdbcore library, so it's a DSO that links to
> > > > > > another DSO that loads a plugin through KLibLoader. The first
> > > > > > time an object that refers to some portion of memory allocated in
> > > > > > the plugin gets deleted, I have a sigsev apparently in the
> > > > > > QObject destructor. The same code executed in a standalone
> > > > > > program linked agains kdbcore works flawlessy. Now, I am
> > > > > > completely clueless.
> > >
> > > Just for information:
> > >
> > > The memory map of processes launched as DSO is different from the same
> > > program started as standalone program. If your program uses
> > > uninitialized variables this can lead to a reproducable crash in one
> > > situation while running without problems in the other. It can also lead
> > > to the well known heizenbugs: a program crashing reproducable until you
> > > run it from a debugger.
> > >
> > > Cheers,
> > > Waldo
> >
> > No, this is not the case. The problem is, that deleting a child object in
> > qt leads to a call of QApplication::sendEvent(), that in turn relies on
> > an existing qApp. I had to allocate a QApplication in kdemain to work
> > around this.
> >
> > Is this the correct thing to do when working with object hierarchies or
> > there is another approach to this?
>
> Using QObjects is definitly a tabu in a slave - and even more
> is to allocate a Q/KApplication, slaves are supposed to be
> lightweight and the first iteration didn't even had a working
> X connection.
> What do you need the QObjects anyway?
>
> Greetings, Stephan

The slave uses the kdb library for accessing databases. This library is QT 
based, and all his objects are QObjects.

Some of these objects are KSharedPtr and therefore deleted at the end of a 
function in the slave.

-- 
Pradu
-----------------------------------------
Alessandro Praduroux
pradu@thekompany.com
http://www.thekompany.com

 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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