Closed Bug 398894 Opened 17 years ago Closed 17 years ago

[linux] Firefox prints sanitizing history exception from sanitize.js to console

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: fredbezies, Assigned: sylvain.pasche)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a9pre) Gecko/2007100511 Firefox/3.0a9pre Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a9pre) Gecko/2007100511 Firefox/3.0a9pre Very simple to reproduce. Build a Firefox using code up-to-date at 10:00pm on 6 october 2007, mozilla.org time. Try to launch it from console. Got this message, and then a core dump : "./firefox & [1] 16751 fred@fredo-gutsy:~/logs/fox/mozilla/dist/bin$ Error sanitizing history: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch2.clearUserPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://browser/content/sanitize.js :: anonymous :: line 106" data: no] Error sanitizing history: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.clearUserPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://browser/content/sanitize.js :: anonymous :: line 106" data: no] Segmentation fault (core dumped) [1]+ Exit 139 ./firefox" Reproducible: Always Steps to Reproduce: 1.See details 2. 3. Actual Results: Segmentation fault. Expected Results: Firefox launched ?! Using Ubuntu Linux Gutsy Gibbon up-to-date, and this .mozconfig : # # See http://www.mozilla.org/build/ for build instructions. # export CC=gcc-4.2 export CXX=g++-4.2 . $topsrcdir/browser/config/mozconfig # Options for 'configure' (same as command-line options). ac_add_options --enable-optimize="-Os -march=athlon64 -w -pipe -D_FORTIFY_SOURCE=2" ac_add_options --disable-debug ac_add_options --disable-tests ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-strip
PREF_ClearUserPref called from nsPrefBranch::ClearUserPref returns NS_ERROR_UNEXPECTED if the pref doesn't exist. We should put a try/catch around the call to clearUserPref added in bug 397196. I'm not sure why you're crashing, but throwing during startup like this can't be good.
Blocks: 397196
Flags: blocking-firefox3?
Keywords: regression
Flags: blocking-firefox3? → blocking-firefox3+
Target Milestone: --- → Firefox 3 M9
I'm not able to reproduce. From a clean profile, to get the sanitizing done on startup I changed privacy.sanitize.promptOnSanitize to false and privacy.sanitize.sanitizeOnShutdown to true, and restarted the browser. Can you reproduce this from a clean profile, or do you have instructions how to reproduce it from a clean one?
Whether or not it could be reproduced, I think it'd be a good idea to add the try/catch. The pref isn't garanteed to exist since it has no default, and clearUserPref is expected to throw for non-existent prefs. The crash might be in other (possibly OS-specific) code, or in an extension, or due to some weird interaction with some other profile setting. Understanding the root cause would be great, but I'd be satisfied with adding the try/catch and seeing if Frederic can reproduce after that. If you attach a patch I'll review it quickly :)
Attachment #284175 - Flags: review?(gavin.sharp)
Attachment #284175 - Flags: review?(gavin.sharp) → review+
I have no more crash - related to a patch in cairo rendering code or something like that. I still have the warning, but firefox is running. I modified summary a little ;)
Severity: critical → normal
Keywords: regression
Summary: [linux] Firefox segfaults at start, relating to a problem with sanitize.js → [linux] Firefox shout at a problem with sanitize.js
Assignee: nobody → sylvain.pasche
Keywords: checkin-needed
OS: Linux → All
Hardware: PC → All
Version: unspecified → Trunk
Summary: [linux] Firefox shout at a problem with sanitize.js → [linux] Firefox prints sanitizing history exception from sanitize.js to console
Checking in browser/base/content/sanitize.js; /cvsroot/mozilla/browser/base/content/sanitize.js,v <-- sanitize.js new revision: 1.23; previous revision: 1.22 done
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: