Closed Bug 531111 Opened 16 years ago Closed 6 years ago

Gloda requires system SQLite to have FTS3 built, but there is no enforcement or useful error message

Categories

(MailNews Core :: Database, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: nelson18, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009070811 Red Hat/3.0.12-1.el5_3 Firefox/3.0.12 Build Identifier: thunderbird 3.0rc1 This bug is a more general version of Bug 519158 (same-ish error message, but different mechanism to duplicate). In my case, the error is reported at the linux command prompt where thunderbird 3.0rc1 was started and always appears. I built 3.0rc1 and obtained the following on the console when running TB3.0rc1: -- Exception object -- + message (string) 'nounDef is undefined' + fileName (string) 'file://*/usr/local/lib/thunderbird-3.0/modules/gloda/gloda.js' + lineNumber (number) 1828 + stack (string) 440 chars + name (string) 'TypeError' * -- Stack Trace -- gloda_ns_newQuery(103)@file://*/usr/local/lib/thunderbird-3.0/modules/gloda/gloda.js:1828 ContactIdentityCompleter()@file://*/usr/local/lib/thunderbird- 3.0/components/glautocomp.js:197 nsAutoCompleteGloda()@file://*/usr/local/lib/thunderbird-3.0/components/glautocomp.js:501 (null,[object XPCWrappedNative_NoHelper])@file://*/usr/local/lib/thunderbird-3.0/modules/XPCOMUtils.jsm:245 getService()@:0 ()@chrome://messenger/content/search.xml:212 Reproducible: Always Steps to Reproduce: 1. start thunderbird 3.0rc1 from a linux prompt 2. the message appears at the prompt Actual Results: same thing. Expected Results: there shouldn't have been this 'nounDef is undefined' error message. This did not occur in thunderbird 3.0b4. However, diff'ing gloda.js from 3.0b4 and 3.0rc1 says that they are identical. So the problem must be in a calling routine. Here is my .mozconfig file. It is the same that I used with TB3.0b4 mk_add_options MOZ_CO_PROJECT=mail ac_add_options --enable-application=mail mk_add_options MOZ_OBJDIR=/usr/local/src/thunderbird-3.0rc1/obj mk_add_options AUTOCONF=autoconf ac_add_options --prefix=/usr/local ac_add_options --enable-static ac_add_options --with-system-zlib ac_add_options --with-pthreads ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-installer ac_add_options --enable-optimize ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --disable-xprint ac_add_options --disable-strip ac_add_options --disable-install-strip ac_add_options --enable-pango ac_add_options --enable-system-cairo I have not noticed any loss of functionality, but Bug 519158 did from a similar error message. It is unclear if this is the same error or is just the same symptom of different pathways.
Component: General → Database
Product: Thunderbird → MailNews Core
QA Contact: general → database
Version: unspecified → Trunk
This sounds like the search widget is being initialized way in advance of when it is expected to be initialized. Are you sure the search widget in "Search All Messages" mode still has its autocomplete operational after you see this error?
At this point, autocomplete doesn't appear to be operational. Edit | Find | SearchMessages searchforme (in the text box) Search sea (no autocomplete popup)
Sorry for the confusion, I was referring to the search text box on the toolbar that previously was only for quick search. That box has several modes of operation selected by clicking on the magnifying glass icon on its left. When it is in "Search all messages" mode, it has autocomplete functionality (and triggers global searches). When it is in any of the filter modes, it will not have autocomplete. There should never be any autocomplete functionality via the "edit, find, search messages" menu that brings up what we refer to as the 'advanced search window' (which seems odd considering its title is "Search Messages".)
Ah... I can type into that "Search all messages" field, and there is a dropdown that appears below my typing as I type, but it is identical to what I am typing -- no additional characters. Even after a previous search of the same thing. Likewise, once I hit enter, a completely blank screen appears in a new tab.
And when I put in that search text and hit enter, this appears back at the prompt (where I started thunderbird): -- Exception object -- + message (string) 'nounDef is undefined' + fileName (string) 'file:///usr/local/lib/thunderbird-3.0b4/modules/gloda/gloda.js' + lineNumber (number) 1828 + stack (string) 642 chars + name (string) 'TypeError' * -- Stack Trace -- gloda_ns_newQuery(102,[object Object])@file:///usr/local/lib/thunderbird-3.0b4/modules/gloda/gloda.js:1828 GlodaMsgSearcher_buildFulltextQuery()@file:///usr/local/lib/thunderbird-3.0b4/modules/gloda/msg_search.js:268 GlodaMsgSearcher_getCollection()@file:///usr/local/lib/thunderbird-3.0b4/modules/gloda/msg_search.js:304 glodaFacetTabType_openTab([object Object],[object Object])@chrome://messenger/content/glodaFacetTab.js:31 openTab("glodaFacet",[object Object])@chrome://messenger/content/tabmail.xml:511 doSearch()@chrome://messenger/content/search.xml:572 onxblkeypress([object KeyboardEvent])@chrome://messenger/content/search.xml:121 I then "clear" that screen, put in search text again, and the above error stream reappears.
I'll need a debug log. Please go to: https://wiki.mozilla.org/Thunderbird:Using_Gloda and do what the point #2 says. You should then get quite a lot of debug output at startup with hopefully something expressing what is wrong. Please attach the output here.
2009-11-25 16:09:25 gloda.NS INFO Logging Initialized 2009-11-25 16:09:25 gloda.datastore DEBUG Beginning datastore initialization. 2009-11-25 16:09:25 gloda.NS DEBUG Exception during Gloda init (undefined:813): [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFts3Tokenizer.registerTokenizer]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///usr/local/lib/thunderbird-3.0/modules/gloda/datastore.js :: gloda_ds_init :: line 813" data: no] 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/fundattr.js 2009-11-25 16:09:25 gloda.NS INFO Defining noun: mime-type 2009-11-25 16:09:25 gloda.everybody ERROR !!! error loading resource://app/modules/gloda/fundattr.js 2009-11-25 16:09:25 gloda.everybody ERROR (undefined:53) [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///usr/local/lib/thunderbird-3.0/modules/gloda/everybody.js :: loadModule :: line 53" data: no] 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/explattr.js 2009-11-25 16:09:25 gloda.NS INFO Defining noun: tag 2009-11-25 16:09:25 gloda.everybody INFO +++ loaded resource://app/modules/gloda/explattr.js 2009-11-25 16:09:25 gloda.explattr ERROR Error in init: TypeError: this.asyncConnection is null 2009-11-25 16:09:25 gloda.everybody ERROR !!! error initializing resource://app/modules/gloda/explattr.js 2009-11-25 16:09:25 gloda.everybody ERROR (file:///usr/local/lib/thunderbird-3.0/modules/gloda/datastore.js:1118) TypeError: this.asyncConnection is null 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/noun_tag.js 2009-11-25 16:09:25 gloda.everybody INFO +++ loaded resource://app/modules/gloda/noun_tag.js 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/noun_freetag.js 2009-11-25 16:09:25 gloda.NS INFO Defining noun: freetag 2009-11-25 16:09:25 gloda.everybody INFO +++ loaded resource://app/modules/gloda/noun_freetag.js 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/noun_mimetype.js 2009-11-25 16:09:25 gloda.NS INFO Defining noun: mime-type 2009-11-25 16:09:25 gloda.everybody ERROR !!! error loading resource://app/modules/gloda/noun_mimetype.js 2009-11-25 16:09:25 gloda.everybody ERROR (undefined:53) [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///usr/local/lib/thunderbird-3.0/modules/gloda/everybody.js :: loadModule :: line 53" data: no] 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/index_msg.js 2009-11-25 16:09:25 gloda.indexer INFO Registering indexer: index_msg 2009-11-25 16:09:25 gloda.index_msg INFO Event-Driven Indexing is now true 2009-11-25 16:09:25 gloda.everybody INFO +++ loaded resource://app/modules/gloda/index_msg.js 2009-11-25 16:09:25 gloda.everybody INFO ... loading resource://app/modules/gloda/index_ab.js 2009-11-25 16:09:25 gloda.indexer INFO Registering indexer: index_ab 2009-11-25 16:09:25 gloda.everybody INFO +++ loaded resource://app/modules/gloda/index_ab.js 2009-11-25 16:09:25 gloda.abattrs ERROR Error in init: TypeError: this.asyncConnection is null 2009-11-25 16:09:25 gloda.everybody ERROR !!! error initializing resource://app/modules/gloda/index_ab.js 2009-11-25 16:09:25 gloda.everybody ERROR (file:///usr/local/lib/thunderbird-3.0/modules/gloda/datastore.js:1118) TypeError: this.asyncConnection is null -- Exception object -- + message (string) 'nounDef is undefined' + fileName (string) 'file:///usr/local/lib/thunderbird-3.0/modules/gloda/gloda.js' + lineNumber (number) 1828 + stack (string) 440 chars + name (string) 'TypeError' * -- Stack Trace -- gloda_ns_newQuery(103)@file:///usr/local/lib/thunderbird-3.0/modules/gloda/gloda.js:1828 ContactIdentityCompleter()@file:///usr/local/lib/thunderbird-3.0/components/glautocomp.js:197 nsAutoCompleteGloda()@file:///usr/local/lib/thunderbird-3.0/components/glautocomp.js:501 (null,[object XPCWrappedNative_NoHelper])@file:///usr/local/lib/thunderbird-3.0/modules/XPCOMUtils.jsm:245 getService()@:0 ()@chrome://messenger/content/search.xml:212 Note that fundattr.js was indeed installed in the correct location: /usr/local/lib/thunderbird-3.0/modules/gloda/fundattr.js and modules/gloda contains these files: drwxr-xr-x 2 root root 4096 Nov 24 17:22 ./ drwxr-xr-x 4 root root 4096 Nov 24 17:24 ../ -rw-r--r-- 1 root root 28314 Nov 21 18:44 collection.js -rw-r--r-- 1 root root 10330 Nov 21 18:44 connotent.js -rw-r--r-- 1 root root 8860 Nov 21 18:44 databind.js -rw-r--r-- 1 root root 28148 Nov 21 18:44 datamodel.js -rw-r--r-- 1 root root 133829 Nov 21 18:44 datastore.js -rw-r--r-- 1 root root 5389 Nov 21 18:44 dbview.js -rw-r--r-- 1 root root 3141 Nov 21 18:44 everybody.js -rw-r--r-- 1 root root 8221 Nov 21 18:44 explattr.js -rw-r--r-- 1 root root 18411 Nov 21 18:44 facet.js -rw-r--r-- 1 root root 31766 Nov 21 18:44 fundattr.js -rw-r--r-- 1 root root 92095 Nov 21 18:44 gloda.js -rw-r--r-- 1 root root 11130 Nov 21 18:44 index_ab.js -rw-r--r-- 1 root root 127850 Nov 21 18:44 index_msg.js -rw-r--r-- 1 root root 54329 Nov 21 18:44 indexer.js -rw-r--r-- 1 root root 24845 Nov 21 18:44 log4moz.js -rw-r--r-- 1 root root 6066 Nov 21 18:44 mimeTypeCategories.js -rw-r--r-- 1 root root 20358 Nov 21 18:44 mimemsg.js -rw-r--r-- 1 root root 12403 Nov 21 18:44 msg_search.js -rw-r--r-- 1 root root 3888 Nov 21 18:44 noun_freetag.js -rw-r--r-- 1 root root 14785 Nov 21 18:44 noun_mimetype.js -rw-r--r-- 1 root root 4169 Nov 21 18:44 noun_tag.js -rw-r--r-- 1 root root 2543 Nov 21 18:44 public.js -rw-r--r-- 1 root root 25386 Nov 21 18:44 query.js -rw-r--r-- 1 root root 13234 Nov 21 18:44 suffixtree.js -rw-r--r-- 1 root root 8600 Nov 21 18:44 utils.js
(In reply to comment #7) > 2009-11-25 16:09:25 gloda.NS DEBUG Exception during Gloda init > (undefined:813): [Exception... "Component returned failure code: 0x80004005 > (NS_ERROR_FAILURE) [nsIFts3Tokenizer.registerTokenizer]" nsresult: "0x80004005 > (NS_ERROR_FAILURE)" location: "JS frame :: > file:///usr/local/lib/thunderbird-3.0/modules/gloda/datastore.js :: > gloda_ds_init :: line 813" data: no] This is the problem. This should not fail. I wonder if something is trying to use the system SQLite and that lacks FTS3 support?
Yes, that was it. I rebuilt SQlite 3.6.20 with -DSQLITE_ENABLE_FTS3=1 and now Thunderbird 3.0rc1 is happy. Note that FTS3 is disabled by default in SQlite 3.6.20 and has to be explicitly enabled: http://www.sqlite.org/compile.html Thanks.
Should storage/the mozilla platform compel a 'configure' requirement to check for whether FTS3 is enabled if system SQLite is used? (Or should this just be a Thunderbird specific thing?)
Summary: Exception object nounDef is undefined in gloda.js → Gloda requires system SQLite to have FTS3 built, but there is no enforcement or useful error message
Well, we have an xpcshell test for it. If someone wanted to make a configure test, I'd be happy to review it.
(In reply to Shawn Wilsher :sdwilsh from comment #11) > Well, we have an xpcshell test for it. If someone wanted to make a > configure test, I'd be happy to review it. confirming based on above comment
Status: UNCONFIRMED → NEW
Ever confirmed: true
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
Depends on: 1611386

This should be no more a problem now that we stopped supporting system sqlite.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.