From kde-pim Mon Nov 22 23:11:51 2010 From: David Jarvie Date: Mon, 22 Nov 2010 23:11:51 +0000 To: kde-pim Subject: [Kde-pim] Re: Frequent crashes in EntityTreeModel and other library Message-Id: <201011222312.04502.djarvie () kde ! org> X-MARC-Message: https://marc.info/?l=kde-pim&m=129046769926397 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0118277918==" --===============0118277918== Content-Type: multipart/signed; boundary="nextPart2006290.qlkfpdvYYV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2006290.qlkfpdvYYV Content-Type: multipart/mixed; boundary="Boundary-01=_6iv6Mf4jkErtFS8" Content-Transfer-Encoding: 7bit --Boundary-01=_6iv6Mf4jkErtFS8 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 22 November 2010 14:09:43 Stephen Kelly wrote: > David Jarvie wrote: >=20 > > On Mon, November 22, 2010 12:37 pm, Stephen Kelly wrote: > >> Stephen Kelly wrote: > >> > >>> David Jarvie wrote: > >>> > >>>> When built to use Akonadi, KAlarm very frequently crashes during its > >>>> startup. Most of the crashes, which are individually non-reproducibl= e, > >>>> occur during initialisation of the Akonadi models, including > >>>> EntityTreeModel. The majority of times, no crash dialog is displayed, > >>>> so > >>>> I can't investigate those crashes. Some crashes also occur when even= ts > >>>> are added or removed subsequently. > >>>> > >>>> I'm quite concerned that unless things improve a lot, the Akonadi > >>>> version > >>>> of KAlarm in 4.6 will be quite unstable. I've fixed various bugs in = the > >>>> KAlarm code itself, but most of the remaining crashes for which I ha= ve > >>>> traces, like the attached one, occur at a low level inside the Akona= di > >>>> models or kdeui models. As a result, they aren't easy to debug, and > >>>> suggest that the fault probably lies in the library classes rather t= han > >>>> in the application. > >>>> > >>>> I'd like to help fix these crashes, if somebody could tell me what e= lse > >>>> I > >>>> can do to track them down. > >>>> > >>>> I attach a trace from the latest crash in KSelectionProxyModel / > >>>> EntityTreeModel. > >>>> > >>> > >>> I tried KAlarm today and after adding a single collection and a single > >>> item I get a crash on start up in the TemplateListModel. > >>> > >>> I don't know my way around the code, and there are a lot of singleton= s, > >>> which makes it hard to know where the class is actually instantiated = for > >>> the first time. That makes it hard to make a minimal test case. > >>> > >>> If you can find a way to make minimal test cases the bugs can be fixe= d, > >>> but the current KAlarm code seems very tied together to me at the > >>> moment. > >> > >> Actually the crash I'm getting is a bug in Qt regarding the column > >> filtering that the TemplateListModel does. > >> > >> I have a unit test for it now at least. > >=20 > > Hi Steve, > >=20 > > Thanks for your response. I'll look for a few simple KAlarm configurati= ons > > to find some which crash frequently, and post them here. Normally I tend > > to test with only a single enabled active alarm calendar, containing one > > or two alarms. Usually the alarms are recurring, since these persist af= ter > > triggering, saving the need to re-create them frequently. That > > configuration often produces crashes on startup, but I'll look into act= ual > > configurations for testing. >=20 > That would help. I've just been creating alarms and collections and templ= ate=20 > collections (though I couldn't figure out how to put something in there) = and=20 > archived alarms (though I couldn't figure out how to put something in=20 > there). >=20 > I tried inserting and removing them and couldn't make it crash. Hi Steve, I attach two example calendars which caused startup crashes. I configured a= single Active Alarms calendar as the file /tmp/x.ics. The only other calen= dar configured was an Archived Alarms calendar, /tmp/arch.ics, which was em= pty. I've attached the KAlarm config file just in case it matters (although= the collection IDs in it would need changing). Attachment x1.ics: crashed multiple times in succession on startup before f= inally starting successfully. I started KAlarm after the "daily" alarm was = due, but before the "display" alarm was due. On one occasion I ran KAlarm u= nder gdb, but the crash trace was useless. In no case did I get a crash dia= log. Attachment x2.ics: also crashes most times on startup, again without a cras= h dialog. This is actually the updated x1.ics calendar after the "daily" al= arm triggers. Both alarms were due the next day when KAlarm started. Again,= running under gdb the crash trace was useless. If KAlarm is built in debug mode (as I'm sure it will be), you may find the= --test-set-time command line option useful to fake the system time. To rep= licate what I did (after setting up the Akonadi calendars), start KAlarm as= follows:=20 kalarm --test-set-time "2010-11-22-22:45 UTC" Thanks, David. =2D-=20 David Jarvie. KDE developer. KAlarm author -- http://www.astrojar.org.uk/kalarm --Boundary-01=_6iv6Mf4jkErtFS8 Content-Type: text/calendar; charset="UTF-8"; name="x1.ics" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="x1.ics" BEGIN:VCALENDAR PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN VERSION:2.0 X-KDE-KALARM-VERSION:2.2.9 BEGIN:VEVENT CREATED:20101122T220425Z X-KDE-KALARM-TYPE:ACTIVE DTSTAMP:20101122T203835Z UID:7b62a7b2-00b9-4ae5-8571-630a6d7c910e LAST-MODIFIED:20101122T203835Z DTSTART:20101123T203900Z TRANSP:TRANSPARENT BEGIN:VALARM DESCRIPTION:display ACTION:DISPLAY TRIGGER;VALUE=DURATION:PT0S X-KDE-KALARM-FONTCOLOR:#f7e6e6;#181615; X-KDE-KCALCORE-ENABLED:TRUE END:VALARM END:VEVENT BEGIN:VEVENT CREATED:20101122T220425Z X-KDE-KALARM-NEXTRECUR:20101122T220500 X-KDE-KALARM-TYPE:ACTIVE DTSTAMP:20101122T220423Z UID:6220383d-77eb-4d0c-a66b-78c846c035cb LAST-MODIFIED:20101122T220425Z RRULE:FREQ=DAILY DTSTART:20101122T220500Z TRANSP:TRANSPARENT BEGIN:VALARM DESCRIPTION:daily ACTION:DISPLAY TRIGGER;VALUE=DURATION:PT0S X-KDE-KALARM-FONTCOLOR:#f7e6e6;#181615; X-KDE-KCALCORE-ENABLED:TRUE END:VALARM END:VEVENT END:VCALENDAR --Boundary-01=_6iv6Mf4jkErtFS8 Content-Type: text/calendar; charset="UTF-8"; name="x2.ics" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="x2.ics" BEGIN:VCALENDAR PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN VERSION:2.0 X-KDE-KALARM-VERSION:2.2.9 BEGIN:VEVENT CREATED:20101122T223903Z X-KDE-KALARM-TYPE:ACTIVE DTSTAMP:20101122T203835Z UID:7b62a7b2-00b9-4ae5-8571-630a6d7c910e LAST-MODIFIED:20101122T223841Z DTSTART:20101123T203900Z TRANSP:TRANSPARENT BEGIN:VALARM DESCRIPTION:display ACTION:DISPLAY TRIGGER;VALUE=DURATION:PT0S X-KDE-KALARM-FONTCOLOR:#f7e6e6;#181615; X-KDE-KCALCORE-ENABLED:TRUE END:VALARM END:VEVENT BEGIN:VEVENT CREATED:20101122T223903Z X-KDE-KALARM-NEXTRECUR:20101123T223900 X-KDE-KALARM-TYPE:ACTIVE DTSTAMP:20101122T223902Z UID:f66f625d-d94e-44ef-864c-662c5a614c06 LAST-MODIFIED:20101122T223903Z RRULE:FREQ=DAILY DTSTART:20101123T223900Z TRANSP:TRANSPARENT BEGIN:VALARM DESCRIPTION:daily2 ACTION:DISPLAY TRIGGER;VALUE=DURATION:PT0S X-KDE-KALARM-FONTCOLOR:#f7e6e6;#181615; X-KDE-KCALCORE-ENABLED:TRUE END:VALARM END:VEVENT END:VCALENDAR --Boundary-01=_6iv6Mf4jkErtFS8 Content-Type: text/plain; charset="UTF-8"; name="kalarmrc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kalarmrc" [Collections] FavoriteCollectionIds=43,44 FavoriteCollectionLabels=x.ics,arch.ics [Defaults] PreActionErrDontShow=true [EditDialog] Height 800=574 Width 1280=556 [FileMessage] Height 800=279 Width 1280=647 [General] AskResource=false AutoStart=true CmdXTerm=xterm -sb -hold -title %t -e %c TimeZone=UTC [KFileDialog Settings] Height 800=450 Recent Files[$e]=$HOME/.kde4.4/share/apps/kalarm/calendar.ics,/tmp/cal.ics,/tmp/x.ics Width 1280=720 [MainWindow] Height 800=245 Splitter 1280=183 State=AAAA/wAAAAD9AAAAAAAAAnoAAADAAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA ToolBarsMovable=Disabled Width 1280=634 [MainWindow][Toolbar mainToolBar] ToolButtonStyle=IconOnly [Notification Messages] AskAutoStart= ConfirmAlarmDeletion=true EmailQueuedNotify=false QuitWarn=true [PrefDialog] Height 800=545 Width 1280=638 [Recent Dirs] exportalarms[$e]=file:///tmp/,$HOME/ [ShowOpts] EditMore=true [View] ShowAlarmTime=true ShowArchivedAlarms=true ShowResources=true ShowTimeToAlarm=false --Boundary-01=_6iv6Mf4jkErtFS8-- --nextPart2006290.qlkfpdvYYV Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkzq+LoACgkQTGZ1gSTAjlNxWgCfeiCo3vVMEa7Zbo4v7yunsXGo RHkAn1jNDv/zqeBixDBVtvNy+fpo2AkR =OD/8 -----END PGP SIGNATURE----- --nextPart2006290.qlkfpdvYYV-- --===============0118277918== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KDE PIM mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim KDE PIM home page at http://pim.kde.org/ --===============0118277918==--