more crashes...

Roland Krause rokrau at yahoo.com
Tue Mar 13 03:28:37 UTC 2001


Falk,
another couple of crashes, this time I send a patch for
ckdevelop_noslot.cpp. 

Same situation as before, start w/ an empty project, hit Save All or
Save As. Bingo! Though no crash handler (or whats that cure little
dragon called again?). 

The attached patch fixes 3 crashes when there is no Project loaded.
After that kdevelop still crashes immediately when trying to save
anything. This time in ckdevelop.cpp when the destructor for
blind_widget is called. 

What is blind_widget good for anyway? This all looks like a pretty evil
hack to me ;-) 

Here is the backtrace: 

#0  0xee5233f4 in QGList::find () from
/devl/rkrause/qt-2.3.0/lib/libqt.so.2
#1  0xee523018 in QGList::remove () from
/devl/rkrause/qt-2.3.0/lib/libqt.so.2
#2  0x18f4a8 in KWriteDoc::removeView (this=0x0, view=0x4a2950)
    at /devl/rkrause/qt-2.3.0/include/qlist.h:64
#3  0x183208 in KWriteView::~KWriteView (this=0x4a2950, __in_chrg=3)
    at kwview.cpp:408
#4  0x1853b0 in KWrite::~KWrite (this=0xefffdff0, __in_chrg=2)
    at kwview.cpp:1491
#5  0x126144 in CEditWidget::~CEditWidget (this=0xefffdff0,
__in_chrg=2)
    at ceditwidget.cpp:89
#6  0x3141c in CKDevelop::slotFileSaveAll (this=0x2b3728) at
ckdevelop.cpp:515
#7  0xee5e5028 in QObject::activate_signal ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#8  0xee618f84 in QSignal::activate ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#9  0xee6b7b7c in QPopupMenu::mouseReleaseEvent ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#10 0xee630420 in QWidget::event () from
/devl/rkrause/qt-2.3.0/lib/libqt.so.2
#11 0xee590088 in QApplication::notify ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#12 0xeea7d744 in KApplication::notify ()
   from /devl/rkrause/kde2/lib/libkdecore.so.3
#13 0xee55d880 in QETWidget::translateMouseEvent ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#14 0xee55aba0 in QApplication::x11ProcessEvent ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#15 0xee5597a0 in QApplication::processNextEvent ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#16 0xee59212c in QApplication::enter_loop ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#17 0xee559714 in QApplication::exec ()
   from /devl/rkrause/qt-2.3.0/lib/libqt.so.2
#18 0xa72b8 in main (argc=2590744, argv=0xefffea18) at main.cpp:118




I'd like to ask you a couple of more general questions: 

In class DocViewMan you have docCount() and countDocs() do you need
them both? What are they really returning? the number of opened
documents including html files? 

Next question: 

In docviewman.cpp line 535: 

  if (pView->inherits("CEditWidget"))
    m_pCurEditView = (CEditWidget*) pView;
  else
    m_pCurBrowserView = (KHTMLView*) pView;
    
how does this work? How can a QWidget inherit from CEditWidget? This is

something I really dont understand and then I am fairly new to Qt so
this may be a well known thing. 

And one more: 
If you do things like 

    (m_docViewManager->currentEditView()->getName()).fileName() 
    
doesnt that lead to very instable code? I mean, we do have no exception
handling at all in place in case one of the returned pointers is 0, do
we? If e.g. we would throw and catch an exception this would
supposently be ok but I believe that because pointers are returned such
constructs are close to "evil"? Maybe? 

Please dont take my questions as personal critique of your coding
style. I know, this could be misunderstood, but I am far from blaming
you. 


Regards
Roland



=====
--
Roland Krause
In the garage of life there are mechanics and 
there are drivers. Mechanics wanted!

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ckdevelop_noslot.cpp.diff
Type: application/x-unknown
Size: 2066 bytes
Desc: ckdevelop_noslot.cpp.diff
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20010312/da43e266/attachment.bin>


More information about the KDevelop-devel mailing list