Closed Bug 27428 Opened 25 years ago Closed 24 years ago

Can't dismiss preferences if no font prefs changed

Categories

(SeaMonkey :: Preferences, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rzach, Assigned: matt)

References

Details

(Keywords: crash, relnote, Whiteboard: [PDT+],have fix in hand)

If the font preferences are selected, clicking OK doesn't close the preference
panel.

To reproduce:
1. Edit | Preferences
2. Choose fonts
3. Click OK

Actual result: Prefs panel not dismissed.  Console output:

*** VALUE=x-western
*** VALUE=16
*** VALUE=times
*** VALUE=courier
*** VALUE=16
*** elementObject.elType = Radio
*** going to set int pref: browser.chrome.toolbar_style = 2
*** elementObject.elType = Radio
*** elementObject.elType = Radio
*** elementObject.elType = select-one
*** going to set int pref: font.size.variable.x-western = 16
*** elementObject.elType = select-one
*** going to set int pref: font.size.fixed.x-western = 16
*** elementObject.elType = Radio
*** going to set int pref: browser.use_document_fonts = 1
*** elementObject.elType = Radio
JavaScript Error: uncaught exception: [Exception... "Component returned failure
code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPref.SetCharPref]"  nsresult:
"0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame ::
chrome://pref/content/pref.js :: PREF_ParsePref :: line 226"  data: no]

Expected result: Prefs panel closes

This happens even if no font prefs were changed.

Linux build 2000.02.11.11
Bulk move of all Pref UI component bugs to new Preferences component.  Pref UI 
component will be deleted.
Component: Pref UI → Preferences
i now get a crash on all three platforms when i go through the steps above.
tested w/opt comm bits, 2000022308.

Talkback report for linux:
http://cyclone/reports/incidenttemplate.CFM?reportID=124&style=0&tc=39&cp=3&ck1=SUser+email+address&cd1=%25sairuh%40netscape%2Ecom%25&co1=like&bbid=5845326

Talkback report for winNT:
http://cyclone/reports/incidenttemplate.CFM?reportID=124&style=0&tc=39&cp=3&ck1=SUser+email+address&cd1=%25sairuh%40netscape%2Ecom%25&co1=like&bbid=5845392

Talkback report for mac:
http://cyclone/reports/incidenttemplate.CFM?reportID=124&style=0&tc=39&cp=3&ck1=SUser+email+address&cd1=%25sairuh%40netscape%2Ecom%25&co1=like&bbid=5845444
Severity: normal → critical
Keywords: beta1, crash
OS: Linux → All
Hardware: PC → All
Summary: Can't dismiss preferences if font prefs changed → Can't dismiss preferences if no font prefs changed
Putting on PDT+ radar for beta1.
Whiteboard: [PDT+]
Ugh, when did this break?
Priority: P3 → P1
Target Milestone: M14
erm.. this works for me. Assuming matt has since made changes to this panel that 
fixed this problem... 
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
I still get the same results on Linux build 2000.02.27.09 as originally
reported.  No crash though.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
very odd. unable to repro this on linux, winNT... and only once on mac did i
manage to hang seamonkey (but not reproducible --otherwise fine). very odd.
tested w/opt comm bits 2000022808. wonder what changed...
I have the browser.screen_resolution pref set to 120.  If I remove that line, I
don't get the JS error and the panel closes.  I filed bug 27432 a while back
problems with the screen resolution pref (it's not read from nor saved to
prefs.js).  If that is fixed, this problem will probably go away.  Mark as dup
if you like.
i set my screen resolution to 126.
It still dismisses the prefs pane from me.
Try deleting that item in your prefs.js.
I can't reproduce this for some reason.
can you try deleting your prefs.js file.
And see if that helps at all?
i can't reproduce this.
Ok, here we go: if my prefs.js says
  user_pref("browser.screen_resolution", "120");
it works fine.  I had the following line in there:
  user_pref("browser.screen_resolution", 120);
(note: no quotes around 120).  With that line, I get the JS error and can't
close the panel.  The problem is that *with* the quotes, I don't get the right
screen resolution (i.e., the fonts are too small)!
ok thanks to your help i have a fix.
Looks like browser.screen_resolution is
a int and it was put here as a string.
Is this right Eric...
Can you review the change Eric?
Just to be warning you that everyone will have to change their
pref to a string. now that i have changed this to a int.

Index: fontScalingOverlay.xul
===================================================================
RCS file: /cvsroot/mozilla/xpfe/components/prefwindow/resources/content/fontScal
ingOverlay.xul,v
retrieving revision 1.4
diff -r1.4 fontScalingOverlay.xul
38c38
<         <html:input type="text" id="browserScreenResolution" pref="true" preft
ype="string"
---
>         <html:input type="text" id="browserScreenResolution" pref="true" preft
ype="int"



Index: fontScalingOverlay.xul
===================================================================
RCS file: /cvsroot/mozilla/xpfe/components/prefwindow/resources/content/fontScal
ingOverlay.xul,v
retrieving revision 1.4
diff -r1.4 fontScalingOverlay.xul
38c38
<         <html:input type="text" id="browserScreenResolution" pref="true" preft
ype="string"
---
>         <html:input type="text" id="browserScreenResolution" pref="true" preft
ype="int"
Whiteboard: [PDT+] → [PDT+],have fix in hand
Will this also fix bug 27432?
yes this will fix that bug.
Status: REOPENED → ASSIGNED

*** This bug has been marked as a duplicate of 27432 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → DUPLICATE
*** Bug 27432 has been marked as a duplicate of this bug. ***
reversed duped.
Reopening
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
fixed...

You will need to blow away this preference
since it will be a read as a string but it is actaully
a integer.  Easy way is just remove the pref.js file
if the pref does not seem to load.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Keywords: relnote
Resolution: --- → FIXED
*** Bug 29553 has been marked as a duplicate of this bug. ***
Verified on Linux build 2000.03.01.08.
also looks good on winNT [comm] and mac [mozilla] (as well as the comm bits of
linux), using 2000.03.01.08.
Status: RESOLVED → VERIFIED
Blocks: 40430
No longer blocks: 40430
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.