[KPhotoAlbum] [PATCH]: fix crash related to annotation dialog (was: Re: Please Read - Release procedure started (new snapshot))
Martin Hoeller
martin at xss.co.at
Wed Mar 15 16:14:53 GMT 2006
On 13 Mär 2006, Martin Hoeller wrote:
> The bad news: I found another one ;-) Selecting Options -> Reset Layout in
> the search dialog closes the dialog window but doesn't re-enable the mouse
> in the main window. A click (exactly a try to select a time region) on the
> timebar even crashes KPhotoAlbum.
I found out, this has actually nothing to do with the Reset Layout button.
If a Search Dialog is open, the events for selecting a region in the date
bar are not filtered, and the DateBar::MouseHandler is called from a NULL
pointer somewhere:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 6680)]
0x08111c19 in DateBar::MouseHandler::endAutoScroll (this=0x0)
at MouseHandler.cpp:51
51 _autoScrollTimer->stop();
(gdb) bt
#0 0x08111c19 in DateBar::MouseHandler::endAutoScroll (this=0x0) at MouseHandler.cpp:51
#1 0x0810cdf8 in DateBar::DateBar::mouseMoveEvent (this=0x82eb3c8, event=0xbfffe374) at DateBar.cpp:438
#2 0x40caae30 in QWidget::event () from /usr/lib/libqt-mt.so.3
#3 0x40c05698 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#4 0x40c05c6b in QApplication::notify () from /usr/lib/libqt-mt.so.3
#5 0x407ecd4e in KApplication::notify () from /usr/lib/libkdecore.so.4
#6 0x40b95653 in QApplication::sendSpontaneousEvent () from /usr/lib/libqt-mt.so.3
#7 0x40b90ae4 in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3
#8 0x40b8edbe in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#9 0x40ba88c0 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#10 0x40c1dda2 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#11 0x08156bb9 in AnnotationDialog::AnnotationDialog::exec (this=0xbfffe9c0) at AnnotationDialog.cpp:538
#12 0x08155b2f in AnnotationDialog::AnnotationDialog::search (this=0xbfffe9c0, search=0x8389a4c)
at AnnotationDialog.cpp:443
#13 0x08138568 in Browser::SearchFolder::action (this=0x8389a40) at SearchFolder.cpp:51
#14 0x0813438a in Browser::Browser::select (this=0x8335838, item=0x8303c50)
at Browser.cpp:94
#15 0x08135bc9 in Browser::Browser::qt_invoke (this=0x8335838, _id=57,
_o=0xbfffebc8) at Browser.moc:221
#16 0x40c6fb57 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#17 0x4101593a in QListView::clicked () from /usr/lib/libqt-mt.so.3
[...]
Adding a QEvent::MouseMove to the eventFilter fixed this, but I'm not
quite sure if this is the right way to fix it. As Jesper commented in
AnnotationDialog.cpp an allow-list would be much better. Anyway, here is
the patch that fixes this crash for now:
Index: AnnotationDialog/AnnotationDialog.cpp
===================================================================
--- AnnotationDialog/AnnotationDialog.cpp (revision 518547)
+++ AnnotationDialog/AnnotationDialog.cpp (working copy)
@@ -582,6 +582,7 @@
if ( event->type() != QEvent::MouseButtonPress &&
event->type() != QEvent::MouseButtonRelease &&
event->type() != QEvent::MouseButtonDblClick &&
+ event->type() != QEvent::MouseMove &&
event->type() != QEvent::KeyPress &&
event->type() != QEvent::KeyRelease &&
event->type() != QEvent::ContextMenu )
- martin
--
mailto:martin.hoeller at xss.co.at | Wussten Sie schon: Eine Ampel
http://stud3.tuwien.ac.at/~e9926483 | ist ein kleines grünes Licht,
icq:45563199 | das beim Näherkommen rot wird.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20060315/e1be0f28/attachment.sig>
More information about the Kphotoalbum
mailing list