Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Thunderbird segfault after extension reads preferences.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dmr...@gmail.com  
View profile  
 More options Oct 3 2006, 11:01 am
Newsgroups: mozilla.dev.extensions
From: dmr...@gmail.com
Date: 3 Oct 2006 08:01:55 -0700
Local: Tues, Oct 3 2006 11:01 am
Subject: Thunderbird segfault after extension reads preferences.
  While developing an extension for Thunderbird I found that after my
extension reads any preference, thunderbird is not able to show the
contents of any folder any more, and eventually segfaults.  If I try
the same extension in firebird or xulrunner, everything seems to work
ok.
  Of course, I blamed my extension, so I downloaded Mozillazine's
helloworld-tb, added a button to hello.xull that calls a javascript
function to report the value of some preference.  After that
thunderbird behaves as with my extension.
  I've been able to reproduce this problem on all the versions I tried
(1.07, 1.5.x, night-builds, 3.0a1), on several linux distros (debian
unstable, fedora core 3, sles9) on x86 and amd64.
  The Segmentation Fault happens after some javascript exceptions:

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0xc1f30001
(NS_ERROR_NOT_INITIALIZED) [nsIPrefBranch.getBoolPref]"  nsresult:
"0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame ::
chrome://messenger/content/msgMail3PaneWindow.js ::
ScrollToMessageAfterFolderLoad :: line 87"  data: no]
************************************************************
...

Error loading with many headers to download: [Exception... "Component
returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED)
[nsIMsgFolder.updateFolder]"  nsresult: "0x8000ffff
(NS_ERROR_UNEXPECTED)"  location: "JS frame ::
chrome://messenger/content/commandglue.js :: ChangeFolderByURI :: line
221"  data: no]

...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220860224 (LWP 27190)]
0xb4d0b761 in nsMsgDBView::Open (this=0x8c35a00, folder=0x89ed160,
sortType=18, sortOrder=1, viewFlags=0,
    pCount=0xbfa999dc) at nsMsgDBView.cpp:1832
1832        mIsNews = !strcmp("nntp",type.get());
(gdb)

Here's the function that I added to helloworld, and seems to have left
thunderbird in such a bad state:

function colgate()
{
  var m_prefs =
Components.classes["@mozilla.org/preferences-service;1"].createInstance(Com ponents.interfaces.nsIPrefService);

  var m_branch = m_prefs.getBranch( "mail.accountmanager." );
  var sieve_server = m_branch.getCharPref( "accounts" );
  var sieve_port = m_branch.getCharPref( "defaultaccount" );

  alert( "Server: " + sieve_server );
  alert( "Port: " + sieve_port );

  return null;

}

  Am I missing something?  Is this a bug?

Thanks,
Diego.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Oct 3 2006, 11:24 am
Newsgroups: mozilla.dev.extensions
From: Neil <n...@parkwaycc.co.uk>
Date: Tue, 03 Oct 2006 16:24:37 +0100
Local: Tues, Oct 3 2006 11:24 am
Subject: Re: Thunderbird segfault after extension reads preferences.

dmr...@gmail.com wrote:
>var m_prefs =
>Components.classes["@mozilla.org/preferences-service;1"].createInstance(Co mponents.interfaces.nsIPrefService);

Have you never heard of getService?

--
Warning: May contain traces of nuts.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dmr...@gmail.com  
View profile  
 More options Oct 3 2006, 1:33 pm
Newsgroups: mozilla.dev.extensions
From: dmr...@gmail.com
Date: 3 Oct 2006 10:33:28 -0700
Local: Tues, Oct 3 2006 1:33 pm
Subject: Re: Thunderbird segfault after extension reads preferences.

Neil wrote:
> dmr...@gmail.com wrote:

> >var m_prefs =
> >Components.classes["@mozilla.org/preferences-service;1"].createInstance(Co mponents.interfaces.nsIPrefService);

> Have you never heard of getService?

> --
> Warning: May contain traces of nuts.

Thanks a lot, that was it.

Diego


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google