Bug 186628

Summary: [PATCH] Plasma segfaults at KDE startup in PanelView::updatePanelGeometry
Product: [Unmaintained] plasma4 Reporter: Christopher January <chris>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Backtrace showing null-pointer dereference in PanelView::updatePanelGeometry.
Patch against KDE 4.2.1

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 ***