[Bug 10956] New: Series of OPAC searches can cause a browser crash
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Bug ID: 10956 Summary: Series of OPAC searches can cause a browser crash Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org In my tests this series of OPAC searches will result a browser crash (Firefox) or an endlessly loading tab (Chrome): 1. Perform a keyword search which will return a good number of results. 2. Click on a title in those results which will have a good number of works by that author. 3. Click on the author link on the detail page to perform a search by author. 4. Click on a facet on the author search results page (I tested by clicking on a library facet). 5. Click on a title in the refined search results. I've tested this procedure with XSLT on and off, with OpacBrowseResults on and off, and with EnableOpacSearchHistory on and off. I get the same results in both themes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- More info: The bug appears to affect master and 3.12.x but not 3.10.x. I couldn't reproduce the problem in the staff client following the same steps. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.saby@univ-rennes2.f | |r --- Comment #2 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Don't you think this bug priority needs to be reevaluated? Random browser crashes are a really nasty issue... I suppose it is linked with the browser crashes I experienced each time I tried to test Jonathan Druart's patch made for making facets cancellable (Bug 10857) Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #3 from Marc Véron <veron@veron.ch> --- I could reproduce endless loops as well, leading to a "Script not responding" message in Firefox. What I did: - Keyword search for "a" - In Facets click an author with a lot of titles - Click a detail page Result: Wait cursor, then "Script not responding" It seems to be related to a function jQuery.fn.higlight It has a loop like for (var i=0; i < node.childNodes.lenght; ++i) in this loop, node.childNodes.lenght is really huge (sorry, could not take a screenshot) After turning off syspref 'OpacHighlightedWords' I could not reproduce the endless loop again. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 33662 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33662&action=edit Screenshot debugger after script not responding Screenshot of debugger after getting "Script not responding" (Firefox) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 33667 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33667&action=edit [HACK] Bug 10956 - Series of OPAC searches can cause a browser crash This is a hack to track down the issue with an endless loop while highlighting words. I changed function innerHighlight(node, pat) to break out of loop after a while. With this hack I can no longer reproduce the bug. It is not a solution, but it could help to track down the problem. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #6 from Marc Véron <veron@veron.ch> --- New finding: In facet, click several times on the author. The link will get longer and longer and looks like the following (newlines by mv): http://10.0.0.21/cgi-bin/koha/opac-search.pl?q=ccl= kw%3Aa%20%20 and%20au%3ATwain%2C%20Mark%2C%201835-1910%20 and%20au%3ATwain%2C%20Mark%2C%201835-1910%20 and%20au%3ATwain%2C%20Mark%2C%201835-1910&sort_by=relevance&limit=au:Twain%2C%20Mark%2C%201835-1910 The highlighting function then will try to highlight the words Twain, Mark and 1835-1910 several times. Maybe this breaks the highlighting function. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33667|0 |1 is obsolete| | --- Comment #7 from Marc Véron <veron@veron.ch> --- Comment on attachment 33667 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33667 [HACK] Bug 10956 - Series of OPAC searches can cause a browser crash Obsoleted patch that helped to track down issue. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33667|1 |0 is obsolete| | --- Comment #8 from Marc Véron <veron@veron.ch> --- Comment on attachment 33667 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33667 [HACK] Bug 10956 - Series of OPAC searches can cause a browser crash Hmm, could not really find out what happens. At least this patch prevents the browser from freezing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33667|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #9 from Marc Véron <veron@veron.ch> --- Created attachment 33673 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33673&action=edit Bug 10956 - Series of OPAC searches can cause a browser crash Solution: Prevent jQuery.fn.highlight = function(pat) to be called with empty pat by skipping empty values in highlight loop. To test: Without patch, do a search as in comment #1 odr #3 Result: Endless loop (Script not responding) Appply patch: No endless loop, page displays OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9419, | |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8646 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #10 from Marc Véron <veron@veron.ch> --- This fix is for the bootstrap theme. Earlier fixes were vor the prog them (Bug 9419 and Bug 8646) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33673|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #11 from Marc Véron <veron@veron.ch> --- Created attachment 33674 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33674&action=edit Bug 10956 - Series of OPAC searches can cause a browser crash This patch fixes the issue for bootstrap. It was earlier fixed for the prog theme. Solution: Prevent jQuery.fn.highlight = function(pat) to be called with empty pat by skipping empty values in highlight loop. To test: Without patch, do a search as in comment #1 odr #3 Result: Endless loop (Script not responding) Appply patch: No endless loop, page displays OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33674|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33897 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33897&action=edit Bug 10956 - Series of OPAC searches can cause a browser crash This patch fixes the issue for bootstrap. It was earlier fixed for the prog theme. Solution: Prevent jQuery.fn.highlight = function(pat) to be called with empty pat by skipping empty values in highlight loop. To test: Without patch, do a search as in comment #1 odr #3 Result: Endless loop (Script not responding) Appply patch: No endless loop, page displays OK Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> To reproduce you need to search a string with 2 spaces. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33897|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33903 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33903&action=edit [PASSED QA] Bug 10956 - Series of OPAC searches can cause a browser crash This patch fixes the issue for bootstrap. It was earlier fixed for the prog theme. Solution: Prevent jQuery.fn.highlight = function(pat) to be called with empty pat by skipping empty values in highlight loop. To test: Without patch, do a search as in comment #1 odr #3 Result: Endless loop (Script not responding) Appply patch: No endless loop, page displays OK Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> To reproduce you need to search a string with 2 spaces. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> I didn't manage to reproduce the problem, but I couldn't find any regression either trying multiple searches. Trusting Marc's and Jonathan's testing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #13)
Trusting Marc's and Jonathan's testing.
I confirm that my browser completely blown-up :) I searched " p. 21 " This problem have already been fixed using the same way on the intranet and in the prod theme. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10956 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org