Stack overflow
-
John Fairbairn
- Oza
- Posts: 3724
- Joined: Wed Apr 21, 2010 3:09 am
- Has thanked: 20 times
- Been thanked: 4672 times
Stack overflow
For, I think, the last three days (today is 16 August 2010) I have been getting a message on this site only, using Windows and Internet Explorer, that a script is running on this page and may cause Explorer to run slowly. If I stop it, nothing seems to happen. If I let it run there is an instant "stack overflow at line 1161".
It does not appear on every page I look at. My impression is that it only appears on pages with the Eidogo viewer (which I very rarely use and have not used for some time).
It does not appear on every page I look at. My impression is that it only appears on pages with the Eidogo viewer (which I very rarely use and have not used for some time).
- kirkmc
- Lives in sente
- Posts: 1072
- Joined: Tue Apr 20, 2010 3:51 am
- Rank: 5K KGS
- GD Posts: 1165
- KGS: Dogen
- Location: Stratford-upon-Avon, England
- Has thanked: 32 times
- Been thanked: 70 times
- Contact:
Re: Stack overflow
That happens when you try to pile up the stones too high. With yunzi stones you can make taller stacks.
My blog about Macs and more: Kirkville
-
bobmcg
- Dies in gote
- Posts: 22
- Joined: Wed May 26, 2010 12:17 pm
- GD Posts: 0
- Has thanked: 4 times
- Been thanked: 4 times
Re: Stack overflow
John Fairbairn wrote:For, I think, the last three days (today is 16 August 2010) I have been getting a message on this site only, using Windows and Internet Explorer, that a script is running on this page and may cause Explorer to run slowly. If I stop it, nothing seems to happen. If I let it run there is an instant "stack overflow at line 1161".
It does not appear on every page I look at. My impression is that it only appears on pages with the Eidogo viewer (which I very rarely use and have not used for some time).
I have been getting the same message but I've always clicked "yes" regarding stopping the script so I haven't seen the "stack overflow". I tried stopping the script and using the eidogo player after that and it worked OK.
-
bobmcg
- Dies in gote
- Posts: 22
- Joined: Wed May 26, 2010 12:17 pm
- GD Posts: 0
- Has thanked: 4 times
- Been thanked: 4 times
Re: Stack overflow
fwiffo wrote:What version of IE?
I'm using IE 8. I do get the stack overflow immediately after clicking not to turn off the script, though, as I said above, the eidogo player works all right if I do turn off the script. What is that script anyhow?
- fwiffo
- Gosei
- Posts: 1435
- Joined: Tue Apr 20, 2010 6:22 am
- Rank: Out of practice
- GD Posts: 1104
- KGS: fwiffo
- Location: California
- Has thanked: 49 times
- Been thanked: 168 times
Re: Stack overflow
It may be completely unrelated to eidogo. The site runs javascript for other things too. No idea which is causing the error. Is it a particular screen or thread that produces the error?
I'll try to look into it sometime this week.
I'll try to look into it sometime this week.
-
bobmcg
- Dies in gote
- Posts: 22
- Joined: Wed May 26, 2010 12:17 pm
- GD Posts: 0
- Has thanked: 4 times
- Been thanked: 4 times
Re: Stack overflow
fwiffo wrote:It may be completely unrelated to eidogo. The site runs javascript for other things too. No idea which is causing the error. Is it a particular screen or thread that produces the error?
I'll try to look into it sometime this week.
It happened again just now on page three of the thread "Comparison of Interest in Pro Go by Country": viewtopic.php?f=13&t=1365&start=40
It doesn't happen on the first two pages of the thread which don't have Eidogo players, only the third when the post including an eidogo player is on the page.
-
bobmcg
- Dies in gote
- Posts: 22
- Joined: Wed May 26, 2010 12:17 pm
- GD Posts: 0
- Has thanked: 4 times
- Been thanked: 4 times
Re: Stack overflow
bobmcg wrote:fwiffo wrote:It may be completely unrelated to eidogo. The site runs javascript for other things too. No idea which is causing the error. Is it a particular screen or thread that produces the error?
I'll try to look into it sometime this week.
It happened again just now on page three of the thread "Comparison of Interest in Pro Go by Country": viewtopic.php?f=13&t=1365&start=40
It doesn't happen on the first two pages of the thread which don't have Eidogo players, only the third when the post including an eidogo player is on the page.
I just tried this thread viewtopic.php?f=15&t=1097 which has an Eidogo player in it's first post and I did not get the script error.
-
hyperpape
- Tengen
- Posts: 4382
- Joined: Thu May 06, 2010 3:24 pm
- Rank: AGA 3k
- GD Posts: 65
- OGS: Hyperpape 4k
- Location: Caldas da Rainha, Portugal
- Has thanked: 499 times
- Been thanked: 727 times
Re: Stack overflow
On IE7, I get the stack overflow, but without the message that a script may cause the site to run slowly. It doesn't appear in every page involving the eidogo viewer: I just looked at the congress photos thread in the AGA forum, and had no problem. The one thread it always happened on was "Comparison of Pro Interest By Country".
- deja
- Lives in gote
- Posts: 379
- Joined: Sun Apr 18, 2010 9:44 am
- GD Posts: 0
- Has thanked: 105 times
- Been thanked: 123 times
Re: Stack overflow
Yep, happening to me as well. I clicked the links that bobmcg posted and exact same thing happens. Using IE8, although I've recently thrown in the towel and started using Firefox. 
"This is a game that rewards patience and balance. You must think like a man of action and act like a man of thought."
-Jonas Skarssen
-Jonas Skarssen
- apetresc
- Lives with ko
- Posts: 256
- Joined: Wed Apr 21, 2010 3:42 pm
- Rank: AGA 1k
- GD Posts: 1190
- KGS: apetresc
- IGS: apetresc
- OGS: apetresc
- Universal go server handle: apetresc
- Location: Waterloo, Ontario (Canada)
- Has thanked: 110 times
- Been thanked: 146 times
- Contact:
Re: Stack overflow
I just reproduced it under Chrome in Linux (!!). There was no script error, but it took a good 30+ seconds for Javascript to run. Since I'm on Chrome I can probably figure out exactly what script is causing it. I'll post back in here.
-
John Fairbairn
- Oza
- Posts: 3724
- Joined: Wed Apr 21, 2010 3:09 am
- Has thanked: 20 times
- Been thanked: 4672 times
Re: Stack overflow
I'm on IE8.
Not sure which threads give me the message but it's definitely NOT any Malkovich forums as I zap those.
Not sure which threads give me the message but it's definitely NOT any Malkovich forums as I zap those.
- apetresc
- Lives with ko
- Posts: 256
- Joined: Wed Apr 21, 2010 3:42 pm
- Rank: AGA 1k
- GD Posts: 1190
- KGS: apetresc
- IGS: apetresc
- OGS: apetresc
- Universal go server handle: apetresc
- Location: Waterloo, Ontario (Canada)
- Has thanked: 110 times
- Been thanked: 146 times
- Contact:
Re: Stack overflow
So the problem is a bug in the all.compressed.js script. The findCaptures() method has an infinite recursion somewhere around line 1167. This bug actually exists on all platforms and all browsers; the reason the Firefox users never noticed it is that the stack depth on Firefox is much lower, so it just errors out before the time lag becomes noticeable. If you look at your Javascript Error Console in Firefox you will see:
Other browsers, like IE, Chrome, and Safari, will happily recurse for a long time (or forever, in IE/Safari's case) leading to the timeout.
Whoever wants to help fix this (Kirby, Joaz, fwiffo?) I recommend investigating by setting a breakpoint on line 1167, and step through a bunch of times. Notice how pendingCaptures.length just keeps going up forever, with the call on line 1172. The call stack will contain hundreds of copies of findCaptures().
I'm not sure what it is about this SGF that causes the problem; it seems well-formed to me, and CGoban has no problems parsing it. I'll keep looking.
Code: Select all
Error: too much recursion
Source File: http://www.lifein19x19.com/eidogo-phpbb3/eidogo/player/js/all.compressed.js
Line: 1161Other browsers, like IE, Chrome, and Safari, will happily recurse for a long time (or forever, in IE/Safari's case) leading to the timeout.
Whoever wants to help fix this (Kirby, Joaz, fwiffo?) I recommend investigating by setting a breakpoint on line 1167, and step through a bunch of times. Notice how pendingCaptures.length just keeps going up forever, with the call on line 1172. The call stack will contain hundreds of copies of findCaptures().
I'm not sure what it is about this SGF that causes the problem; it seems well-formed to me, and CGoban has no problems parsing it. I'll keep looking.
- apetresc
- Lives with ko
- Posts: 256
- Joined: Wed Apr 21, 2010 3:42 pm
- Rank: AGA 1k
- GD Posts: 1190
- KGS: apetresc
- IGS: apetresc
- OGS: apetresc
- Universal go server handle: apetresc
- Location: Waterloo, Ontario (Canada)
- Has thanked: 110 times
- Been thanked: 146 times
- Contact:
Re: Stack overflow
Okay, I've figured out the problem. The problem is that the SGF in that thread uses an "incorrect" SGF property -- it used "KO[6.5]" instead of "KM[6.5]" to represent the komi. The KO property actually is meant to indicate a ko square, so the EidoGo parser was getting very confused about where the ko was when there were, in fact, 0 stones on the board at the time 
I've fixed the offending SGF for the meantime, but we should go and toughen up the EidoGo parser to fail more gracefully on incorrect SGF tags.
I've fixed the offending SGF for the meantime, but we should go and toughen up the EidoGo parser to fail more gracefully on incorrect SGF tags.
- fwiffo
- Gosei
- Posts: 1435
- Joined: Tue Apr 20, 2010 6:22 am
- Rank: Out of practice
- GD Posts: 1104
- KGS: fwiffo
- Location: California
- Has thanked: 49 times
- Been thanked: 168 times
Re: Stack overflow
Wow, that's weird. What app made the offending SGF? I know the eidogo code fairly well and have my own fork on github, so I'll fix the bug when I have time.



