Closed Bug 113590 Opened 23 years ago Closed 23 years ago

Crash when changing the User Name in the Settings panel".

Categories

(SeaMonkey :: MailNews: Account Configuration, defect, P1)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.8

People

(Reporter: cult, Assigned: jag+mozilla)

References

Details

(Keywords: crash)

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120
BuildID:    2001112012

Mozilla will freeze if you change your Server settings of one Account.

Reproducible: Always
Steps to Reproduce:
1.Start the Mail & Newsgroup
2.Go to Mail & Newsgroups Account settings
3.Choose one of your mail account
4.Go to Server settings
5.Change the user name 'toto' to 'toto:mozilla.org'
6.Done, all mozilla is blocked because of the caracter ':'


Expected Results:  Should not be blocked!

My version is the Linux one.
confirming on windows xp build 2001120403
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash
Summary: All Mozilla crash if you change your Username email account to something like 'toto:mozilla.org' → Crash when changing the email-username to something containing a ":" - Oldtopic: All Mozilla crash if you change your Username email account to something like 'toto:mozilla.org'
Severity: blocker → critical
This seems to be a more general error. My mozilla freezes on any change I make
to the username. I do get a popup window warning me that my email address may
have changed if my username has changed, but after that it freezes.

(Mozillla 0.9.6, BuildID 2001112009, Windows 2000)
Marking nsbeta1 and changing OS to All since it also happens on Mac 9.1. A
freeze occurs just adding 1 character (any character) to the User Name.

Changing summary from "Crash when changing the email-username to something
containing a ":" - Oldtopic: All Mozilla crash if you change your Username email
account to something like 'toto:mozilla.org'" to "Crash when changing the User
Name in the Settings panel".
Keywords: nsbeta1
OS: Linux → All
Summary: Crash when changing the email-username to something containing a ":" - Oldtopic: All Mozilla crash if you change your Username email account to something like 'toto:mozilla.org' → Crash when changing the User Name in the Settings panel".
reassigning to cavin.
Assignee: racham → cavin
Keywords: nsbeta1nsbeta1+
Priority: -- → P1
Target Milestone: --- → mozilla0.9.8
Status: NEW → ASSIGNED
It hangs in nsString::ReplaceSubstring() (see the following stack trace). I'll 
have to use a different call to accomplish the same job.

nsMemory::Alloc(unsigned int 299302) line 82
nsStr::Alloc(nsStr & {...}, unsigned int 149650) line 695 + 21 bytes
nsStr::Realloc(nsStr & {...}, unsigned int 149650) line 723 + 13 bytes
nsStr::EnsureCapacity(nsStr & {...}, unsigned int 149650) line 117 + 13 bytes
nsStr::StrInsert(nsStr & {...}, unsigned int 5, const nsStr & {...}, unsigned 
int 0, int 12) line 237 + 18 bytes
nsString::ReplaceSubstring(const nsString & {...}, const nsString & {...}) line 
438 + 71 bytes
nsMsgIncomingServer::OnUserOrHostNameChanged(nsMsgIncomingServer * const 
0x04e13b40, const char * 0x01d3ee20, const char * 0x01d3eea0) line 1079
nsImapIncomingServer::OnUserOrHostNameChanged(nsImapIncomingServer * const 
0x04e13b40, const char * 0x01d3ee20, const char * 0x01d3eea0) line 3462 + 18 
bytes
nsMsgIncomingServer::SetRealUsername(nsMsgIncomingServer * const 0x04e13b40, 
const char * 0x01d3eea0) line 1161 + 26 bytes
Reassigning to jag since it hangs in nsString::ReplaceSubstring().
Assignee: cavin → jaggernaut
Status: ASSIGNED → NEW
Ccing myself.
Attached patch Fixed.Splinter Review
Comment on attachment 63216 [details] [diff] [review]
Fixed.

>+          theIndex += aNewValue.mLength;

Not |+= theInsLen|?

It's scary how many people are using a function that
"is not working yet!!!!!"
Comment on attachment 63216 [details] [diff] [review]
Fixed.

sr=alecf
Attachment #63216 - Flags: superreview+
Nope, not += theInsLen. The code's a little weird in that |theInsLen| is the
number of characters it needs to insert somewhere to reach the desired total
length (so |removeLen + addLen|). When it "inserts" the new string, it actually
only copies part of it over, hence the |Overwrite| call to completely copy the
stringToInsert into the newly created room. The alternative would be to remove
the old string, then insert the whole new string, but that'd be slower.

When all this is done you want to find your next match after where you just
inserted, so theIndex += stringToInsert.Length().

Btw:
http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#77
Depends on: 103342
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Trunk build 2002-01-28-03: WinMe, fixed.
Trunk build 2002-01-28-08: Linux RH 7.1, fixed.

Trunk build 2002-01-28-08: Mac 10.1, fixed because it doesn't crash when 
changing the User Name (although there is a problem after trying to login again 
after correcting the User Name and logging in again, bug# 122310).

Marking this bug, Verified Fixed.
Status: RESOLVED → VERIFIED
*** Bug 118745 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: