Open Bug 318514 Opened 19 years ago Updated 2 years ago

firefox loses track of its window width

Categories

(Firefox :: General, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: achittenden, Unassigned)

References

Details

Attachments

(11 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

Sometimes, firefox loses track of its window width and renders all pages incorrectly from that moment on: it's as if it thinks the window is wider than it actually is. Even resizing the window doesn't fix it. This is particularly annoying when using tabs as the cross that closes a tab isn't displayed.

Unfortunately, I haven't been able to discover the steps that causes it.

Reproducible: Couldn't Reproduce




keep track of its window width and render pages and tabs correctly.
As you can see, the text underneath the Additional Information doesn't wrap at the right window edge.
This happens to me fairly frequently.  Probably started around 1.5RC1, and still happens in 1.5.  It seems to affect more than the main display window.  When I get this problem, I notice that dropdown menus (for example, the File menu or the Tools menu) displays as very wide, but the individual entries within the menu are typically truncated.  Some have no text displayed at all.
Have you tried to reproduce the problem in Firefox safemode (not system safemode):
http://kb.mozillazine.org/Safe_Mode_(Firefox)
I have not tried safe mode.  The bug is infrequent enough that I haven’t been able to figure out what triggers it or determine any sort of pattern to the symptoms.  I do use a fairly large number of extensions (and also some GreaseMonkey scripts), so I suspect it may have something to do with an extension collision or some such.  If I do learn anything useful, I’ll document it here.
I haven't tried safe mode either. This problem happens about once a day. The only extension I have installed is the google toolbar.

I don't know whether it's relevant but I do click links in Outlook emails. This works fine most of the time but sometimes I notice that this problem occurs - unfortunately, I don't know whether it's happened before or after the follow of the link. Could be a red-herring but thought you ought to know.
(In reply to comment #1)
> Created an attachment (id=204657) [edit]
> picture of firefox window  demonstrating the problem
> 
> As you can see, the text underneath the Additional Information doesn't wrap at
> the right window edge.
>
In any case, I could not reproduce this example so something in your profile has possibly caused it. Extensions are always the most likely culprits. Greasemonkey maybe?
Success in any case.   
> Extensions are always the most likely culprits. Greasemonkey maybe?

As I said previously, I've only got google toolbar extension installed. And I'm sure that I've seen this problem without it installed too.

> Success in any case. 

What do you mean by that? Not a problem? If so, I disagree. There is clearly a problem. I'll try and use firefox in safe mode today and see whether it reproduces.
Please try in safe mode, without testing in safe mode it is not possible to know if it's a Firefox bug or an extension bug
I've been using FireFox in safe mode for the past week and the problem has not reoccurred. So, I guess either the google toolbar extension or the extension mechanism itself is at fault.
I have now been able to reproduce the problem (or some of the symptoms of it, anyway), in safe mode.  It seems as though the problem may be more likely to occur if Firefox is maximized and if you increase the font sizes within the browser window (I typically do this by Ctrl-mouse_wheel_down a few clicks; my eyes aren’t so good, so I typically increase the size of everything this way).  I don’t know for sure that the maximized window or the increased font size are related to the problem, but they may be.

To reproduce the problem, do the following:

1. Go to http://ipac.ramsey.lib.mn.us/ipac20/ipac.jsp?profile=zz#focus.  This is the web page for the Ramsey County, Minnesota, library system.

2. Click on “Keyword” in the blue horizontal bar to do a search by title keyword.

3. Enter “being reviewed” in the text box and click on the red GO button.  You’ll get a list of several hundred items, but only the first 10 will be displayed.

4. Click on the blue “Next”, which will be over on the right side of the page near the top and/or near the bottom of the page.  You may have to click Next on several succeeding pages to see the symptoms of the problem.

The symptoms include one or more of the following:
- The aforementioned problem where Firefox seems to lose track of the width of the window, such that both the library page tab and other tabs look stretched out horizontally.  No scrollbar appears on the right edge, the horizontal scrollbar on the bottom edge doesn’t help, and there’s really no way to get to the information or images that are off the right edge of the viewable area.  Also, the tab bar itself will have the same problem, with open tabs being lost off the right edge.  Closing the library tab may or may not clear up the problem for other tabs and for the Firefox window.  It may stop for a while but then reappear seemingly at random; only reloading Firefox really seems to eliminate the problem completely (until it gets triggered again).  Note that I have not seen this particular symptom in Safe mode, which might explain why it’s been difficult to track down.

- You may see horizontal lines running through one or more of the toolbars at the top of the Firefox window.  Sometimes only part of the toolbar has the horizontal line.

- One or more of the menu dropdowns may exhibit two things:  1) The dropdown menu is stretched horizontally, usually all the way across the screen.  2) Individual menu entries within the dropdown may be truncated or partially missing.  For example, in the Edit menu, instead of Paste on the left edge and Ctrl-V on the right edge, all I see is the Ctrl-V.

Good luck.  If I learn anything more, I will let you know.

Thanks,
Mark D.




A little more info: I have verified that the Firefox window being maximized doesn’t matter, and apparently neither does the font size being increased.  I was just now able to recreate some of the symptoms in Safe mode with an un-minimized window in unchanged font sizes.  The symptom that seems to happen most readily is the dropdown menu weirdness.

- Mark D.
I'm having the same problem. Here's a screenshot.
I have the same issue. The Google Toolbar is the only extension I have installed. I haven't tried running FF in safe mode but I'll look up how to do it and give it a try.

This problem arises when I use fast user switching in XP and the second account remains logged in for a long time. This never happens if I stay logged into my account, but it happens almost every time my wife switches to her account and stays logged in for a while. When I switch back to my account, open FF windows often forget their width. Extending the width to its maximum allows me to see a portion of my "Go" button but the "Close Tab" icon and the throbber are still missing.
In both screenshots I see symptoms of Bug 311438 (the extra space on top), caused by the Google Toolbar and/or fast user switching.
Yes, but I (MVD) do not use the Google Toolbar and never have, and I have reproduced this problem in safe mode.  I only see this on my work PC, which is Win2K; at home on my XPHome machine, I have not seen the problem.  This bug is such a problem for me that I am forced to use IE to access the library system (see above) so that I do not get FF into an unusable state.
(In reply to comment #14)
> In both screenshots I see symptoms of Bug 311438 (the extra space on top),
> caused by the Google Toolbar and/or fast user switching.
> 

the problem in Bug 311438 also occurs when themes are changed in gnome (using ubuntu 5.10)
I tried both the latest trunk and the latest branch, as you suggested.  Both fail in safe mode and non-safe mode.  In every case I followed the steps I outlined earlier with the Ramsey County Library system, and in every case I could see the problem in the dropdown menus.
*** Bug 327057 has been marked as a duplicate of this bug. ***
Fast user switching on my system doesn't seem to cause this problem. On mine, it seems to be caused when I leave my Firefox browser windows open for long periods of time while a 3D accelorated program, or screensaver runs (sometimes for hours) this problem IS reproducable, and should be considered an issue with the browser itself. I use it on my XP system, and have had this issue happen to me many times in the last week alone. My version of Firefox is 1.5 (Newest release) and the only thing I use with it is the Google Toolbar. for extra info, I use the windows classic theme (like win9x appearance) The only solution that I've seen is exiting the entire Firefox application, and restarting it. This is very inconvenient.

The screenshots I've seen on this report are identical to what I see when this happens to me
Does this occur for Windows users with Google Toolbar if they switch from Google Toolbar to Google Lite extension? They seem to be very similar, so trying this should be easy (convenient). I have yet to try this in gnome (linux) though. 
I will be adding a set of attachments to this discussion.  They are captures showing my FF session without and with the problem symptoms for the non-safe mode case and the safe mode case.  Five pictures in all.  I am a little concerned that there are multiple problems being discusses and want to make sure that the symptoms I am seeing are clearly specified.
This capture shows what the library screen looks like after selecting all items with keywords “DVD being reviewed”.  It also shows the drop down Go menu intact.  There are no symptoms showing on this page.  It is typical that the initial screen after the keyword selection will be okay.
This capture shows what can happen after clicking on Next one or more times.  Note the horizontal line running through the menu items bar near the top, and also note how the individual menu items under Go are truncated (for example, i... rather than iPac2.0).  The menu item box, however, is stretched horizontally.  In safe mode I do not see the main screen or the toolbars being stretched.  See the later captures for examples of that.
This capture shows non-safe mode without the problem.  Note that the weather toolbar is supposed to run off the right edge and is not a symptom of the problem.
This capture shows how the whole display gets corrupted.  Symptoms include:  horizontal line through much of the menubar; bookmark names are garbled (Fre... instead of Frequent, for example); throbber and other stuff on the right of the toolbars have gone completely off the edge and cannot be accessed; the main window has been stretched such that many links and other info are off the right edge and cannot be accessed; items on the right of the status bar are gone also.
Last one.  This is non-safe mode with the problem.  In this one, I clicked on the Go menu item.  You can see how the menu is stretched all the way across the window and yet the individual items are truncated.
I'm going to try removing the google toolbar all together, and see if it will still happen. Once I feel sure of the results, I will post them here. This should help significantly with this issue.
As promised... Here are the results I found...

Firefox still has issues in safe mode that are quite similar to the ones seen when in normal use. When I tried to remove the toolbar, Firefox seemed to crash. I re-opened it, and didn't have that issue again, but was having other issues with the browser. I have since switched my browser, and removed Firefox from my system due to the inconvenience of the many bugs the application appears to have. I would love to use the Firefox browser if it weren't for the numerous bugs it has.

This concludes my research results.
*** Bug 330813 has been marked as a duplicate of this bug. ***
note that the lower right-hand corner's resize icon is also absent
I encountered this bug today in my own development and even narrowed it down to a super-trivial example page.  I took screenshots rendering the test page to show the bug and when I opened a new instance of Firefox and rendered the test page the layout was fine - it would appear that the instance gets itself into a bad state and a new one MUST be started to fix the problem.  Anyhow, I hope the attachments are useful.  The previous three PNGs are the relevent attachments.
(In reply to comment #31)
> Created an attachment (id=215531) [edit]
> Simple test page to illustrate bug
>
Looks fine to me. Shows no wider page here. 

I believe comment #31 was only the sample to illustrate the page. Subsequent shots were the bug illustration.

(In reply to comment #36)
> (In reply to comment #31)
> > Created an attachment (id=215531) [edit]
> > Simple test page to illustrate bug
> >
> Looks fine to me. Shows no wider page here. 
> 
*** Bug 355836 has been marked as a duplicate of this bug. ***
*** Bug 355957 has been marked as a duplicate of this bug. ***
*** Bug 357491 has been marked as a duplicate of this bug. ***
Just thought I'd add that this has been an extremely annoying bug for me, and I've also had it since 1.5.  I will admit that it's easily reproducible for me not in safe mode running with the Google toolbar and Adblock Plus, and that I have not been able to reproduce it in safe-mode, although I haven't tested safe-mode much yet.  In my case, the main difference is switching from a very large resolution (e.g., 1600x1200 or 1920x1200 down to a lowly 1024x768).  This occurs frequently for me when I dock/undock my laptop which connects to a larger screen.  What exactly happens in my case, is that the tabs will be oriented as if it expects the larger resolution.  The arrow that normally accompanies scrolling to seeing additional tabs is not there, and the tab width is as if it was the larger resolution and the screen was maximized.  In fact, if you revert to the larger resolution, the problem still exists, but if you maximize in the larger resolution, the tabs are how they should be in terms of width and placement.  I've also noticed that sometimes minimizing the window while changing resolutions prevents this problem, which is a bit odd, and makes me think it's not entirely an extension related bug.
I'd like to confirm the previous posters' comment that I also think it has something to do with the switching between (3D?) screensaver resolutions (1024x768x32bit) and my normal desktop (1280x1024x32bit) resolution.  Sometimes I find the problem: a) spontaneously goes away if I open a new tab/page or b) try playing  with the restore/maximize buttons while attempting to load a page (lately that hasn't seemed to work for me).  What always does seem to work is if I restart Firefox, but this is very time consuming for me as I have 90-130 tabs to reload.  Note: I'm using FF v1.5 w/ Tab Mix Plus + Google toolbar + etc. extensions.  Is there some sort of debug/trace mode we can enable in FF on some relevant windowing variables to get an idea of what seems to be causing FF to forget the correct width of the window?  
PS: I have disabled my screensaver for now to see if it makes any difference.  
PPS:  BTW, why is this bug still in an 'unconfirmed' status?  Can someone who has the "canconfirm" permission change this to an official 'new' bug?  
this used to happen to me all the time.  i made a bug report on it.  one day, i changed to "use small icons" in the customize toolbar options.  the problem has NEVER occurred since.   
Update: 
Looks like disabling the screensaver has helped...somewhat.  I say 'somewhat' as I've noticed (XP) Hibernation/undocking my laptop seems to cause it too.  

The only thing that's in common here seems to be the screen resolution changes.  I wonder if that is what is confusing FF.  Anyone have any ideas on how we can track /trace this down further?  

Larry, thanks for the comment, I will try that too.  
Update:  
Looks like it happened again. :(

Larry, I tried the "use small icons" thing.  For a while the issue didn't occur but the other day it came back again.  Since I didn't want to go through the hassle of closing and reloading FF (and my many tabs), I left it alone until I needed to reboot.  What was surprising though was that I saw it fix itself spontaneously yesterday when I was playing a YouTube video embedded on a web page!

This bug is indeed very peculiar.  

PS:  Again, are there any Mozilla.org folks out there that have the ability to promote this into a genuine bug considering this has been successfully reproduced by a few people now?
Confirming based on the amount of duplicates.
Does it help if you specify a maximum width for the toolbar in userChrome.css?

toolbar {
  max-width: 800px !important;
}



Status: UNCONFIRMED → NEW
Ever confirmed: true
FYI.  Just noticed if I resize/restore the window while loading up an embedded
.PDF, the window the issue seems to (temporarily) correct itself.  HTH.

Ria, would I need to restart FF to do that?  
You mean after editing userChrome.css? Yes, it is only read on startup. 
See http://www.mozilla.org/unix/customizing.html#usercss
Update:  
Ok, this looks promising.  I set a max. toolbar width of 1024 and the issue didn't seem to occur.  The problem with that though is that in addition to the toolbar being limited to 1024, the page size is also.  Any window size larger than that simply creates a thick border around it.  I'm going to try setting it to 1280 (which is what I usually run at) and see what happens.  

Thanks Ria!
This happens also to me quite frequently. I think it is related to when the window is beeing resized by someone else. In my case, I use the remote desktop from different computers with different resolutions, and maximized applications will automatically be resized to fit the new one. After it happened, the internal width always stays the same, no matter if I maximize, minimize or resize. Does anyone know a workaround to get it back working in this case?
Firefox 2.0.0.14 under Windows 2003 Server
Ever since I upgraded to Firefox 3 beta x, I haven't experienced this problem.  Can anybody else confirm that FF3 fixes this?
I want to add that the only thing where the width keeps working is the bookmarks toolbar. All other (navigation toolbar, tabs, the webpage and the statusbar) have a higher width than the window.
I have a WinXP SP2 system with a Radeon X700 display adapter, FF version is 2.0.0.14. I seem to encounter this problem when I pivot my screen from 1280x1024 to 1024x1280, the screen width that Firefox "remembers" probably stays at 1280. Would like (to know if there's) a way to reinit screen dimensions without restarting FF.
(In reply to comment #57)
> I want to add that the only thing where the width keeps working is the
> bookmarks toolbar. All other (navigation toolbar, tabs, the webpage and the
> statusbar) have a higher width than the window.

All screen shots confirm this observation about bookmarks toolbar. Bug 343081 a dupe of this?

Ria, is this a dupe of bug 204743?  Or is this issue more generic, for lack of a better description.
This general symptom still occurs in Firefox 4, but it's certainly not as easily reproduceable as it used to be.

For me, this sometimes occurs when I press Win+Shift+Arrow (Win7 only?) to move Firefox between screens which are of different widths. It doesn't always happen, but when it starts happening, Win+Shift+Arrow will reliably reproduce it. Here's a screencast of it happening (requires a very wide desktop or that you scroll to the right): http://goo.gl/yIbg4 - observe the cut-off right side of the page and also messed up titlebar controls (bug 648727) in top right whenever Firefox is on the right screen.

Changing screen resolution actually fixes this and Win+Shift+Arrow stops doing this. It's like there's some kind of a resize hook that somehow gets unhooked: I can see that usually there's a split second delay after Firefox is moved: first it's too wide, then it resizes. But when the bug occurs it just stays of the wrong width.

I don't know yet how to get Firefox into this broken state.
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 10 duplicates and 11 votes.
:mossop, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dtownsend)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(dtownsend)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: