Version: 1.5.2 (using KDE KDE 3.5.5) Installed from: Debian testing/unstable Packages OS: FreeBSD to procude the crash. - load an jpg image in your paper - press Strg+C (Copy) - press Strg+V (Paste) - Crash
It ist Debian Linux, not FreeBSD...
Can confirm. Here's my (not so detailed) backtrace: (no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". (no debugging symbols found) `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1241913680 (LWP 9796)] [KCrash handler] #6 0xb7ea8dfd in VStrokeFillPreview::drawStroke () from /usr/lib/libkarboncommon.so.0 #7 0xb7eaad3a in VStrokeFillPreview::update () from /usr/lib/libkarboncommon.so.0 #8 0xb7e7c437 in KarbonView::selectionChanged () from /usr/lib/libkarboncommon.so.0 #9 0xb7e7e905 in KarbonView::editPaste () from /usr/lib/libkarboncommon.so.0 #10 0xb7e80cbb in KarbonView::qt_invoke () from /usr/lib/libkarboncommon.so.0 #11 0xb6a6b4b9 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #12 0xb6a6c10d in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #13 0xb72c5699 in KAction::activated () from /usr/kde/3.5/lib/libkdeui.so.4 #14 0xb72c56f1 in KAction::slotActivated () from /usr/kde/3.5/lib/libkdeui.so.4 #15 0xb72c87af in KAction::qt_invoke () from /usr/kde/3.5/lib/libkdeui.so.4 #16 0xb6a6b4b9 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #17 0xb6a6c10d in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #18 0xb70a31d9 in KAccelPrivate::menuItemActivated () from /usr/kde/3.5/lib/libkdecore.so.4 #19 0xb70a3ec7 in KAccelPrivate::emitActivatedSignal () from /usr/kde/3.5/lib/libkdecore.so.4 #20 0xb70a435c in KAccelPrivate::eventFilter () from /usr/kde/3.5/lib/libkdecore.so.4 #21 0xb6a6adb6 in QObject::activate_filters () from /usr/qt/3/lib/libqt-mt.so.3 #22 0xb6a6ae1b in QObject::event () from /usr/qt/3/lib/libqt-mt.so.3 #23 0xb6aa3d1c in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3 #24 0xb6a0c477 in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #25 0xb6a0d688 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #26 0xb701b2be in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4 #27 0xb70a5057 in KAccelPrivate::disconnectKey () from /usr/kde/3.5/lib/libkdecore.so.4 #28 0xb7020d23 in KApplication::x11EventFilter () from /usr/kde/3.5/lib/libkdecore.so.4 #29 0xb699bdc4 in qt_set_x11_event_filter () from /usr/qt/3/lib/libqt-mt.so.3 #30 0xbf94b54c in ?? () #31 0xbf94b478 in ?? () #32 0x00000001 in ?? () #33 0xb6ecb608 in ?? () from /usr/qt/3/lib/libqt-mt.so.3 #34 0xb6ecb608 in ?? () from /usr/qt/3/lib/libqt-mt.so.3 #35 0x00000037 in ?? () #36 0xbf94b368 in ?? () #37 0xb69ab708 in QApplication::x11ProcessEvent () from /usr/qt/3/lib/libqt-mt.so.3 #38 0xb69ab708 in QApplication::x11ProcessEvent () from /usr/qt/3/lib/libqt-mt.so.3 #39 0xb69bc5b1 in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3 #40 0xb6a23001 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3 #41 0xb6a22e86 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3 #42 0xb6a0beff in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3 #43 0xb7f291f5 in kdemain () from /usr/lib/libkdeinit_karbon.so #44 0x080487e2 in ?? () #45 0x00000001 in ?? () #46 0xbf94b6e4 in ?? () #47 0x00000000 in ?? ()
SVN commit 597326 by jaham: Fix crash after copying image. The stroke and fill where not copied, leaving null pointers within the image copy. These let to multiple problems, where a valid fill and stroke was assumed. Added guards all around to check for invalid stroke and fill. BUG:135746 M +7 -0 core/vimage.cc M +4 -0 core/vstroke.cc M +2 -2 core/vstroke.h M +2 -2 dockers/vcolordocker.cc M +4 -1 dockers/vstrokedocker.cc M +24 -18 karbon_view.cc M +11 -6 widgets/vsmallpreview.cc M +16 -9 widgets/vstrokefillpreview.cc M +2 -2 widgets/vstrokefillpreview.h --- branches/koffice/1.6/koffice/karbon/core/vimage.cc #597325:597326 @@ -20,6 +20,7 @@ VImage::VImage( VObject *parent, const QString &fname ) : VObject( parent ), m_image( 0L ), m_fname( fname ) { m_stroke = new VStroke( this ); + m_stroke->setType( VStroke::none ); m_fill = new VFill(); m_image = new QImage( m_fname ); if( m_image->depth() != 32 ) @@ -35,6 +36,12 @@ m_image = new QImage( *other.m_image ); else m_image = 0L; + + if ( other.stroke() ) + setStroke( *other.stroke() ); + if ( other.fill() ) + setFill( *other.fill() ); + m_fname = other.m_fname; m_boundingBox = other.m_boundingBox; m_matrix = other.m_matrix; --- branches/koffice/1.6/koffice/karbon/core/vstroke.cc #597325:597326 @@ -29,6 +29,10 @@ #include "vstroke.h" #include <kdebug.h> +VStroke::VStroke() +: m_parent(0L), m_lineWidth(1.0), m_lineCap(capButt), m_lineJoin(joinMiter), m_miterLimit(10.0), m_type(none) +{} + VStroke::VStroke( VObject* parent, float width, const VLineCap cap, const VLineJoin join, float miterLimit ) { --- branches/koffice/1.6/koffice/karbon/core/vstroke.h #597325:597326 @@ -71,8 +71,8 @@ joinBevel = 2 }; - - VStroke( VObject* parent = 0L, float width = 1.0, const VLineCap cap = capButt, + VStroke(); + VStroke( VObject* parent, float width = 1.0, const VLineCap cap = capButt, const VLineJoin join = joinMiter, float miterLimit = 10.0 ); VStroke( const VColor &c, VObject* parent = 0L, float width = 1.0, const VLineCap cap = capButt, const VLineJoin join = joinMiter, float miterLimit = 10.0 ); --- branches/koffice/1.6/koffice/karbon/dockers/vcolordocker.cc #597325:597326 @@ -243,8 +243,8 @@ { VObject *obj = m_part->document().selection()->objects().getFirst(); - QColor fgColor = QColor(obj->stroke()->color()); - QColor bgColor = QColor(obj->fill()->color()); + QColor fgColor = QColor(obj->stroke() ? obj->stroke()->color() : VColor() ); + QColor bgColor = QColor(obj->fill() ? obj->fill()->color() : VColor() ); mHSVWidget->setFgColor(fgColor); mRGBWidget->setFgColor(fgColor); --- branches/koffice/1.6/koffice/karbon/dockers/vstrokedocker.cc #597325:597326 @@ -188,7 +188,10 @@ void VStrokeDocker::setStroke( const VStroke &stroke ) { - m_stroke = stroke; + if( &stroke ) + m_stroke = stroke; + else + m_stroke = VStroke(); updateDocker(); } --- branches/koffice/1.6/koffice/karbon/karbon_view.cc #597325:597326 @@ -1352,50 +1352,53 @@ void KarbonView::selectionChanged() { - int count = part()->document().selection()->objects().count(); + VSelection *selection = part()->document().selection(); + int count = selection->objects().count(); m_groupObjects->setEnabled( false ); m_closePath->setEnabled( false ); m_ungroupObjects->setEnabled( false ); if( count > 0 ) { - VObject *obj = part()->document().selection()->objects().getFirst(); + VObject *obj = selection->objects().getFirst(); + VFill fill = obj->fill() ? *obj->fill() : VFill(); + VStroke stroke = obj->stroke() ? *obj->stroke() : VStroke(); if ( shell() ) { //if ( this == shell()->rootView() || koDocument()->isEmbedded() ) { - m_strokeFillPreview->update( *obj->stroke(), *obj->fill() ); - m_smallPreview->update( *obj->stroke(), *obj->fill() ); + m_strokeFillPreview->update( stroke, fill ); + m_smallPreview->update( stroke, fill ); //} } - m_strokeDocker->setStroke( *( obj->stroke() ) ); + m_strokeDocker->setStroke( stroke ); if( count == 1 ) { - VGroup *group = dynamic_cast<VGroup *>( part()->document().selection()->objects().getFirst() ); + VGroup *group = dynamic_cast<VGroup *>( selection->objects().getFirst() ); m_ungroupObjects->setEnabled( group ); - VPath *path = dynamic_cast<VPath *>( part()->document().selection()->objects().getFirst() ); + VPath *path = dynamic_cast<VPath *>( selection->objects().getFirst() ); m_closePath->setEnabled( path && !path->isClosed() ); } else m_groupObjects->setEnabled( true ); - part()->document().selection()->setStroke( *obj->stroke() ); - part()->document().selection()->setFill( *obj->fill() ); + selection->setStroke( stroke ); + selection->setFill( fill ); m_setLineWidth->setEnabled( true ); - m_setLineWidth->updateValue( obj->stroke()->lineWidth() ); + m_setLineWidth->updateValue( stroke.lineWidth() ); // dashes m_lineStyleAction->setEnabled( true ); - if( obj->stroke()->dashPattern().array().isEmpty() ) + if( stroke.dashPattern().array().isEmpty() ) m_lineStyleAction->setCurrentSelection( Qt::SolidLine ); - else if( obj->stroke()->dashPattern().array()[ 0 ] == 0. ) + else if( stroke.dashPattern().array()[ 0 ] == 0. ) m_lineStyleAction->setCurrentSelection( Qt::NoPen ); - else if( obj->stroke()->dashPattern().array()[ 0 ] == 2. ) + else if( stroke.dashPattern().array()[ 0 ] == 2. ) m_lineStyleAction->setCurrentSelection( Qt::DotLine ); - else if( obj->stroke()->dashPattern().array().count() == 2 ) + else if( stroke.dashPattern().array().count() == 2 ) m_lineStyleAction->setCurrentSelection( Qt::DashLine ); - else if( obj->stroke()->dashPattern().array().count() == 4 ) + else if( stroke.dashPattern().array().count() == 4 ) m_lineStyleAction->setCurrentSelection( Qt::DashDotLine ); - else if( obj->stroke()->dashPattern().array().count() == 6 ) + else if( stroke.dashPattern().array().count() == 6 ) m_lineStyleAction->setCurrentSelection( Qt::DashDotDotLine ); m_deleteSelectionAction->setEnabled( true ); @@ -1403,9 +1406,12 @@ else { if ( shell() ) + { + VFill fill = selection->fill() ? *selection->fill() : VFill(); + VStroke stroke = selection->stroke() ? *selection->stroke() : VStroke(); //if ( this == shell()->rootView() || koDocument()->isEmbedded() && m_strokeFillPreview ) - m_strokeFillPreview->update( *( part()->document().selection()->stroke() ), - *( part()->document().selection()->fill() ) ); + m_strokeFillPreview->update( stroke, fill ); + } m_lineStyleAction->setEnabled( false ); m_deleteSelectionAction->setEnabled( false ); } --- branches/koffice/1.6/koffice/karbon/widgets/vsmallpreview.cc #597325:597326 @@ -69,11 +69,17 @@ void VSmallPreview::update( const VStroke &s, const VFill &f ) { - m_fill = f; - m_stroke = s; + if( &f ) + m_fill = f; + else + m_fill = VFill(); + if( &s ) + m_stroke = s; + else + m_stroke = VStroke(); - drawStroke( s ); - drawFill( f ); + drawStroke( m_stroke ); + drawFill( m_fill ); } void @@ -98,7 +104,7 @@ fill.setColor( Qt::white ); m_painter->setBrush( fill ); m_painter->drawRect( KoRect( 0, 0, m_fillFrame->width(), m_fillFrame->height() ) ); - + switch ( f.type() ) { case VFill::solid: @@ -194,7 +200,6 @@ m_painter->setBrush( fill ); m_painter->drawRect( KoRect( 0, 0, m_strokeFrame->width(), m_strokeFrame->height() ) ); - switch ( s.type() ) { case VStroke::solid: --- branches/koffice/1.6/koffice/karbon/widgets/vstrokefillpreview.cc #597325:597326 @@ -129,7 +129,7 @@ emit strokeSelected(); } } - update( *m_stroke, *m_fill ); + update( m_stroke, m_fill ); } if( event && event->type() == QEvent::MouseButtonDblClick ) @@ -138,7 +138,7 @@ ex >= FILL_TOPX && ex <= FILL_BOTTOMX && ey >= FILL_TOPY && ey <= FILL_BOTTOMY ) { - VColorDlg* dialog = new VColorDlg( m_fill->color(), this ); + VColorDlg* dialog = new VColorDlg( m_fill.color(), this ); if( dialog->exec() == QDialog::Accepted ) { if( m_part && m_part->document().selection() ) m_part->addCommand( new VFillCmd( &m_part->document(), VFill( dialog->Color() ) ), true ); @@ -149,7 +149,7 @@ ex >= STROKE_TOPX && ex <= STROKE_BOTTOMX && ey >= STROKE_TOPY && ey <= STROKE_BOTTOMY ) { - VColorDlg* dialog = new VColorDlg( m_stroke->color(), this ); + VColorDlg* dialog = new VColorDlg( m_stroke.color(), this ); if( dialog->exec() == QDialog::Accepted ) { if( m_part && m_part->document().selection() ) m_part->addCommand( new VStrokeCmd( &m_part->document(), dialog->Color() ), true ); @@ -164,9 +164,16 @@ VStrokeFillPreview::update( const VStroke &s, const VFill &f ) { m_painter->begin(); - m_fill = &f; - m_stroke = &s; + if( &f ) + m_fill = f; + else + m_fill = VFill(); + if( &s ) + m_stroke = s; + else + m_stroke = VStroke(); + // draw checkerboard VFill fill; m_painter->setPen( Qt::NoPen ); @@ -181,13 +188,13 @@ if ( m_strokeWidget ) { - drawFill( f ); - drawStroke( s ); + drawFill( m_fill ); + drawStroke( m_stroke ); } else { - drawStroke( s ); - drawFill( f ); + drawStroke( m_stroke ); + drawFill( m_fill ); } m_painter->end(); --- branches/koffice/1.6/koffice/karbon/widgets/vstrokefillpreview.h #597325:597326 @@ -65,8 +65,8 @@ QPixmap m_pixmap; KarbonPart *m_part; bool m_strokeWidget; - const VFill *m_fill; - const VStroke *m_stroke; + VFill m_fill; + VStroke m_stroke; }; #endif
You need to log in before you can comment on or make changes to this bug.