| Summary: | filelight crashes freeing invalid pointer | ||
|---|---|---|---|
| Product: | [Applications] filelight | Reporter: | Tomas Pospisek <tpo_deb> |
| Component: | general | Assignee: | Max Howell <max.howell> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Tomas Pospisek
2006-08-20 10:31:37 UTC
This will be hard to fix without a backtrace, but I'll try to reproduce in the near future. If you can reproduce on a regular basis, a backtrace from a debug compiled Filelight would be excellent thanks :) SVN commit 575695 by mhowell:
BUG: 132679
Maybe fixes this crash on startup. I can't reproduce so I can't be sure.
RC2 will be released tomorrow or today if I have time.
M +15 -9 map.cpp
--- trunk/extragear/utils/filelight/src/part/radialMap/map.cpp #575694:575695
@@ -22,15 +22,15 @@
RadialMap::Map::Map()
-: m_signature( 0 )
-, m_ringBreadth( MIN_RING_BREADTH )
-, m_innerRadius( 0 )
-, m_visibleDepth( DEFAULT_RING_DEPTH )
+ : m_signature( 0 )
+ , m_ringBreadth( MIN_RING_BREADTH )
+ , m_innerRadius( 0 )
+ , m_visibleDepth( DEFAULT_RING_DEPTH )
{
- //FIXME this is all broken. No longer is a maximum depth!
- const int fmh = QFontMetrics( QFont() ).height();
- const int fmhD4 = fmh / 4;
- MAP_2MARGIN = 2 * ( fmh - (fmhD4 - LABEL_MAP_SPACER) ); //margin is dependent on fitting in labels at top and bottom
+ //FIXME this is all broken. No longer is a maximum depth!
+ const int fmh = QFontMetrics( QFont() ).height();
+ const int fmhD4 = fmh / 4;
+ MAP_2MARGIN = 2 * ( fmh - (fmhD4 - LABEL_MAP_SPACER) ); //margin is dependent on fitting in labels at top and bottom
}
RadialMap::Map::~Map()
@@ -146,6 +146,10 @@
size += MAP_2MARGIN;
KPixmap::resize( size, size );
+ // for summary widget this is a good optimisation as it happens
+ if (KPixmap::isNull())
+ return false;
+
if( m_signature != 0 )
{
setRingBreadth();
@@ -292,7 +296,7 @@
{
DEBUG_ANNOUNCE
- if( scaleFactor == 0 ) //just in case
+ if (scaleFactor == 0) //just in case
scaleFactor = 1;
QPainter paint;
@@ -322,6 +326,8 @@
//**** best option you can think of is to make the circles slightly less perfect,
// ** i.e. slightly eliptic when resizing inbetween
+ if (KPixmap::isNull())
+ return;
paint.begin( this );
Confirming: this one is fixed too. Thanks. |