Summary: | kontact crash alone, after a certain time | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Bruno Friedmann <bruno> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bruno, smartins |
Priority: | NOR | ||
Version: | 4.6 pre | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
Bruno Friedmann
2010-12-02 14:00:52 UTC
*** Bug 258670 has been marked as a duplicate of this bug. *** Created attachment 54058 [details]
New crash information added by DrKonqi
korganizer (4.6 pre- ()) on KDE Platform 4.5.80 (4.6 Beta1) using Qt 4.7.1
- What I was doing when the application crashed:
Ok this time I launch only korganizer alone to be sure it that component that crash.
As far I can remember the only thing I change after the 4.6 upgrade was activating the auto backup export in html
every 99 minutes, and that exactly the time after korganizer crash.
With the "ask for delete" checked
First question : why only 99 in the select box, and not 120 minutes ?
-- Backtrace (Reduced):
#6 ref (this=0x47bab70) at /usr/include/QtCore/qatomic_x86_64.h:121
#7 QString (this=0x47bab70) at /usr/include/QtCore/qstring.h:729
#8 outputFile (this=0x47bab70) at /usr/src/debug/kdepim-4.5.80/build/korganizer/htmlexportsettings.h:208
#9 KOrg::HtmlExportJob::finishExport (this=0x47bab70) at /usr/src/debug/kdepim-4.5.80/korganizer/htmlexportjob.cpp:150
#10 0x00007fe97807b173 in KOrg::HtmlExportJob::receivedOrganizerInfo (this=0x47bab70, job=<value optimized out>) at /usr/src/debug/kdepim-4.5.80/korganizer/htmlexportjob.cpp:141
Can you get a valgrind report? valgrind korganizer --nofork &> valgrind.out and wait for it to crash, maybe try reducing the frequency from 99, to 1, so you make it crash quicker. Can't reproduce with current master. commit 87b008b02edeab2ae50944eb29efe78e13e49c9d branch master Author: Sergio Martins <iamsergio@gmail.com> Date: Fri Dec 31 00:49:10 2010 +0000 Not a good idea to pass a local variable reference to a class with async API. When the job finishes, the variable is already scoped out and destroyed. Fixes crash in HTML exporting. BUG: 258560 diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp index ab56443..fc2bd8d 100644 --- a/korganizer/actionmanager.cpp +++ b/korganizer/actionmanager.cpp @@ -40,7 +40,6 @@ #include "kowindowlist.h" #include "reminderclient.h" #include "akonadicollectionview.h" -#include "htmlexportjob.h" #include "htmlexportsettings.h" #include <KCalCore/FileStorage> @@ -1180,27 +1179,28 @@ bool ActionManager::saveURL() void ActionManager::exportHTML() { - HTMLExportSettings settings( "KOrganizer" ); + HTMLExportSettingsPtr settings( new HTMLExportSettings( "KOrganizer" ) ); // Manually read in the config, because parametrized kconfigxt objects don't // seem to load the config theirselves - settings.readConfig(); + settings->readConfig(); const QDate qd1 = QDate::currentDate(); QDate qd2 = qd1; - if ( settings.monthView() ) { + if ( settings->monthView() ) { qd2.addMonths( 1 ); } else { qd2.addDays( 7 ); } - settings.setDateStart( QDateTime( qd1 ) ); - settings.setDateEnd( QDateTime( qd2 ) ); - exportHTML( &settings ); + settings->setDateStart( QDateTime( qd1 ) ); + settings->setDateEnd( QDateTime( qd2 ) ); + exportHTML( settings ); } -void ActionManager::exportHTML( KOrg::HTMLExportSettings *settings ) +void ActionManager::exportHTML( const KOrg::HTMLExportSettingsPtr &settings ) { if ( !settings || settings->outputFile().isEmpty() ) { + kWarning() << "Settings is null, or the output file is empty " << settings.data(); return; } diff --git a/korganizer/actionmanager.h b/korganizer/actionmanager.h index 0bc744f..07a7812 100644 --- a/korganizer/actionmanager.h +++ b/korganizer/actionmanager.h @@ -30,6 +30,7 @@ #include "korganizer_export.h" #include "korganizer/part.h" +#include "htmlexportjob.h" #include <KCalCore/Incidence> @@ -127,7 +128,7 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject bool saveAsURL( const KUrl &kurl ); void exportHTML(); - void exportHTML( KOrg::HTMLExportSettings * ); + void exportHTML( const KOrg::HTMLExportSettingsPtr & ); void toggleMenubar( bool dontShowWarning = false ); public: diff --git a/korganizer/htmlexportjob.cpp b/korganizer/htmlexportjob.cpp index a599337..54e574e 100644 --- a/korganizer/htmlexportjob.cpp +++ b/korganizer/htmlexportjob.cpp @@ -54,11 +54,12 @@ using namespace KOrg; static QString cleanChars( const QString &txt ); + //@cond PRIVATE class KOrg::HtmlExportJob::Private { public: - Private( CalendarSupport::Calendar *calendar, KOrg::HTMLExportSettings *settings, QWidget *parent ) + Private( CalendarSupport::Calendar *calendar, const HTMLExportSettingsPtr &settings, QWidget *parent ) : mCalendar( calendar ), mSettings( settings ), mParentWidget( parent ), @@ -66,7 +67,7 @@ class KOrg::HtmlExportJob::Private {} CalendarSupport::Calendar *mCalendar; - KOrg::HTMLExportSettings *mSettings; + HTMLExportSettingsPtr mSettings; QWidget *mParentWidget; QMap<QDate,QString> mHolidayMap; qulonglong mSubJobCount; @@ -74,7 +75,7 @@ class KOrg::HtmlExportJob::Private }; //@endcond -HtmlExportJob::HtmlExportJob( CalendarSupport::Calendar *calendar, KOrg::HTMLExportSettings *settings, QWidget *parent ) +HtmlExportJob::HtmlExportJob( CalendarSupport::Calendar *calendar, const HTMLExportSettingsPtr &settings, QWidget *parent ) : KJob( parent ), d( new Private( calendar, settings, parent ) ) { } diff --git a/korganizer/htmlexportjob.h b/korganizer/htmlexportjob.h index a7927ca..aeb5aa9 100644 --- a/korganizer/htmlexportjob.h +++ b/korganizer/htmlexportjob.h @@ -24,13 +24,14 @@ #include <kjob.h> -#include <kcalcore/incidence.h> -#include <kcalcore/event.h> -#include <kcalcore/todo.h> +#include <KCalCore/Incidence> +#include <KCalCore/Event> +#include <KCalCore/Todo> #include <QtCore/QDateTime> #include <QtCore/QString> #include <QtCore/QTextStream> +#include <QSharedPointer> class QTextStream; @@ -42,9 +43,10 @@ namespace CalendarSupport { class Calendar; } -namespace KOrg { +namespace KOrg { class HTMLExportSettings; +typedef QSharedPointer<HTMLExportSettings> HTMLExportSettingsPtr; /** This class provides the functions to export a calendar as a HTML page. @@ -57,7 +59,8 @@ class HtmlExportJob : public KJob /** Create new HTML exporter for calendar. */ - HtmlExportJob( CalendarSupport::Calendar *calendar, HTMLExportSettings *settings, QWidget *parent = 0 ); + HtmlExportJob( CalendarSupport::Calendar *calendar, const HTMLExportSettingsPtr &settings, + QWidget *parent = 0 ); virtual ~HtmlExportJob(); void addHoliday( const QDate &date, const QString &name ); |