Bug 186628 - [PATCH] Plasma segfaults at KDE startup in PanelView::updatePanelGeometry
Summary: [PATCH] Plasma segfaults at KDE startup in PanelView::updatePanelGeometry
Status: RESOLVED DUPLICATE of bug 185736
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-09 10:29 UTC by Christopher January
Modified: 2009-03-09 12:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace showing null-pointer dereference in PanelView::updatePanelGeometry. (8.10 KB, text/plain)
2009-03-09 10:31 UTC, Christopher January
Details
Patch against KDE 4.2.1 (1.30 KB, patch)
2009-03-09 10:31 UTC, Christopher January
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher January 2009-03-09 10:29:47 UTC
Version:            (using KDE 4.2.1)
Compiler:          gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) 
OS:                Linux
Installed from:    Fedora RPMs

I installed KDE 4.2.1-3.FC10 from the kde-redhat kde-testing repository and plasma segfaults when KDE is starting up.

I tracked this down to what appears to be a bug in panelview.cpp:

PanelView::PanelView calls:

pinchContainment(screenRect);    (panelview.cpp:243)

pinchContainment calls QGraphicsWidget::resize which causes
Plasma::Containment::resizeEvent to fire. This in turn calls
Plasma::Applet::itemChange which indirectly calls
PanelView::updatePanelGeometry.

PanelView::updatePanelGeometry references m_strutsTimer
(panelview.cpp:543). But m_strutsTimer is initialised *after* the call
to pinchContainment in PanelView::PanelView.

The attached patch fixes the segfault. I've also attached a backtrace with debugging symbols.
Comment 1 Christopher January 2009-03-09 10:31:06 UTC
Created attachment 31941 [details]
Backtrace showing null-pointer dereference in PanelView::updatePanelGeometry.
Comment 2 Christopher January 2009-03-09 10:31:54 UTC
Created attachment 31942 [details]
Patch against KDE 4.2.1
Comment 3 Nicolas L. 2009-03-09 12:32:04 UTC

*** This bug has been marked as a duplicate of bug 185736 ***