Last modified: 2013-03-28 03:01:30 UTC
Created attachment 9515 [details] Call stack on Konkeror I'm trying to access Wikipedia articles but the only browser available in the computers of the lab I have access on my university is Konqueror 3.5.9 (Using KDE 3.5.10). On this browser, every time I open a page such as http://en.wikipedia.org/?debug=1 http://en.wikipedia.org/wiki/Special:RecentChanges?limit=2&debug=1 I get the following message a few seconds after the page content is displayed: ---- A script on this page is causing KHTML to freeze. If it continues to run, other applications may become less responsive. Do you want to abort the script? ---- I've enabled debugger and error reporting in the browser, to get more details about what could be the cause. When I reloaded the page, I got also this one: ---- An error occurred while attempting to run a script on this page. http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=true&lang=en&module... line 3945 [Debug] [OK] ---- and then I clicked in the "Debug" option to see the source code of the problematic script. The line mentioned contains this: ---- results.sort( sortOrder ); ---- and the call stack contains this scripts displayed in the attached screenshot. One of the scripts in the call stack is stopped in the following line: ---- this.updateTooltipAccessKeys( $( '#column-one a, #mw-head a, #mw-panel a, #p-logo a' ) ); ---- (which is from http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_18/phase3/resources/mediawiki/mediawiki.util.js?view=markup#l261 ) Maybe the problem could be resolved if this jQuery selector were improved, by first selecting the elements by id and then finding "a" elements inside them. Would something like ---- this.updateTooltipAccessKeys( $( '#column-one, #mw-head, #mw-panel, #p-logo' ).find( 'a' ) ); ---- be more efficient? Anyway, after I close the debugger, and go back to the article, I get the same error message again, and if I click on [Ok] or press ESC it just makes the error message to be displayed again and again whithout end. PS: I noticed the error also on other wikis, such as http://pt.wikipedia.org/?debug=1 On the other hand, it doesn't happens on some special pages: http://en.wikipedia.org/wiki/Special:SpecialPages?debug=1 http://pt.wikipedia.org/wiki/Special:SpecialPages?debug=1
The alternate selector that you're recommending looks like it would perform the exact same operations as the first one (in both cases, I believe it would start with getElementById lookups on the four IDs, then call getElementsByTagName('a') within each one, and combine the results into one collection). Beware that Konqueror has a nasty history of having weird bugs in old versions that nobody does much about because they're fixed in later versions and very few people use the old ones. Testing with an OpenSuSE LiveCD that has KDE 3.5.10 ... No problems visible at: * http://en.wikipedia.org/ * http://en.wikipedia.org/?debug=1 * http://en.wikipedia.org/wiki/Special:RecentChanges?limit=2&debug=1 So far, works for me on Konqueror 3.5.10. Is this happening when logged out as well as logged in? Can you reproduce it with a fresh profile?
The version I had handy is 4.0.4 (20080505) which had the same problems as Bug #31945 on the recent changes page. But it did work.
(In reply to comment #1) > Is this happening when logged out as well as logged in? Can you reproduce it > with a fresh profile? I don't remember. I'll check again tomorrow.
The bug happens when I'm logged or unlogged and visit any of the following pages: http://en.wikipedia.org/wiki/Blackbeard http://en.wikipedia.org/wiki/Virginia http://en.wikipedia.org/wiki/New_World It do not happens on these pages: http://en.wikipedia.org/wiki/Robert_Maynard http://en.wikipedia.org/wiki/Cival http://en.wikipedia.org/wiki/Spanish_conquest_of_Yucatán The following test seems to indicate that the change I suggested above would not make things better: http://jsperf.com/jquery-selector-for-anchor
(In reply to comment #1) > The alternate selector that you're recommending looks like it would perform the > exact same operations as the first one (in both cases, I believe it would start > with getElementById lookups on the four IDs, then call > getElementsByTagName('a') within each one, and combine the results into one > collection). > In an ideal world, that would be true, but $( '#foo' ).find( 'a' ) really is faster. See also [[mw:JSPERF]].