Closed Bug 12138 Opened 25 years ago Closed 25 years ago

crash migrating preferences from Communicator

Categories

(MailNews Core :: Profile Migration, defect, P2)

All
Linux

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: danm.moz, Assigned: sspitzer)

Details

I'm getting a segmentation fault trying to migrate my Communicator preferences (Linux OS, but the error
will probably show up on other platforms).  To reproduce: replace mozilla prefs.js with my navigator preferences.js
and run -news.  What, your preferences.js is different?

The problem happens in nsMsgAccountManager:CopyIdentity.  In my case, the very last preference migrated,
srcIdentity->GetSmtpUserName, is returning a null value with a function return of NS_OK.  (Within
nsMsgIdentity::getCharPref, CopyCharPref returns an error, so the fallback getDefaultCharPref gets a shot.
It also fails, returning null, with a comment that says "null is ok to return here.")  Fine, but the following
call to destIdentity->SetSmtpUsername can't handle that null preference (it ends up in pref_SetValue, which
asserts that the string is not null.)

Actually, pref_SetValue seems to be able to handle a null string, but the PR_ASSERT kills the program.
Assignee: dbragg → sspitzer
Seth, I reassigned this to you since you were working on the mail prefs.  I hope
you're also working on news prefs.  If it's not you, reassign as you see fit.
Status: NEW → ASSIGNED
yes, I own all mail / news pref migration.

accepting.
Priority: P3 → P2
Target Milestone: M10
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
superb bug report.

I've checked in the fix.

QA:  to verify try to migrate a prefs.js file without any smtp prefs:
(remove the "mail.smtp_name" from your prefs.js before you migrate it.)
Status: RESOLVED → VERIFIED
19990913 build-able to use prefs.js file with smtp_name and no smtp_name
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.