https://bugs.kde.org/show_bug.cgi?id=362895

--- Comment #3 from Ralf Habacker <ralf.habac...@freenet.de> ---
(In reply to Mark Stanton from comment #0)
> Application: umbrello (2.16.0)
> KDE Platform Version: 4.14.17
> Qt Version: 4.8.7
> Operating System: Linux 4.4.8-200.fc22.x86_64 x86_64
> Distribution: "Fedora release 22 (Twenty Two)"
> 
> -- Information about the crash:
> Clicking on a category in the ER diagram caused Umbrello to crash.
It looks hard to reproduce this issue without detailed information of the
performed steps from umbrello startup on.

Without any further information only the stacktrace can be used to be able to
create a fix:
> #6  0x000000316de8c2e0 in __cxxabiv1::__dynamic_cast(void const*,
> __cxxabiv1::__class_type_info const*, __cxxabiv1::__class_type_info const*,
> ptrdiff_t) (src_ptr=0x3609c30, src_type=0x7bf530 <typeinfo for UMLWidget>,
> dst_type=0x7bbbe8 <typeinfo for ObjectWidget>, src2dst=0) at
> ../../../../libstdc++-v3/libsupc++/dyncast.cc:72
> #7  0x000000000074e925 in UMLScene::onWidgetDestructionBox(QPointF const&)
looking at the related source:
ObjectWidget * UMLScene::onWidgetDestructionBox(const QPointF &point) const
{
    foreach(UMLWidget* obj,  m_WidgetList) {
        ObjectWidget *ow = dynamic_cast<ObjectWidget*>(obj);

According to
http://stackoverflow.com/questions/14243854/c-dynamic-cast-causes-a-segfault-even-when-the-object-that-is-casted-is-not-n
it looks that m_WidgetList contains an already free'd (dangled) pointer, which
fails on the dynamic_cast. 
There are two solutions for this issue: 
1. Find the reason why there is a free'd pointer. This requires detailed
informations how to reproduce the crash.
2. Guard m_WidgetList to not hold dangled pointers by using QPointer.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to