Closed Bug 190215 Opened 22 years ago Closed 22 years ago

[win32 can't handle multi line properties], example: account central won't show when I select a server

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: sspitzer, Assigned: sspitzer)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

account central won't show when I select a server

from the console:

Error loading AccountCentral page -> [Exception... "Component returned failure c
ode: 0x80004005 (NS_ERROR_FAILURE) [nsIPrefBranch.getComplexValue]"  nsresult: "
0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/conten
t/mailWindow.js :: ShowAccountCentral :: line 479"  data: no]
the shiz-nit hit the fiz-an last night.
Flags: blocking1.3b?
Keywords: regression
Target Milestone: --- → mozilla1.3beta
QA Contact: laurel → esther
might be related to something alecf checked in.

nsPersistentProperties::GetStringProperty(nsPersistentProperties * const 
0x058bc238, const nsACString & {...}, nsAString & {...}) line 522
nsStringBundle::GetStringFromName(const nsAString & {...}, nsAString & {...}) 
line 187 + 59 bytes
nsStringBundle::GetStringFromName(nsStringBundle * const 0x0160f630, const 
unsigned short * 0x0012ac6c, unsigned short * * 0x053c3f68) line 260 + 32 bytes
nsPrefBranch::GetDefaultFromPropertiesFile(const char * 0x04b92818, unsigned 
short * * 0x053c3f68) line 855 + 49 bytes
nsPrefBranch::GetComplexValue(nsPrefBranch * const 0x00fc6410, const char * 
0x04b92818, const nsID & {...}, void * * 0x0012b208) line 294 + 39 bytes
XPTC_InvokeByIndex(nsISupports * 0x00fc6410, unsigned int 11, unsigned int 3, 
nsXPTCVariant * 0x0012b1e8) line 102
XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode 
CALL_METHOD) line 2023 + 42 bytes
XPC_WN_CallMethod(JSContext * 0x015a1dc0, JSObject * 0x03592370, unsigned int 
2, long * 0x05927e1c, long * 0x0012b4c4) line 1292 + 14 bytes
js_Invoke(JSContext * 0x015a1dc0, unsigned int 2, unsigned int 0) line 839 + 23 
bytes
js_Interpret(JSContext * 0x015a1dc0, long * 0x0012c30c) line 2803 + 15 bytes
js_Invoke(JSContext * 0x015a1dc0, unsigned int 1, unsigned int 2) line 856 + 13 
bytes
js_InternalInvoke(JSContext * 0x015a1dc0, JSObject * 0x035929c8, long 77631096, 
unsigned int 0, unsigned int 1, long * 0x0012c568, long * 0x0012c438) line 931 
+ 20 bytes
JS_CallFunctionValue(JSContext * 0x015a1dc0, JSObject * 0x035929c8, long 
77631096, unsigned int 1, long * 0x0012c568, long * 0x0012c438) line 3431 + 31 
bytes
nsJSContext::CallEventHandler(nsJSContext * const 0x00fe3778, void * 
0x035929c8, void * 0x04a08e78, unsigned int 1, void * 0x0012c568, int * 
0x0012c56c, int 0) line 1040 + 33 bytes
nsJSEventListener::HandleEvent(nsJSEventListener * const 0x0369c670, 
nsIDOMEvent * 0x04b946b8) line 181 + 77 bytes
nsEventListenerManager::HandleEventSubType(nsListenerStruct * 0x0369c750, 
nsIDOMEvent * 0x04b946b8, nsIDOMEventTarget * 0x04d38a30, unsigned int 8, 
unsigned int 7) line 1216 + 20 bytes
nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x03057b90, 
nsIPresContext * 0x02f5c008, nsEvent * 0x0012cf80, nsIDOMEvent * * 0x0012cefc, 
nsIDOMEventTarget * 0x04d38a30, unsigned int 7, nsEventStatus * 0x0012cfa8) 
line 1826 + 36 bytes
nsXULElement::HandleDOMEvent(nsXULElement * const 0x03057a58, nsIPresContext * 
0x02f5c008, nsEvent * 0x0012cf80, nsIDOMEvent * * 0x0012cefc, unsigned int 7, 
nsEventStatus * 0x0012cfa8) line 3361
nsTreeSelection::FireOnSelectHandler() line 743
nsTreeSelection::Select(nsTreeSelection * const 0x03aef2c8, int 0) line 369
XPTC_InvokeByIndex(nsISupports * 0x03aef2c8, unsigned int 7, unsigned int 1, 
nsXPTCVariant * 0x0012d19c) line 102
XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode 
CALL_METHOD) line 2023 + 42 bytes
XPC_WN_CallMethod(JSContext * 0x015a1dc0, JSObject * 0x0307d348, unsigned int 
1, long * 0x05927bc8, long * 0x0012d478) line 1292 + 14 bytes
js_Invoke(JSContext * 0x015a1dc0, unsigned int 1, unsigned int 0) line 839 + 23 
bytes
js_Interpret(JSContext * 0x015a1dc0, long * 0x0012e2c0) line 2803 + 15 bytes
js_Invoke(JSContext * 0x015a1dc0, unsigned int 1, unsigned int 2) line 856 + 13 
bytes
js_InternalInvoke(JSContext * 0x015a1dc0, JSObject * 0x038bb4e8, long 24677712, 
unsigned int 0, unsigned int 1, long * 0x0012e51c, long * 0x0012e3ec) line 931 
+ 20 bytes
JS_CallFunctionValue(JSContext * 0x015a1dc0, JSObject * 0x038bb4e8, long 
24677712, unsigned int 1, long * 0x0012e51c, long * 0x0012e3ec) line 3431 + 31 
bytes
nsJSContext::CallEventHandler(nsJSContext * const 0x00fe3778, void * 
0x038bb4e8, void * 0x01788d50, unsigned int 1, void * 0x0012e51c, int * 
0x0012e520, int 0) line 1040 + 33 bytes
nsJSEventListener::HandleEvent(nsJSEventListener * const 0x04f2b290, 
nsIDOMEvent * 0x01e723a4) line 181 + 77 bytes
nsXBLPrototypeHandler::ExecuteHandler(nsXBLPrototypeHandler * const 0x036fb5c8, 
nsIDOMEventReceiver * 0x036faea8, nsIDOMEvent * 0x01e723a4) line 455
DoMouse(nsIAtom * 0x02f328e8, nsIXBLPrototypeHandler * 0x036fb5c8, nsIDOMEvent 
* 0x01e723a4, nsIDOMEventReceiver * 0x036faea8) line 116
nsXBLMouseHandler::MouseDown(nsXBLMouseHandler * const 0x03ade0d0, nsIDOMEvent 
* 0x01e723a4) line 121 + 40 bytes
nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x03ade128, 
nsIPresContext * 0x02f5c008, nsEvent * 0x0012f7a4, nsIDOMEvent * * 0x0012f3b4, 
nsIDOMEventTarget * 0x05770b48, unsigned int 7, nsEventStatus * 0x0012f59c) 
line 1306 + 41 bytes
nsXULElement::HandleDOMEvent(nsXULElement * const 0x0369dc20, nsIPresContext * 
0x02f5c008, nsEvent * 0x0012f7a4, nsIDOMEvent * * 0x0012f3b4, unsigned int 7, 
nsEventStatus * 0x0012f59c) line 3361
PresShell::HandleEventInternal(nsEvent * 0x0012f7a4, nsIView * 0x03aded58, 
unsigned int 1, nsEventStatus * 0x0012f59c) line 6205 + 47 bytes
PresShell::HandleEvent(PresShell * const 0x02f5f7a4, nsIView * 0x03aded58, 
nsGUIEvent * 0x0012f7a4, nsEventStatus * 0x0012f59c, int 0, int & 1) line 6128 
+ 25 bytes
nsViewManager::HandleEvent(nsView * 0x03aded58, nsGUIEvent * 0x0012f7a4, int 0) 
line 2208
nsView::HandleEvent(nsViewManager * 0x02e97168, nsGUIEvent * 0x0012f7a4, int 0) 
line 304
nsViewManager::DispatchEvent(nsViewManager * const 0x02e97168, nsGUIEvent * 
0x0012f7a4, nsEventStatus * 0x0012f6a0) line 1942 + 23 bytes
HandleEvent(nsGUIEvent * 0x0012f7a4) line 83
nsWindow::DispatchEvent(nsWindow * const 0x03adee04, nsGUIEvent * 0x0012f7a4, 
nsEventStatus & nsEventStatus_eIgnore) line 1115 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012f7a4) line 1136
nsWindow::DispatchMouseEvent(unsigned int 302, unsigned int 1, nsPoint * 
0x00000000) line 5376 + 21 bytes
ChildWindow::DispatchMouseEvent(unsigned int 302, unsigned int 1, nsPoint * 
0x00000000) line 5633
nsWindow::ProcessMessage(unsigned int 513, unsigned int 1, long 917595, long * 
0x0012fc38) line 4081 + 28 bytes
nsWindow::WindowProc(HWND__ * 0x00290304, unsigned int 513, unsigned int 1, 
long 917595) line 1402 + 27 bytes
USER32! 77e3a290()
USER32! 77e145b1()
USER32! 77e1a752()
nsAppShellService::Run(nsAppShellService * const 0x015bc3f8) line 480
main1(int 2, char * * 0x00271d80, nsISupports * 0x00f12d00) line 1273 + 32 bytes
main(int 2, char * * 0x00271d80) line 1636 + 37 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e9ca90()

Status: NEW → ASSIGNED
QA Contact: esther → laurel
nsPersistentProperties::GetStringProperty()

returns NS_ERROR_FAILURE

from:

if (PL_DHASH_ENTRY_IS_FREE(entry))
    return NS_ERROR_FAILURE;

still looking...
QA Contact: laurel → esther
more from my console (not sure why I'm just now seeing the warning)

Error loading AccountCentral page -> [Exception... "Component returned failure c
ode: 0x80004005 (NS_ERROR_FAILURE) [nsIPrefBranch.getComplexValue]"  nsresult: "
0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/conten
t/mailWindow.js :: ShowAccountCentral :: line 479"  data: no]
WARNING: Unknown escaped value in properties file, file c:/trees/trunk/mozilla/x
pcom/ds/nsPersistentProperties.cpp, line 319
WARNING: Unknown escaped value in properties file, file c:/trees/trunk/mozilla/x
pcom/ds/nsPersistentProperties.cpp, line 319
I think the warning is coming from a different string.

I'm seeing it for c = 34, or \", from this:

+	tokenStart	0x0012ddaa "OK\" button.
noPopupControl=can't control popups for this site

# XXX - this sucks and should only be temporary.
swit"
that NS_WARNING is totally bogus. That's not to say I didn't muck something up
here, but that isn't it. I've removed the warning.
Depends on: 190256
for this bug, here's the value from messenger.properties:

mailnews.account_central_page.url=chrome://messenger/content/msgAccountCentral.x
ul

I know some string bundle regression fixes have gone in, I'll update and 
rebuild, and retest.
try with today's build, I'm almost certain this is a dupe of bug 190256, not a
dependent of it.
still seems to be happening with a freshly rebuilt tree (after you ~8am checkin)
Flags: blocking1.3b? → blocking1.3b+
debugging now, trying to sort this out.

I think this might be happening.

the property is

mailnews.account_central_page.url=chrome://messenger/content/msgAccountCentral.x
ul

I'm looking into ParseBuffer(), to see if the ":" causes the problem.

     case eParserState_Key:
      if (c == '=' || c == ':') {
        aState.mKey += Substring(tokenStart, cur);
        aState.WaitForValue();
      }
ok, something is up with either the parser, or message.properties.

here's what we're mKey and mProps are for the property I'm trying not finding:

void FinishValueState(nsAString& aOldValue) {
    static const char trimThese[] = " \t";
    mKey.Trim(trimThese, PR_FALSE, PR_TRUE);
    mValue.Trim(trimThese, PR_FALSE, PR_TRUE);
    mProps->SetStringProperty(NS_ConvertUCS2toUTF8(mKey), mValue, aOldValue);

mKey = 

(the server for reading offline. To read this message, \
you must reconnect to the network, choose Offline from \
the File menu and then select Work Online.\
In the future, you can select which messages or folders to read offline. To do \

this, choose Offline from the file menu and then select Synchronize. You can \
adjust the Disk Space preference to prevent the downloading of large messages.

# accountCentral
mailnews.account_central_page.url)

value = 

(chrome://messenger/content/msgAccountCentral.xul)

I added some code to assert when we don't find properties.  I fear all the 
other assertions are either known regressions, or not-yet-found regressions.

I'll talk to alecf.
I added this code:

  void FinishValueState(nsAString& aOldValue) {
    static const char trimThese[] = " \t";
    mKey.Trim(trimThese, PR_FALSE, PR_TRUE);
    mValue.Trim(trimThese, PR_FALSE, PR_TRUE);
    printf("XXX %s,%s\n",NS_LossyConvertUCS2toASCII(mKey).get(), 
NS_LossyConvertUCS2toASCII(mValue).get());
    mProps->SetStringProperty(NS_ConvertUCS2toUTF8(mKey), mValue, aOldValue);
    mSpecialState = eParserSpecial_None;
    WaitForKey();
  }

here's the output, notice the property above is split:

XXX nocachedbodybody,The body of this message has not been downloaded from
XXX the server for reading offline. To read this message, \
you must reconnect to the network, choose Offline from \
the File menu and then select Work Online.\
In the future, you can select which messages or folders to read offline. To do \

this, choose Offline from the file menu and then select Synchronize. You can \
adjust the Disk Space preference to prevent the downloading of large messages.

# accountCentral
mailnews.account_central_page.url,chrome://messenger/content/msgAccountCentral.x
ul

from messenger.properties:

# offline msg 
nocachedbodybody=The body of this message has not been downloaded from \
the server for reading offline. To read this message, \
you must reconnect to the network, choose Offline from \
the File menu and then select Work Online.\
In the future, you can select which messages or folders to read offline. To do \
this, choose Offline from the file menu and then select Synchronize. You can \
adjust the Disk Space preference to prevent the downloading of large messages.

# accountCentral
mailnews.account_central_page.url=chrome://messenger/content/msgAccountCentral.x
ul
alecf and I debugged, and it looks like on windows, we don't handle multi-line 
properties.

the property before the one we aren't finding is multi-lined. 

this would have caused other regressions, on any multi-line property, but it 
would have been win32 only.

he's working on a patch. 
Attached patch proposed fix (obsolete) — Splinter Review
I haven't tried this just yet, seth is currently trying it.
Attached patch updated patch (obsolete) — Splinter Review
this fixes 2 minor issues with the previous patch, use this instead.
Attachment #112540 - Attachment is obsolete: true
Severity: normal → critical
Summary: account central won't show when I select a server → [win32 can't handle multi line properties], example: account central won't show when I select a server
Attached patch patchSplinter Review
alecf patch, plus something for messenger.properties.

this is no longer legal:

foo=bar\n\

# ball
cheese=toast

(you end up with foo=bar\n#ball,cheese=toast)

we now do:

foo=bar\n
# ball
cheese=toast

(to end up with foo=bar\n,cheese=toast)

going to test on linux...
Attachment #112544 - Attachment is obsolete: true
fixed.

r/sr=sspitzer on alecf's patch, a=kyle for checkin
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: