Forum
kiravi2012-09-05 21:49:03
When composing the e-mail the moment you enter the To e-mail address/
Prashant39752012-09-24 06:47:10
Me also finding Same Problem.

What is Solution.
mikerobinson2012-10-04 00:41:19
I'm on TB 15.0.1 on Linux and I am experiencing probably a related bug. When I try to insert any quick texts it doesn't work if you have filled in the "To" field. It doesn't do anything at all. As soon as you clear the "To" field, you can insert the quick text perfectly.
roland2012-11-21 20:02:50
hello quicktext author

there's some further debugging info here (i've copied and pasted it below for your convenience):
https://bugzilla.mozilla.org/show_bug.cgi?id=785370#c23

I am not a Thunderbird developer but it appears that the crash has something to do with nsIAddrDatabase::getCardFromAttribute()

Cheers!
...Roland Tanglao, Thunderbird support lead
COPIED AND PASTED
[reply] [-] Comment 23 Mark Banner (:standard8) 2 hours ago

Ok, here's what I get:

object 0x149023610
class 0x106b0cdd0 XPCWrappedNative_NoHelper
flags:
proto <XPC_WN_NoHelper_Proto_JSClass object at 0x1490270a0>
parent <BackstagePass object at 0x149022060>
private 0x12007c320
reserved slots:
0 (reserved) = null
properties:
((Shape *) 0x149021290) enumerate readonly permanent setterOp=0x102cf13f0 JSString* (0x14902c2c0) = jschar * (0x14902c2d0) = "getCardFromAttribute"
: slot 1 = <function getCardFromAttribute at 0x149038e20>

There's two calls to nsIAddrDatabase::getCardFromAttribute in the extension, so that would probably be right.


Martin1232012-11-21 21:22:01
Roland,

it seems that it has to do with the address books. First I uncommented the calls of GetCardFromAttribute, but this did not help. Then I uncommented the code that builds up the list of address books. And now it does not crash anymore, but of course has no access to the address books. Here is the code I uncommented (I am not the quicktext author but I fear Emil Hesslow will not answer):

function wzQuicktextVar()
{
this.mData = {};
this.mWindow = null;

// Need the Main Quicktext component
this.mQuicktext = Components.classes["@hesslow.se/quicktext/main;1"].getService(Components.interfaces.wzIQuicktext);

// Set up the variables for the addressbook
this.mDirectories = [];
this.mDatabases = [];

/* if ("@mozilla.org/abmanager;1" in Components.classes)
{
// In the future it will probably work to do like this:
// var card = dir.cardForProperty(...);
// that means that the database-array is not necessary and
// it will support LDAP and MacOSX address book also

var abManager = Components.classes["@mozilla.org/abmanager;1"].getService(Components.interfaces.nsIAbManager);
var dirs = abManager.directories;
while (dirs.hasMoreElements())
{
var dir = dirs.getNext();
if (dir instanceof Components.interfaces.nsIAbMDBDirectory)
{
this.mDatabases.push(dir.database);
this.mDirectories.push(dir.QueryInterface(Components.interfaces.nsIAbDirectory));
}
}
}
else
{
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
var directory = rdfService.GetResource("moz-abdirectory://").QueryInterface(Components.interfaces.nsIAbDirectory);
var addressBook = Components.classes["@mozilla.org/addressbook;1"].getService(Components.interfaces.nsIAddressBook);

var cn = directory.childNodes;
while (cn.hasMoreElements())
{
var abook = cn.getNext();
if (abook instanceof Components.interfaces.nsIAbDirectory)
{
// abook.URI only exists in 3.0 so fallback so it works on other versions also
var uri = (abook.URI) ? abook.URI : abook.directoryProperties.URI;

try {
this.mDatabases.push(addressBook.getAbDatabaseFromURI(uri));
this.mDirectories.push(abook);
} catch(e) {}
}
}
} */

// Add prefs for preferences
this.mPrefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
this.mPrefBranch = this.mPrefService.getBranch("quicktext.");
}
Martin1232012-11-21 21:35:37
Roland,

it seems that it has to do with the address books. First I uncommented the calls of GetCardFromAttribute, but this did not help. Then I uncommented the code that builds up the list of address books. And now it does not crash anymore, but of course has no access to the address books. Here is the code I uncommented (I am not the quicktext author but I fear Emil Hesslow will not answer):

function wzQuicktextVar()
{
this.mData = {};
this.mWindow = null;

// Need the Main Quicktext component
this.mQuicktext = Components.classes["@hesslow.se/quicktext/main;1"].getService(Components.interfaces.wzIQuicktext);

// Set up the variables for the addressbook
this.mDirectories = [];
this.mDatabases = [];

/* if ("@mozilla.org/abmanager;1" in Components.classes)
{
// In the future it will probably work to do like this:
// var card = dir.cardForProperty(...);
// that means that the database-array is not necessary and
// it will support LDAP and MacOSX address book also

var abManager = Components.classes["@mozilla.org/abmanager;1"].getService(Components.interfaces.nsIAbManager);
var dirs = abManager.directories;
while (dirs.hasMoreElements())
{
var dir = dirs.getNext();
if (dir instanceof Components.interfaces.nsIAbMDBDirectory)
{
this.mDatabases.push(dir.database);
this.mDirectories.push(dir.QueryInterface(Components.interfaces.nsIAbDirectory));
}
}
}
else
{
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
var directory = rdfService.GetResource("moz-abdirectory://").QueryInterface(Components.interfaces.nsIAbDirectory);
var addressBook = Components.classes["@mozilla.org/addressbook;1"].getService(Components.interfaces.nsIAddressBook);

var cn = directory.childNodes;
while (cn.hasMoreElements())
{
var abook = cn.getNext();
if (abook instanceof Components.interfaces.nsIAbDirectory)
{
// abook.URI only exists in 3.0 so fallback so it works on other versions also
var uri = (abook.URI) ? abook.URI : abook.directoryProperties.URI;

try {
this.mDatabases.push(addressBook.getAbDatabaseFromURI(uri));
this.mDirectories.push(abook);
} catch(e) {}
}
}
} */

// Add prefs for preferences
this.mPrefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
this.mPrefBranch = this.mPrefService.getBranch("quicktext.");
}
Martin1232012-11-21 23:50:44
sorry for the double post!

Roland,

I tried to find a minimal code the reproduces the crash. The reduction of the function from above to the following leads to a crash. If I uncomment the line "this.mDatabases.push(dir.database);", it does not crash. Perhaps this helps.

function wzQuicktextVar()
{
this.mData = {};
this.mWindow = null;

// Need the Main Quicktext component
this.mQuicktext = Components.classes["@hesslow.se/quicktext/main;1"].getService(Components.interfaces.wzIQuicktext);

// Set up the variables for the addressbook
this.mDirectories = [];
this.mDatabases = [];

if ("@mozilla.org/abmanager;1" in Components.classes)
{

var abManager = Components.classes["@mozilla.org/abmanager;1"].getService(Components.interfaces.nsIAbManager);
var dirs = abManager.directories;
while (dirs.hasMoreElements())
{
var dir = dirs.getNext();
if (dir instanceof Components.interfaces.nsIAbMDBDirectory)
{
this.mDatabases.push(dir.database);
}
}
}
}
walle2012-11-22 02:29:00
great!I have been testing,comment out this line,it works well!
oblong2012-11-22 06:09:26
Ubuntu 12.04; Thunderbird 17.0.

I got a bit confused with people talking about "uncommenting" code when the code referred to looks active in the first place (ie. not "uncommented"). Also, some of the code listed does not seem to match 9.11.3 downloaded today.

Anyway, this is what I did:
1. Download quicktext_0.9.11.3.xpi from the site.
2. Extract the files using an archive manager.
3. Edit the file wzQuicktextVar.js which is in the "components" directory.
4. Line 90 has:
this.mDatabases.push(dir.database);
5. Comment that line by preceeding it with two forward slashes, thus:
// this.mDatabases.push(dir.database);
6. Save the file.
7. Add all files (that is, the directories, chrome, components, etc. and files) to an archive in ZIP format, then change the extension from zip to xpi.
8. Re-install the addon to Thunderbird.


Hope that helps. Thanks to those who debugged this. Of course, I have no idea if this will cause adverse side-effects, but so far it seems to be working for my purposes.

oblong2012-11-22 06:20:35
Ubuntu 12.04; Thunderbird 17.0.

I got a bit confused with people talking about "uncommenting" code when the code referred to looks active in the first place (ie. not "uncommented"). Also, some of the code listed does not seem to match 9.11.3 downloaded today.

Anyway, this is what I did:
1. Download quicktext_0.9.11.3.xpi from the site.
2. Extract the files using an archive manager.
3. Edit the file wzQuicktextVar.js which is in the "components" directory.
4. Line 90 has:
this.mDatabases.push(dir.database);
5. Comment that line by preceeding it with two forward slashes, thus:
// this.mDatabases.push(dir.database);
6. Save the file.
7. Add all files (that is, the directories, chrome, components, etc. and files) to an archive in ZIP format, then change the extension from zip to xpi.
8. Re-install the addon to Thunderbird.


Hope that helps. Thanks to those who debugged this. Of course, I have no idea if this will cause adverse side-effects, but so far it seems to be working for my purposes.

matthewls2012-11-22 06:26:40
oblong: Thanks much for the explanation. I tried editing the file in the .thunderbird/user/extensions/{...} directory, which didn't work. Your method works great. Thanks again!
oblong2012-11-22 08:12:29
http://extensions.hesslow.se/extension/4/Quicktext/ has a new beta verson (right hand side). Seems to work now in Thunderbird 17 (Ubuntu).
GrantHorizons2012-11-22 08:57:46
Thanks oblong, your edit trick works for me.

FWIW - no need ot extract everyhting if oyu're using winzip - just choose edit the file in winzip, it opens your editor, make the change, and winzip puts the file back in with your mod. Change the extension and reinstall.

Works so far for me.

Great to see there is now a new beta for the standard version!

Grant
Martin1232012-11-22 09:07:42
Oblong, sorry for confusing you. I used the wrong word (uncommenting instead of commenting out), unfortunately with a contrary meaning. Fortunately, it directed you to the right line of code.

Martin
GrantHorizons2012-11-22 09:28:15
Emil has just posted a beta, 9.11.4. He wrote me directly in response to my message to him, and asked me to test, so far it's working fine. So he IS on the job!

Grant
Jpsy2012-11-22 09:36:12
Quicktext 0.9.11.4 beta is working in TB17.0 on Win 7 64 too!
lzlhero2012-11-22 11:30:46
I saw the author has fixed the crash issue. And, he has released the 0.9.11.4 version. But, I have payed one day to fixe it based on 0.9.11.3 version. So, I still want to release my modified version which has also fixed the crash issue with different way.

Download it below:
http://www.jsbug.com/download/quicktext.mod.zip
GrantHorizons2012-11-22 20:33:05
Emil has released 9.11.5!
1
Create post
You need to login before posting in the forum