Can't dismiss preferences if no font prefs changed

VERIFIED FIXED in M14

Status

SeaMonkey
Preferences
P1
critical
VERIFIED FIXED
19 years ago
14 years ago

People

(Reporter: Richard Zach, Assigned: matt)

Tracking

({crash, relnote})

Trunk
crash, relnote

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

19 years ago
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

Comment 1

19 years ago
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

Comment 3

19 years ago
Putting on PDT+ radar for beta1.
Whiteboard: [PDT+]

Comment 4

19 years ago
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
Last Resolved: 19 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 6

19 years ago
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...
(Reporter)

Comment 8

19 years ago
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.
(Assignee)

Comment 9

19 years ago
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.
(Assignee)

Comment 10

19 years ago
can you try deleting your prefs.js file.
And see if that helps at all?
i can't reproduce this.
(Reporter)

Comment 11

19 years ago
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)!
(Assignee)

Comment 12

19 years ago
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"
(Assignee)

Updated

19 years ago
Whiteboard: [PDT+] → [PDT+],have fix in hand
(Reporter)

Comment 13

19 years ago
Will this also fix bug 27432?
(Assignee)

Comment 14

19 years ago
yes this will fix that bug.
Status: REOPENED → ASSIGNED
(Assignee)

Comment 15

19 years ago

*** This bug has been marked as a duplicate of 27432 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → DUPLICATE
(Assignee)

Comment 16

19 years ago
*** Bug 27432 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 17

19 years ago
reversed duped.
Reopening
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(Assignee)

Comment 18

19 years ago
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
Last Resolved: 19 years ago19 years ago
Keywords: relnote
Resolution: --- → FIXED
(Assignee)

Comment 19

19 years ago
*** Bug 29553 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 20

19 years ago
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

Updated

18 years ago
Blocks: 40430

Updated

18 years ago
No longer blocks: 40430
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.