Closed brghena closed 7 years ago
Unixkcd is in it for the long haul, so any reports are extremely helpful! What was the exact command string you typed in?
guest@xkcd:/$ watch
An internal error occured: TypeError: missing argument 1 when calling function this.commands[d].apply
Very strange! Watch isn't even a command. I wonder how that happened...
Are you able to reproduce this bug?
i get this bug consistantly
Yup, it occurs for me every time watch is used as the primary command. I was thinking maybe some code for watch was started but never finished, but a search through the code led to no references to watch at all.
Also, only the exact word "watch" causes the bug. (i.e. "w", "wa", ... "watc" don't cause it). A slightly different error is caused by "watch" followed by a space and then any other string. Another TypeError: "this.commands[d].apply(this , f) is not a function" It looks like the system is attempting to call watch even though it doesn't exist. Its a little weird that it isn't caught by the default command case though.
Hmm... It looks like this bug doesn't affect Internet Explorer. I'm in Firefox 3.6.3 right now and I get the bug, but when I switch to IE everything works like it should (that's a first). The bug might be VERY tricky to fix if its a browser specific issue. Can anyone else get it in other browsers?
It would appear that a 'watch' function gets added on to objects in Firefox, see: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/watch This is causing the 'in' operator to return true for watch. 'hasOwnProperty' does not seem to have this issue.
Oh yeah! I forgot that Mozilla had that non-standard property. That makes sense. Well sleuthed, Jushar. Now we just need to research the best fix. :)
I know its getting close to the end of the day (EST anyway), but working toward the ideal of code perfection its worth noting that something is not right with the "watch" command.
The try/catch seems to have grabbed the error and nicely printed it to screen: "An internal error occurred: TypeError: missing argument 1 when calling function this.commands[d].apply"
I'm not sure where the error is in the code though. Good luck!