todays bug report no 1
Christian Couder
christian at alcove.fr
Thu Mar 15 10:36:20 UTC 2001
Hi Roland and Falk,
Roland Krause wrote:
>
> Today I am trying something new.
> I created a little standard test project, with the current
> KDevelop version. Yes this actually still works :-)
>
> When I close on of the source file, say e.g. main.cpp, and
> reopen it immediately after that by clickin on the file in
> the Files tab, kdeveleop crashes as follows:
>
> #0 0x59d64 in CKDevelop::switchToFile (this=0x2b5bd8, filename={
> static null = {
> static null = <same as static member of an already seen type>,
> d = 0x2783f0, static shared_null = 0x2783f0}, d = 0x3ef6d8,
> static shared_null = 0x2783f0}, line=-1, col=0,
> bForceReload=false,
> bShowModifiedBox=6100544) at ckdevelop_noslot.cpp:862
Yes, I think I understand what happens:
At the beginning of CKDevelop::switchToFile there is:
CEditWidget* pCurEditWidget = m_docViewManager->currentEditView();
and then pCurEditWidget is used like this for example:
if (pCurEditWidget)
editWidgetName = pCurEditWidget->getName(); //FB
but if you set some traces in the right places like :
CEditWidget::~CEditWidget() {
debug("CEditWidget destructor : %d !\n", this);
}
and
CEditWidget* DocViewMan::currentEditView()
{
debug("getting m_pCurEditView : %d !\n", m_pCurEditView);
return m_pCurEditView;
};
you will get something like the following:
getting m_pCurEditView : 138237768 !
CEditWidget destructor : 138237768 !
KWrite destructor !
KWriteView destructor !
KWriteView release buffer !
Switching to file
/import/kde2-devel/kdev1.4/kdevelop/kdevelop/caddnewtranslationdlg.h @
line 32
getting m_pCurEditView : 138237768 !
Here you see that the m_pCurEditView points to a CEditWidget that has
been destroyed before, so we get a beautifull crash !!!
So what is needed to fix this crash is to make sure that all the
m_pCurXXXX are reset to NULL when the object they point to is deleted.
Falk could you do it ?
Regards,
Christian.
-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop-devel
mailing list