Last Comment Bug 760704 - GloDa search stays on "Searching...". Error: ReferenceError: aTab is not defined //app/modules/gloda/datastore.js
: GloDa search stays on "Searching...". Error: ReferenceError: aTab is not de...
Status: VERIFIED FIXED
: regression
Product: Thunderbird
Classification: Client Software
Component: Search (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Thunderbird 16.0
Assigned To: Florian Quèze [:florian] [:flo]
:
Mentors:
Depends on:
Blocks: glodafailtracker 743235 757756
  Show dependency treegraph
 
Reported: 2012-06-01 15:09 PDT by Richard Marti (:Paenglab)
Modified: 2012-06-28 09:02 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
+
fixed


Attachments
Fix (866 bytes, patch)
2012-06-18 07:09 PDT, Florian Quèze [:florian] [:flo]
bugmail: review+
standard8: approval‑comm‑aurora+
Details | Diff | Review

Description Richard Marti (:Paenglab) 2012-06-01 15:09:29 PDT
When I'm doing a GloDa search the first time the Search tab opens but it stays with the text "Searching...".
The error console shows:
Error: ReferenceError: aTab is not defined
Source file: resource://app/modules/gloda/datastore.js
Line: 387

After closing this tab and re-searching the results appearing immediately.
Comment 1 Richard Marti (:Paenglab) 2012-06-01 15:16:26 PDT
When the search is working, I can close and restart TB and it is still working.
I'm not searching a lot but usually when I'm searching this bug occurs. I'll check if after updating Daily the bug appears again.

I'm not sure if this is related because it appears also when the search is working:
Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]
Source file: chrome://messenger/content/search.xml
Line: 120
Comment 2 Florian Quèze [:florian] [:flo] 2012-06-01 15:19:50 PDT
(In reply to Richard Marti [:paenglab] from comment #1)

> I'm not sure if this is related because it appears also when the search is
> working:
> Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005
> (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]
> Source file: chrome://messenger/content/search.xml
> Line: 120

I think it's unrelated. And it's also mentioned in bug 738778.
Comment 3 Richard Marti (:Paenglab) 2012-06-03 05:57:56 PDT
Yesterday after Daily update to 20120602 the search worked. But I reverted to 20120601 again because of the crashes this build had. Today after update to 20120603 the search stayed again on "Searching...". No additional errors to the known in console.
Comment 4 David :Bienvenu 2012-06-04 11:21:04 PDT
I see this as well.
Comment 5 Wayne Mery (:wsmwk, NI for questions) 2012-06-04 11:38:37 PDT
I reproduced this only once out of 5 times. 2012-06-01 build

Timestamp: 6/4/2012 2:31:33 PM
Error: ReferenceError: aTab is not defined
Source File: resource:///modules/gloda/datastore.js
Line: 387

and

2012-06-04 14:31:33	gloda.ds.qfq	ERROR	Exception: ReferenceError: aTab is not defined


xref: bug 523868
Comment 6 Jonathan Protzenko [:protz] 2012-06-04 15:07:10 PDT
Seeing this as well. I'm pretty sure I blew away the Gloda database for that exact reason on this computer, and the problem came back. This is pretty severe, *but* the gloda subsystem is still working as far as I can tell, because Conversations is still able to poke at gloda and make it do stuff.
Comment 7 David :Bienvenu 2012-06-04 15:41:54 PDT
This doesn't feel like gloda corruption - it seems more like a UI issue, perhaps with whatever other tabs or open.
Comment 8 Wayne Mery (:wsmwk, NI for questions) 2012-06-04 16:02:38 PDT
paenglab, is this a regression for you?


(In reply to David :Bienvenu from comment #7)
> This doesn't feel like gloda corruption - it seems more like a UI issue,
> perhaps with whatever other tabs or open.

I agree. I just don't have 100% STR.
Comment 9 Florian Quèze [:florian] [:flo] 2012-06-04 16:18:04 PDT
For what is worth, this error seems to have appeared soon after the check-in of bug 743235. Whether it's a regression from my patch there, or just an existing bug that became more frequent, I don't know (yet!).
Comment 10 Richard Marti (:Paenglab) 2012-06-04 23:05:52 PDT
It's a regression but I can't say since when exactly but after landing of chat.
Comment 11 Ludovic Hirlimann [:Usul] 2012-06-10 23:59:01 PDT
So I tried to figure out how to reproduce and noticed that if the first thing I do after entering my master password is a gloda searh , then the search works.
If I read emails (3 pane mode) or switch folders it might not work. I'm not sure it's relative to tabs as I only had one tab open when I did my tests.
Comment 12 Ludovic Hirlimann [:Usul] 2012-06-11 05:14:20 PDT
*** Bug 757756 has been marked as a duplicate of this bug. ***
Comment 13 Florian Quèze [:florian] [:flo] 2012-06-11 05:31:38 PDT
The duplicate bug 757756 mentions (although not very clearly) Thunderbird 12. If it can actually be reproduced with Tb12, then it can't be a regression from bug 743235 that landed only for Tb15. Also, I wouldn't say for sure that it's a dup if the error "aTab is not defined" isn't present in the Error Console.
Comment 14 Wayne Mery (:wsmwk, NI for questions) 2012-06-12 10:34:45 PDT
(In reply to Florian Quèze from comment #13)
> The duplicate bug 757756 mentions (although not very clearly) Thunderbird
> 12. If it can actually be reproduced with Tb12, then it can't be a
> regression from bug 743235 that landed only for Tb15. Also, I wouldn't say
> for sure that it's a dup if the error "aTab is not defined" isn't present in
> the Error Console.

Yeah, I don't think we can presume they are the same. perhaps related - perhaps someone may be able to sort it out.

More important, this regression needs to be fixed before release of v15, preferably before it goes beta
Comment 15 Wayne Mery (:wsmwk, NI for questions) 2012-06-15 05:51:26 PDT
I've been finding that immediately retrying the search works
Comment 16 Mike Conley (:mconley) - (needinfo me!) 2012-06-17 09:43:15 PDT
I've hit this a few times myself. :/
Comment 17 Florian Quèze [:florian] [:flo] 2012-06-18 07:09:34 PDT
Created attachment 634017 [details] [diff] [review]
Fix

After poking more at the code, it turns out the cause is a trivial mistake in my patch for bug 743235:

It's pretty obvious that http://hg.mozilla.org/comm-central/annotate/d4e85c946f4c/mail/base/content/glodaFacetView.js#l852 isn't what I indented to write, and uses an undefined aTab value.

And now that I know what's broken in the code, I can explain why it was difficult to reproduce this bug consistently: the code path containing the broken line is executed only if the gloda queries complete after the search result tab is fully loaded. Given how slow the search result tab is to load, I would expect the queries to finish later only for large gloda databases and/or on machines with very slow disk I/O. And I guess restarting the same query just worked because in that case the relevant parts of the databases were already cached and didn't require disk I/O.
Comment 18 Florian Quèze [:florian] [:flo] 2012-06-18 14:00:29 PDT
Comment on attachment 634017 [details] [diff] [review]
Fix

[Approval Request Comment]
Trivial fix for a regression caused by bug 743235 that landed for Tb15.
Comment 20 Wayne Mery (:wsmwk, NI for questions) 2012-06-26 05:38:22 PDT
paenglab, all cleared up?  seems so for me. (joy)
Comment 21 Richard Marti (:Paenglab) 2012-06-26 08:14:15 PDT
Yes, it works again with the first try. :)

Note You need to log in before you can comment on or make changes to this bug.