Closed Bug 1630485 Opened 5 months ago Closed 5 months ago

Intermittent comm/calendar/test/browser/browser_todayPane.js | uncaught exception - TypeError: can't access property "currentTask", this.tree is null at modifyItems@chrome://calendar/content/calendar-task-tree-view.js:88:19

Categories

(Calendar :: Calendar Views, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 77.0

People

(Reporter: intermittent-bug-filer, Assigned: darktrojan)

Details

(Keywords: intermittent-failure)

Attachments

(2 files)

I don't know how we end up with a tree view not attached to a tree, the only explanations I have are that somehow the tree's been removed from the DOM or a new view has been set on it. I can't see how that either of those are possible.

I also can't see why this test is only failing after 16:00 UTC, but it seems that is the case. I can't test this patch properly right now if that really is the case.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9140929 - Flags: review?(paul)

This patch moves browser_timezones.js into a folder of its own. I suspect it is part of the problem with browser_todayPane.js, for two reasons: the weird "this only happens at certain times of day" thing, and because the failure doesn't seem to happen on debug builds, and browser_timezones.js doesn't run on debug builds.

Ideally I'd land these patches separately to confirm one or the other fixes this bug.

Attachment #9140930 - Flags: review?(paul)
Comment on attachment 9140929 [details] [diff] [review]
1630485-this-tree-is-null-1.diff

Review of attachment 9140929 [details] [diff] [review]:
-----------------------------------------------------------------

r+ LGTM. Strange bug. One suggestion for the comment, if you think it would help.

::: calendar/base/content/calendar-task-tree.js
@@ +458,5 @@
>          operation: null,
>  
>          onOperationComplete(opCalendar, status, operationType, id, dateTime) {
> +          if (!this.tree.mTreeView.tree) {
> +            // Looks like we've been disconnected from the DOM, there's no point in continuing.

Maybe add this bug number to the comment?
Attachment #9140929 - Flags: review?(paul) → review+
Comment on attachment 9140930 [details] [diff] [review]
1630485-move-timezones-test-1.diff

Review of attachment 9140930 [details] [diff] [review]:
-----------------------------------------------------------------

r+ LGTM.  (As an aside this test always causes trouble when I run it locally.  It intermittently fails to select some of the timezones in the event timezone dialog menu, gets stuck.  I have it on my list to try and fix that.)

::: calendar/test/browser/timezones/browser_timezones.js
@@ -50,5 @@
>  ];
>  
>  add_task(async function testTimezones1_SetGMT() {
>    Services.prefs.setStringPref("calendar.timezone.local", "Europe/London");
> -  await setCalendarView("day");

Can you say more about why this change?  Just curious.  Also, you could drop the "async" from the function.
Attachment #9140930 - Flags: review?(paul) → review+
Keywords: leave-open

(In reply to Paul Morris [:pmorris] from comment #4)

  • await setCalendarView("day");

Can you say more about why this change? Just curious.

The test will always start in the day view, unless we add more tests to this folder. It was insurance that we were in the right view to begin with. Also, the setCalendarView function is in the head.js file of the folder this used to be in, which we can't easily use from here.

I'm going to check this patch in but not the other, to see if it makes a difference by itself.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7ef1b81d70f7
Move browser_timezones.js to a folder of its own. r=pmorris
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/01f1041e43c5
Stop trying to refresh a task tree that no longer exists. r=pmorris
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 77
You need to log in before you can comment on or make changes to this bug.