[bt-devel] close presenter bug

bt-devel@crosswire.org bt-devel@crosswire.org
Thu, 7 Jun 2001 11:17:54 +0200 (MEST)


This is a MIME encapsulated multipart message -
please use a MIME-compliant e-mail program to open it.

Dies ist eine mehrteilige Nachricht im MIME-Format -
bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm.

--========GMXBoundary6840991905474
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Kevin,

thanks for this constructive information.
I have not seen this behaviour on my system.
Which KDE/QT version are you using?

If you use configure --enable-debug and recompile, you can
debug BT with KDevelop (frontend to gdb) to see where
the error is. Would be good if we could solve it before 1.0.

Martin

> In the current CVS build of bibletime there is a bug in the
> presenters that can cause a segfault when you choose NONE from the
> module selection button.  I also saw the same behavior in the
> beta1 build.  This happens for all of the
> presenters--CBiblePresenter, CCommentaryPresenter, and
> CLexiconPresenter.  Can anyone else verify this or is this some
> strange behavior for my system.
> 
> If it is verifiable as a bug, I think I have a solution, but as I
> am fairly new to KDE/QT development I am not sure if it is the
> best solution or not.  Basically in CSwordPresenter.cpp if you
> change the line:
> 
> CSwordPresenter::CSwordPresenter(ListCSwordModuleInfo useModules,
> CImportantClasses* importantClasses,QWidget *parent, const char
> *name ) : CPresenter(parent,name) {
> 
> to be:
> 
> CSwordPresenter::CSwordPresenter(ListCSwordModuleInfo useModules,
> CImportantClasses* importantClasses,QWidget *parent, const char
> *name ) : CPresenter(parent,name,0) {
> 
> fixes the problem.  The only change is sending in 0 as the widget
> flag for the CPresenter which then gets used in the KMainWindow
> constructor instead of the default WDestructiveClose.  From
> kmainwindow.h it says:
> 
>  *  Note that a KMainWindow per-default is created with the
>  *  WDestructiveClose flag, i.e. it is automatically destroyed when the
>  *  window is closed. If you do not want this behavior, specify 0 as
>  *  widget flag in the constructor.
> 
> By sending 0 in it thus avoids the destructive close behavior and
> alleviates the segfault problem.  My biggest worry, being less
> than well versed in the kde api, is that by not using
> "destructive close" this is leaving objects and thus memory
> around that are not getting cleaned up properly.
> 
> Any thoughts from those who are a little more knowledgable?  If
> this isn't reproduceable on anyone else's builds, any thoughts as
> to why I may be seeing it?  Thanks.
> 
> Kevin
> 

-- 
Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
--========GMXBoundary6840991905474
Content-Type: application/octet-stream; name="
"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="
"

--========GMXBoundary6840991905474--