Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined user seems to cause trouble #2

Open
jankeromnes opened this issue Jun 19, 2011 · 2 comments
Open

undefined user seems to cause trouble #2

jankeromnes opened this issue Jun 19, 2011 · 2 comments

Comments

@jankeromnes
Copy link
Contributor

So after renaming the codemirror.plug.js file, I tested the whole application and typed quite rapidly until I got this error (look for the second $new, where some undefined user sends information and causes a server crash).

/$new
validated action /$new
--receiving from 1308506277204 "=266\t+l\t=185"
--caching =266 +l =185 for user 1308506267947
--sync =266 +l =185
event modif yields undefined
--sending to 1308506267947 "=266\t+l\t=185"
--hence closing dispatch for 1308506267947
event modif yields {"user":1308506277204,"delta":"=266\t+l\t=185","rev":72}
subsequently writing it
/$dispatch
validated action /$dispatch
--connect dispatch [1308506267947]
/$new
validated action /$new
query: {"rev":73} SyntaxError: Unexpected end of input // HERE BEGINS UTTER CHAOS
--receiving from undefined undefined
--nonexisting user [undefined]
query: {} SyntaxError: Unexpected token ILLEGAL
--receiving from undefined "=267\t+y\t=185"
--nonexisting user [undefined]
/$new
validated action /$new
--receiving from 1308506277204 "=268\t+b\t=185"
--caching =268 +b =185 for user 1308506267947
--sync =268 +b =185

/home/jan/pro/dev/lib/diff_match_patch.js:28
f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source
^
Error: Delta length (453) does not equal source text length (452).
at Error (unknown source)
at diff_match_patch.diff_fromDelta (/home/jan/pro/dev/lib/diff_match_patch.js:28:30)
at sync (/home/jan/pro/dev/server.js:30:26)
at Object.addnewstuff as new
at IncomingMessage. (/home/jan/pro/dev/lib/camp.js:122:57)
at IncomingMessage.emit (events.js:64:17)
at HTTPParser.onBody (http.js:121:23)
at Socket.ondata (http.js:1018:22)
at Socket._onReadable (net.js:684:27)
at IOWatcher.onReadable as callback
make: *** [test] Error 1

@jankeromnes
Copy link
Contributor Author

Here again some undefined stuff, as if the client is sending incomplete data?

/$new
validated action /$new
--receiving from 1308507586483 "=104\t+r\t=298"
--caching =104 +r =298 for user 1308507591431
--sync =104 +r =298
event modif yields undefined
--sending to 1308507591431 "=104\t+r\t=298"
--hence closing dispatch for 1308507591431
event modif yields {"user":1308507586483,"delta":"=104\t+r\t=298","rev":31}
subsequently writing it
/$dispatch
validated action /$dispatch
--connect dispatch [1308507591431]
/$new
validated action /$new
query: {"rev":32,"user":1308507586483} SyntaxError: Unexpected token ILLEGAL // HERE AGAIN UTTER CHAOS
--receiving from 1308507586483 undefined
--caching undefined for user 1308507591431
--sync undefined

/home/jan/pro/dev/lib/diff_match_patch.js:27
tch.prototype.diff_fromDelta=function(a,b){for(var c=[],d=0,e=0,f=b.split(/\t/
^
TypeError: Cannot call method 'split' of undefined
at diff_match_patch.diff_fromDelta (/home/jan/pro/dev/lib/diff_match_patch.js:27:82)
at sync (/home/jan/pro/dev/server.js:30:26)
at Object.addnewstuff as new
at IncomingMessage. (/home/jan/pro/dev/lib/camp.js:122:57)
at IncomingMessage.emit (events.js:64:17)
at HTTPParser.onBody (http.js:121:23)
at Socket.ondata (http.js:1018:22)
at Socket._onReadable (net.js:684:27)
at IOWatcher.onReadable as callback
make: *** [test] Error 1

Are these two error logs related to the too-fast CodeMirror bug you mentioned?

@espadrine
Copy link
Owner

Yep, that's the error I've been talking about.

On Sun, Jun 19, 2011 at 8:04 PM, jankeromnes
[email protected]
wrote:

So after renaming the codemirror.plug.js file, I tested it and typed quite rapidly until I got this error (look for the second $new, where some undefined user sends information and causes a server crash).

/$new
validated action /$new
--receiving from 1308506277204 "=266\t+l\t=185"
--caching =266  +l      =185 for user 1308506267947
--sync =266     +l      =185
event modif yields undefined
--sending to 1308506267947 "=266\t+l\t=185"
--hence closing dispatch for 1308506267947
event modif yields {"user":1308506277204,"delta":"=266\t+l\t=185","rev":72}
subsequently writing it
/$dispatch
validated action /$dispatch
--connect dispatch [1308506267947]
/$new
validated action /$new
query: {"rev":73} SyntaxError: Unexpected end of input   // HERE BEGINS UTTER CHAOS
--receiving from undefined undefined
--nonexisting user [undefined]
query: {} SyntaxError: Unexpected token ILLEGAL
--receiving from undefined "=267\t+y\t=185"
--nonexisting user [undefined]
/$new
validated action /$new
--receiving from 1308506277204 "=268\t+b\t=185"
--caching =268  +b      =185 for user 1308506267947
--sync =268     +b      =185

/home/jan/pro/dev/lib/diff_match_patch.js:28
f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source
                            ^
Error: Delta length (453) does not equal source text length (452).
   at Error (unknown source)
   at diff_match_patch.diff_fromDelta (/home/jan/pro/dev/lib/diff_match_patch.js:28:30)
   at sync (/home/jan/pro/dev/server.js:30:26)
   at Object.addnewstuff as new
   at IncomingMessage. (/home/jan/pro/dev/lib/camp.js:122:57)
   at IncomingMessage.emit (events.js:64:17)
   at HTTPParser.onBody (http.js:121:23)
   at Socket.ondata (http.js:1018:22)
   at Socket._onReadable (net.js:684:27)
   at IOWatcher.onReadable as callback
make: *** [test] Error 1

Reply to this email directly or view it on GitHub:
#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants