| Summary: | regression: javascript breakage, apparently in regexes | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Nick Leverton <nick> |
| Component: | tdelibs | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | blocker | CC: | bugwatch, darrella, slavek.banko |
| Priority: | P1 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | i386 | ||
| OS: | Debian Squeeze | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Attachments: | Enable pcre support in kdelibs | ||
|
Description
Nick Leverton
2011-10-29 05:42:23 CDT
Oops, wrong URL, should be http://www.tvguide.co.uk/ Apologies. Three other sites where JS has stopped working in 3.5.13, all tested against a 3.5.12 VM. I'm trying to instrument the code to find out what sort of regex is breaking, as simple ones seem OK. I suspect it may involve UTF strings. Trinity Bugzilla: http://bugs.trinitydesktop.org/show_bug.cgi?id=569 3.5.12 is OK with no errors, 3.5.13 reports JS regex errors, and the collapse/expand comments links no longer work (first four of a long list of error messages follow). Error: http://bugs.trinitydesktop.org/js/yui/yahoo-dom-event/yahoo-dom-event.js: SyntaxError: Invalid regular expression Error: http://bugs.trinitydesktop.org/show_bug.cgi?id=569: TypeError: Attempted to access 'onDOMReady' property on undefined object (result of expression YAHOO.util.Event.onDOMReady) Error: http://bugs.trinitydesktop.org/show_bug.cgi?id=569: TypeError: Attempted to access 'removeClass' property on undefined object (result of expression YAHOO.util.Dom.removeClass) Error: http://bugs.trinitydesktop.org/show_bug.cgi?id=569: TypeError: Attempted to access 'getX' property on undefined object (result of expression YAHOO.util.Dom.getX) Youtube, http://www.youtube.com/watch?v=BYzJ7ElwPWs&hd=1 3.5.12 is OK with no errors. 3.5.13: "Show more" link doesn't work, JS console reports errors (again first four of a long list) Error: http://s.ytimg.com/yt/jsbin/www-core-vfleHrebX.js: SyntaxError: Invalid regular expression Error: http://www.youtube.com/watch?v=BYzJ7ElwPWs&hd=1: TypeError: Value undefined (result of expression yt.setConfig) is not an object. Cannot be called. Error: http://www.youtube.com/watch?v=BYzJ7ElwPWs&hd=1: TypeError: Value undefined (result of expression yt.setConfig) is not an object. Cannot be called. Error: http://www.youtube.com/watch?v=BYzJ7ElwPWs&hd=1: TypeError: Value undefined (result of expression yt.setMsg) is not an object. Cannot be called. Error: http://www.youtube.com/watch?v=BYzJ7ElwPWs&hd=1: TypeError: Value undefined (result of expression yt.setConfig) is not an object. Cannot be called. Error: http://www.youtube.com/watch?v=BYzJ7ElwPWs&hd=1: TypeError: Attempted to access 'subscribe' property on undefined object (result of expression yt.pubsub.subscribe) PHPbbs uses AJAX from Yahoo and Google APIs for many functions and they no longer work, again this was clean on 3.5.12, again the first error reported is an invalid JS regex: Error: http://www.partyvibe.com/forums/clientscript/yui/yuiloader-dom-event/yuiloader-dom-event.js,qv=417.pagespeed.ce.AGEBGqKOJH.js: SyntaxError: Invalid regular expression Error: http://www.partyvibe.com/forums/clientscript/yui/connection/connection-min.js,qv=417.pagespeed.ce.FhCd5mku7f.js: TypeError: Value undefined (result of expression YAHOO.util.CustomEvent) is not an object. Cannot be used with new. Error: http://www.partyvibe.com/forums/clientscript/vbulletin-core.js,qv=417.pagespeed.ce.CZG5KnuAvR.js: TypeError: Value undefined (result of expression YAHOO.util.CustomEvent) is not an object. Cannot be used with new. Error: http://www.partyvibe.com/forums/clientscript/vbulletin_multi_quote.js,qv=417.pagespeed.ce.Xnnpkkfe5J.js: TypeError: Attempted to access 'subscribe' property on undefined object (result of expression vB_XHTML_Ready.subscribe) Error: http://www.partyvibe.com/forums/clientscript/vbulletin-editor.js?v=417: TypeError: Attempted to access 'subscribe' property on undefined object (result of expression vB_XHTML_Ready.subscribe) Error: http://www.partyvibe.com/forums/clientscript/vbulletin_quick_edit.js,qv=417.pagespeed.ce.C7-_IQElb4.js: TypeError: Attempted to access 'attachinfo' property on undefined object (result of expression vBulletin.attachinfo) Error: http://www.partyvibe.com/forums/clientscript/vbulletin_ajax_taglist.js,qv=417.pagespeed.ce.6jvNRZKPxD.js: TypeError: Attempted to access 'subscribe' property on undefined object (result of expression vB_XHTML_Ready.subscribe) Error: http://www.partyvibe.com/forums/clientscript/vbulletin_ajax_suggest.js?v=417: TypeError: Attempted to access property on null object (result of expression webkit_version[1]) I think the problem is that libkjs isn't finding libpcre and hence only allows non-perl-compatible regexes. ldd shows a big difference between libkjs 3.5.12:
ldd /opt/trinity/lib/libkjs.so.1.2.0 | sort
/lib/ld-linux.so.2 (0xb7844000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7520000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7502000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7666000)
libpcre.so.3 => /lib/libpcre.so.3 (0xb7782000)
libpcreposix.so.3 => /usr/lib/libpcreposix.so.3 (0xb77b5000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb768c000)
linux-gate.so.1 => (0xb7843000)
and 3.5.13:
(snip 40 lines of library linkages which doesn't show libpcre)
libpcre-dev is definitely installed by the Debian build system, but apparently not being picked up by whatever is in place of ./configure nowadays.
The autoconf test is in kjs/configure.in.in.
Raising priority to block R14.0 release as fix should be relatively simple. Created attachment 235 [details]
Enable pcre support in kdelibs
Fix confirmed - thanks so much for a brilliant Christmas present :-) Only difference I can see is that we now pull in libpcre instead of libpcreposix. However I think this is OK because 1) Javascript REs are a bastardised early version of PCREs and not POSIX REs. 2) KDE4 libkjs also uses plain libpcre 3) With the patch, I haven't yet found any regressions that are still regressed. Thanks again, Nick Committed to GIT in hash b911168. Thanks for reporting and testing! |