Closed Bug 1132553 Opened 9 years ago Closed 7 years ago

[maildir] 0x80004005 failure from getSmartFolderName in folderPane.js

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 615272

People

(Reporter: rkent, Unassigned)

Details

Error console:

Timestamp: 2/12/2015 10:46:42 AM
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2674"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2676

This is running a recent trunk build on a profile using maildir.
IIRC, there's an old bug for mailbox mode too.
http://mxr.mozilla.org/comm-central/source/mail/base/content/folderPane.js#2672
> 2672 function getSmartFolderName(aFolder) {
> 2673   try {
> 2674     return aFolder.getStringProperty("smartFolderName");
> 2675   } catch (ex) {
> 2676     Components.utils.reportError(ex);
> 2677     return null;
> 2678   }

So, I did quick test using Custom Buttons addon.
> var gFolderDisplay   = window["gFolderDisplay"] ;
> var msgFolder        = gFolderDisplay["displayedFolder"] ;
> var selectedMessages = gFolderDisplay["selectedMessages"] ;
> var QQQ;
> try{
>   var smartFolderName = msgFolder.getStringProperty("smartFolderName");
>   Components.utils.reportError("smartFolderName = "+smartFolderName);
> } catch (e) { Components.utils.reportError(e); }
> try{
>   var XXX = msgFolder.getStringProperty("XXX");
>   Components.utils.reportError("XXX = "+XXX);
> } catch (e) { Components.utils.reportError(e); }
> try{
>   var YYY = msgFolder.getStringProperty(null);
>   Components.utils.reportError("YYY = "+YYY);
> } catch (e) { Components.utils.reportError(e); }
> try{
>   var ZZZ = msgFolder.getStringProperty(QQQ);
>   Components.utils.reportError("ZZZ = ????");
> } catch (e) { Components.utils.reportError(e); }
> try{
>   var WWW = msgFolder.getStringPropertyZ("WWW");
>   Components.utils.reportError("WWW = "+WWW);
> } catch (e) { Components.utils.reportError(e); }

Test result was:
> Error: smartFolderName = 
> Source File: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function Line: 10
> 
> Error: XXX = 
> Source File: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function Line: 16
> 
> Error: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function :: anonymous :: line 21"  data: no]
> Source File: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function Line: 24
> 
> Error: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function :: anonymous :: line 27"  data: no]
> Source File: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function Line: 30
> 
> Error: msgFolder.getStringPropertyZ is not a function
> Source File: chrome://custombuttons-context/content/button.js?windowId=Thunderbird&id=custombuttons-button0@code line 1 > Function Line: 33

If specified StringProperty is not defined, null is returned.
Someone put illegal value, such as  0x00, in StringProperty("smartFolderName") of  a msgFolder?
Or msgFolder.getStringProperty is not cleanly initialized as function yet?
Or "some properties of object which msgFolder.getStringProperty() tries to access" is not cleanly initialized yet?

In any case, getSmartFolderName side can do nothing.
I think hook at lower level is needed to analyze.
> http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgFolderCacheElement.cpp#46
> 46 NS_IMETHODIMP nsMsgFolderCacheElement::GetStringProperty
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.