You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Thomas Mohaupt (JIRA)" <ji...@apache.org> on 2009/11/24 08:18:39 UTC

[jira] Created: (COUCHDB-577) couchdb @ winxp: Simple RegExp's can not be executed

couchdb @ winxp: Simple RegExp's can not be executed
----------------------------------------------------

                 Key: COUCHDB-577
                 URL: https://issues.apache.org/jira/browse/COUCHDB-577
             Project: CouchDB
          Issue Type: Bug
          Components: JavaScript View Server
    Affects Versions: 0.10, 0.11
         Environment: WinXP, setup-couchdb-0.11.0b880589.exe, setup-couchdb-0.10.0.exe
            Reporter: Thomas Mohaupt


This show function failed on WinXP but pass on Linux:

function (doc, req) {
  var rr2 = new RegExp("\n");
  rr2.exec("fafdadsds");
  var rr = /\n/;
  rr.exec("fafdadsds");

  return "ok";
}

The first RegExp is ok, but the second one (simple form) can not be executed.

1> [debug] [<0.73.0>] 'GET' /c2/_design/dash/_show/overview {1,1}
Headers: [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
          {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
          {'Accept-Encoding',"gzip,deflate"},
          {'Accept-Language',"de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"},
          {'Cache-Control',"max-age=0"},
          {'Connection',"keep-alive"},
          {'Host',"127.0.0.1:5984"},
          {'Keep-Alive',"300"},
          {'User-Agent',"Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR
 3.5.30729)"}]
1> [debug] [<0.73.0>] OAuth Params: []
1> [info] [<0.98.0>] OS Process :: function raised error: TypeError: rr.exec is not a function
1> [info] [<0.98.0>] OS Process :: stacktrace: (null,[object Object])@:4
runShow(function (doc, req) {var rr2 = new RegExp("\n");rr2.exec("fafdadsds");var rr = /\n/;rr.exec("fafdadsds");return
"ok";},null,[object Object],"function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var
rr = /\\n/;\n  rr.exec(\"fafdadsds\");\n\n  return \"ok\";\n}\n\n")@../share/couchdb/server/main.js:388
("function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var rr = /\\n/;\n  rr.exec(\"fa
fdadsds\");\n\n  return \"ok\";\n}\n\n",null,[object Object])@../share/couchdb/server/main.js:358
@../share/couchdb/server/main.js:842

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-577) couchdb @ winxp: Simple RegExp's can not be executed

Posted by "Roger Binns (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794771#action_12794771 ] 

Roger Binns commented on COUCHDB-577:
-------------------------------------

I get exactly the same problem with the stock CouchDB 0.10 as shipped on Ubuntu 9.10.  At least now I know I am not going mad.  Even more perplexing the issue does no appear if I invoke CouchJS directly on my code and test data but does occur when using as view/list/show function.

> couchdb @ winxp: Simple RegExp's can not be executed
> ----------------------------------------------------
>
>                 Key: COUCHDB-577
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-577
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 0.10, 0.11
>         Environment: WinXP, setup-couchdb-0.11.0b880589.exe, setup-couchdb-0.10.0.exe
>            Reporter: Thomas Mohaupt
>
> This show function failed on WinXP but pass on Linux:
> function (doc, req) {
>   var rr2 = new RegExp("\n");
>   rr2.exec("fafdadsds");
>   var rr = /\n/;
>   rr.exec("fafdadsds");
>   return "ok";
> }
> The first RegExp is ok, but the second one (simple form) can not be executed.
> 1> [debug] [<0.73.0>] 'GET' /c2/_design/dash/_show/overview {1,1}
> Headers: [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
>           {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
>           {'Accept-Encoding',"gzip,deflate"},
>           {'Accept-Language',"de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"},
>           {'Cache-Control',"max-age=0"},
>           {'Connection',"keep-alive"},
>           {'Host',"127.0.0.1:5984"},
>           {'Keep-Alive',"300"},
>           {'User-Agent',"Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR
>  3.5.30729)"}]
> 1> [debug] [<0.73.0>] OAuth Params: []
> 1> [info] [<0.98.0>] OS Process :: function raised error: TypeError: rr.exec is not a function
> 1> [info] [<0.98.0>] OS Process :: stacktrace: (null,[object Object])@:4
> runShow(function (doc, req) {var rr2 = new RegExp("\n");rr2.exec("fafdadsds");var rr = /\n/;rr.exec("fafdadsds");return
> "ok";},null,[object Object],"function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var
> rr = /\\n/;\n  rr.exec(\"fafdadsds\");\n\n  return \"ok\";\n}\n\n")@../share/couchdb/server/main.js:388
> ("function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var rr = /\\n/;\n  rr.exec(\"fa
> fdadsds\");\n\n  return \"ok\";\n}\n\n",null,[object Object])@../share/couchdb/server/main.js:358
> @../share/couchdb/server/main.js:842

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-577) couchdb @ winxp: Simple RegExp's can not be executed

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-577:
--------------------------------------

    Skill Level: Regular Contributors Level (Easy to Medium)

> couchdb @ winxp: Simple RegExp's can not be executed
> ----------------------------------------------------
>
>                 Key: COUCHDB-577
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-577
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 0.10, 0.11
>         Environment: WinXP, setup-couchdb-0.11.0b880589.exe, setup-couchdb-0.10.0.exe
>            Reporter: Thomas Mohaupt
>
> This show function failed on WinXP but pass on Linux:
> function (doc, req) {
>   var rr2 = new RegExp("\n");
>   rr2.exec("fafdadsds");
>   var rr = /\n/;
>   rr.exec("fafdadsds");
>   return "ok";
> }
> The first RegExp is ok, but the second one (simple form) can not be executed.
> 1> [debug] [<0.73.0>] 'GET' /c2/_design/dash/_show/overview {1,1}
> Headers: [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
>           {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
>           {'Accept-Encoding',"gzip,deflate"},
>           {'Accept-Language',"de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"},
>           {'Cache-Control',"max-age=0"},
>           {'Connection',"keep-alive"},
>           {'Host',"127.0.0.1:5984"},
>           {'Keep-Alive',"300"},
>           {'User-Agent',"Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR
>  3.5.30729)"}]
> 1> [debug] [<0.73.0>] OAuth Params: []
> 1> [info] [<0.98.0>] OS Process :: function raised error: TypeError: rr.exec is not a function
> 1> [info] [<0.98.0>] OS Process :: stacktrace: (null,[object Object])@:4
> runShow(function (doc, req) {var rr2 = new RegExp("\n");rr2.exec("fafdadsds");var rr = /\n/;rr.exec("fafdadsds");return
> "ok";},null,[object Object],"function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var
> rr = /\\n/;\n  rr.exec(\"fafdadsds\");\n\n  return \"ok\";\n}\n\n")@../share/couchdb/server/main.js:388
> ("function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var rr = /\\n/;\n  rr.exec(\"fa
> fdadsds\");\n\n  return \"ok\";\n}\n\n",null,[object Object])@../share/couchdb/server/main.js:358
> @../share/couchdb/server/main.js:842

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-577) couchdb @ winxp: Simple RegExp's can not be executed

Posted by "Mark Hammond (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782192#action_12782192 ] 

Mark Hammond commented on COUCHDB-577:
--------------------------------------

I can only guess this is due to a difference in spidermonkey versions used by the Linux and Windows builds.

> couchdb @ winxp: Simple RegExp's can not be executed
> ----------------------------------------------------
>
>                 Key: COUCHDB-577
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-577
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 0.10, 0.11
>         Environment: WinXP, setup-couchdb-0.11.0b880589.exe, setup-couchdb-0.10.0.exe
>            Reporter: Thomas Mohaupt
>
> This show function failed on WinXP but pass on Linux:
> function (doc, req) {
>   var rr2 = new RegExp("\n");
>   rr2.exec("fafdadsds");
>   var rr = /\n/;
>   rr.exec("fafdadsds");
>   return "ok";
> }
> The first RegExp is ok, but the second one (simple form) can not be executed.
> 1> [debug] [<0.73.0>] 'GET' /c2/_design/dash/_show/overview {1,1}
> Headers: [{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
>           {'Accept-Charset',"ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
>           {'Accept-Encoding',"gzip,deflate"},
>           {'Accept-Language',"de-de,de;q=0.8,en-us;q=0.5,en;q=0.3"},
>           {'Cache-Control',"max-age=0"},
>           {'Connection',"keep-alive"},
>           {'Host',"127.0.0.1:5984"},
>           {'Keep-Alive',"300"},
>           {'User-Agent',"Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR
>  3.5.30729)"}]
> 1> [debug] [<0.73.0>] OAuth Params: []
> 1> [info] [<0.98.0>] OS Process :: function raised error: TypeError: rr.exec is not a function
> 1> [info] [<0.98.0>] OS Process :: stacktrace: (null,[object Object])@:4
> runShow(function (doc, req) {var rr2 = new RegExp("\n");rr2.exec("fafdadsds");var rr = /\n/;rr.exec("fafdadsds");return
> "ok";},null,[object Object],"function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var
> rr = /\\n/;\n  rr.exec(\"fafdadsds\");\n\n  return \"ok\";\n}\n\n")@../share/couchdb/server/main.js:388
> ("function (doc, req) {\n  var rr2 = new RegExp(\"\\n\");\n  rr2.exec(\"fafdadsds\");\n  var rr = /\\n/;\n  rr.exec(\"fa
> fdadsds\");\n\n  return \"ok\";\n}\n\n",null,[object Object])@../share/couchdb/server/main.js:358
> @../share/couchdb/server/main.js:842

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.