Bug 122568 - Firefox popup blocker
Summary: Firefox popup blocker
Status: RESOLVED FIXED
: 128943 (view as bug list)
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Firefox (show other bugs)
Version: unspecified
Hardware: i386 SuSE Linux 10.0
: P5 - None : Major
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-10 20:20 UTC by Matty J
Modified: 2006-08-16 05:57 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
picture of blocked pop-up window message (91.80 KB, image/jpeg)
2005-10-19 18:41 UTC, Rainer Klier
Details
that's the output of the printf proposal (2.73 KB, application/x-bzip2)
2006-03-14 13:13 UTC, Wolfgang Rosenauer
Details
nsPresShell.S (1.04 MB, text/plain)
2006-03-15 20:18 UTC, Wolfgang Rosenauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matty J 2005-10-10 20:20:31 UTC
Firefox ignores popup blocker settings. It still blocks popups when the popup
blocker is turned off, and also ignores the allowed list. May be a firefox
problem but it didn't occur in SuSE 9.3.
Comment 1 Wolfgang Rosenauer 2005-10-11 04:22:14 UTC
Do you know a site where this is reproducable?
Comment 2 Rainer Klier 2005-10-19 18:41:04 UTC
Created attachment 54823 [details]
picture of blocked pop-up window message

although i switched off pop-up-blocking the shown error-message about a blocked window appeared.
Comment 3 Rainer Klier 2005-10-19 19:03:06 UTC
i also have this bug.
i have installed MozillaFirefox-1.0.7-0.1.

please try online-banking.
i created an attachment showing my online-banking-start-window with an error-message, that it had to block the online-banking-main-browser-window, although i switched off pop-up-blocking!

but it seems to occour not on every pop-up-window.

the pop-up-windows from novells support-request-document (https://secure-support.novell.com/eService_enu/) works.
it, for example, opens pop-up-windows for "Entitlement" without any problems.

it seems that it works, when the window has all properties enabled like menue-bar, status-bar, ....

it seems that when the window has some things switched off then it gets blocked!

so it seems to have to do something with the properties of the opened window.

in mozilla everything works! (i have 1.7.12)
Comment 4 Wolfgang Rosenauer 2005-10-19 19:28:40 UTC
*** Bug 128943 has been marked as a duplicate of this bug. ***
Comment 5 Robert O'Callahan 2005-10-21 01:47:59 UTC
Does it happen on a fresh profile?
Comment 6 Rainer Klier 2005-10-21 07:45:05 UTC
i don't know if it would also happen on a fresh profile, but it happens on my existing profile, which i have since a long time.
i used it under all suse 9.x versions with every for suse 9.x released version of firefox.
there was never a problem.
then i upgraded to suse 10.0.
and there i upgrded firefox to 1.0.7-0.1.
and then i noticed it.
Comment 7 Rainer Klier 2005-11-22 09:51:39 UTC
i have tested now with fresh profile.
but it is the same thing.
regardless of profile it blocks pop-ups, even if pop-up-blocker is switched off.
please fix this bug, coz firefox is unusable with it!
Comment 8 Rainer Klier 2005-11-23 11:48:08 UTC
hello?
is anybody out there?
Comment 9 Wolfgang Rosenauer 2005-11-23 12:00:27 UTC
Preparation of Firefox 1.5 is more important at the moment since it perhaps will be released as security update at some point for 10.0. So if you like you could check if Firefox 1.5, provided as test package from 
ftp://ftp.suse.com/pub/projects/mozilla/experimental/firefox/
fixes the problem.
We are aware of the problem and we will work on it if there is time.
Comment 10 Carsten Hoeger 2005-11-23 14:03:41 UTC
This version doesn't seem to have that popup blocker problem anymore
Comment 11 Rainer Klier 2005-11-24 11:44:53 UTC
yes, i know that, but i didn't want to upgrade to this release-candidate because of installed extensions and possible new bugs of this release-candidate.

ok, but after you told me the above, i installed 1.4.99-3.1 and the popup blocker problem is gone.

i hope that there are not that many other bugs in this release-candidate....

thanks for help & info.
Comment 12 Wolfgang Rosenauer 2006-02-08 11:43:12 UTC
Robert, maybe we have to investigate this since we will most probably do a security update soon. If possible we should try to fix this.
I'll also have a look.
Comment 13 Robert O'Callahan 2006-02-21 03:18:19 UTC
I'm testing this, and I actually have the opposite problem! Firefox (1.0) isn't blocking popups even though my preferences say it should.
Comment 14 Robert O'Callahan 2006-02-24 01:43:06 UTC
I built my own build of Firefox 1.0.7-0.1 and now I can't reproduce the problem :-(
Comment 15 Robert O'Callahan 2006-02-24 01:54:08 UTC
I can no longer reproduce the problem at all.
Comment 16 Robert O'Callahan 2006-02-24 01:54:29 UTC
Wolfgang, how about you?
Comment 17 Wolfgang Rosenauer 2006-02-24 07:48:42 UTC
I've seen the behaviour with our 1.0.7 package still.
Also my colleagues see it everytime with 1.0.7 on 10.0.
Did you built the current 1.0.7 package in autobuild or did you remove patches?
I haven't seen the problem with the plain 1.0.7 sources IIRC.
I'm back in the office on monday and can do further testing then.
Comment 18 Robert O'Callahan 2006-02-26 22:11:05 UTC
I tried to build our autobuild package, without removing patches. Maybe I made a mistake.

How hard would it be to push out a debuginfo package for 1.0.7?
Comment 19 Wolfgang Rosenauer 2006-02-27 07:23:55 UTC
For which distribution?
I have debuginfo packages along with binary packages for 9.3-i386 and 10.0-i386 on ftp.suse.com/pub/projects/mozilla/firefox/1.0.7

I don't know if it's possible to create them for NLD9.
Comment 20 Robert O'Callahan 2006-02-28 04:54:29 UTC
How about 10.0-x86-64 please? :-)
Comment 22 Robert O'Callahan 2006-03-08 05:06:35 UTC
I'm having a really tough time reproducing this. I can get it to happen once in a while but not very often.

I tracked it as far as 'gPopupControlState' (a global variable) getting set to some really huge garbage value. Because of the logic in PushPopupControlState in nsGlobalWindow.cpp, it stays stuck at this value permanently and cause popup blocking settings to be ignored.

Wolfgang, if you can reproduce reliably and care to venture in with gdb, do this:
(gdb) break nsGlobalWindow.cpp:411
(gdb) condition 1 aState > 3
(gdb) c
and let me know the stack trace you get when the breakpoint fires. Thanks!
Comment 23 Wolfgang Rosenauer 2006-03-13 05:45:46 UTC
I can reproduce it still every time. But the breakpoint didn't fire when it happened.
Comment 24 Wolfgang Rosenauer 2006-03-13 06:00:03 UTC
watching the gPopupControlState I see that it flips between openAbused and and 148677380 (in my case).
aState in line 421 void PopPopupControlState(PopupControlState aState) is the wrong value.

Backtrace while hitting this:

#0  PopPopupControlState (aState=148677380) at nsGlobalWindow.cpp:422
#1  0x08219eda in PresShell::HandleEvent (this=0x8b49f80, aView=0x942afc0, aEvent=0xffffb430, aEventStatus=0xffffb34c, aForceHandle=1, aHandled=@0xffffb348) at nsPresShell.cpp:5921
#2  0x0836e7b9 in nsViewManager::HandleEvent (this=0x8f01730, aView=0x942afc0, aEvent=0xffffb430, aCaptured=0) at nsViewManager.cpp:2273
#3  0x08370120 in nsViewManager::DispatchEvent (this=0x8f01730, aEvent=0xffffb430, aStatus=0xffffb3f8) at nsViewManager.cpp:2061
#4  0x08369002 in HandleEvent (aEvent=0xffffb430) at nsView.cpp:74
#5  0x081fe29b in nsCommonWidget::DispatchEvent (this=0x8b44178, aEvent=0xffffb430, aStatus=@0xffffb478) at nsCommonWidget.cpp:215
#6  0x081f9dd3 in nsWindow::OnLeaveNotifyEvent (this=0x8b44178, aWidget=0x8aca7e0, aEvent=0x8b2dc80) at nsWindow.cpp:1311
#7  0x081f9dfd in leave_notify_event_cb (widget=0x8aca7e0, event=0x8b2dc80) at nsWindow.cpp:3264
#8  0x55841e60 in gtk_marshal_VOID__UINT_STRING () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#9  0x55b4bd19 in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#10 0x55b5b816 in g_signal_stop_emission () from /opt/gnome/lib/libgobject-2.0.so.0
#11 0x55b5cbee in g_signal_emit_valist () from /opt/gnome/lib/libgobject-2.0.so.0
#12 0x55b5d1f5 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#13 0x559343b4 in gtk_widget_activate () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#14 0x558408a8 in gtk_main_do_event () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#15 0x55a46f8a in gdk_screen_get_setting () from /opt/gnome/lib/libgdk-x11-2.0.so.0
#16 0x55ba735c in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#17 0x55baa7cb in g_main_context_check () from /opt/gnome/lib/libglib-2.0.so.0
#18 0x55baaae7 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#19 0x5583f861 in gtk_main () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#20 0x081fdb1a in nsAppShell::Run (this=0x8a29090) at nsAppShell.cpp:142
#21 0x086f0180 in xre_main (argc=1, argv=0xffffc704, aAppData=0x86f88d0) at nsAppRunner.cpp:1981
#22 0x080810db in main (argc=1, argv=0xffffc704) at nsBrowserApp.cpp:58
#23 0x56121ea0 in __libc_start_main () from /lib/tls/libc.so.6
#24 0x08081031 in _start () at start.S:119
Comment 25 Robert O'Callahan 2006-03-13 22:38:58 UTC
It sounds like nsAutoPopupStatePusher from nsPIDOMWindow.h is popping the wrong value, i.e., not the value it pushed. This is a bit disturbing since it's a very simple save-and-restore helper class.

Would you mind adding a printf to the body of the constructor NS_AUTO_POPUP_STATE_PUSHER(PopupControlState aState, ...) to print the value of mOldState, and the value of 'this'? And another to the destructor before we call PopPopupControlState(mOldState) with the same data? I think inside the _IMPL_NS_LAYOUT #ifdef should be enough. mOldState should definitely *not* change between the construction and destruction of the same nsAutoPopupStatePusher. If it does, we're looking at memory corruption or a compiler bug.
Comment 26 Wolfgang Rosenauer 2006-03-14 13:13:01 UTC
Created attachment 72767 [details]
that's the output of the printf proposal

when mOldState switches the first time to the wrong value 
destruct:  mOldState = 0 ; this = -19592
destruct:  mOldState = 148676556 ; this = -18416
It does this in a destructor for an object never touched before during Firefox runtime.
Comment 27 Robert O'Callahan 2006-03-14 20:37:24 UTC
Now I'm scared.

Would you mind trying compiling nsPresShell.cpp with optimization off?
Comment 28 Robert O'Callahan 2006-03-14 20:52:35 UTC
Also, gcc -S on nsPresShell.cpp would be useful.
Comment 29 Wolfgang Rosenauer 2006-03-15 05:05:02 UTC
I've compiled the whole codebase now without "-Os -march=i586 -mcpu=i686".
It still shows the same behaviour.
Comment 30 Wolfgang Rosenauer 2006-03-15 20:18:40 UTC
Created attachment 73096 [details]
nsPresShell.S
Comment 31 Robert O'Callahan 2006-03-16 19:18:14 UTC
That disassembly looks OK. I don't know if that makes me happy or not.

I think I'd like to see the gdb trace that you did in comment #24, but for the debug build, and the values of locals in HandleEventInternal if that's on the stack. Thanks for all the help.
Comment 33 Robert O'Callahan 2006-04-06 21:07:17 UTC
I can't reproduce this on NLD9 (x86) or SLED 10beta9 (x86-64). This sucks.
Comment 34 Wolfgang Rosenauer 2006-08-16 05:57:22 UTC
Fixed with update to FF 1.5.0.x