It is currently Thu Sep 04, 2025 8:07 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 20 posts ] 
Author Message
Offline
 Post subject: Stack overflow
Post #1 Posted: Mon Aug 16, 2010 3:07 am 
Oza

Posts: 3724
Liked others: 20
Was liked: 4672
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).

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #2 Posted: Mon Aug 16, 2010 3:15 am 
Lives in sente
User avatar

Posts: 1072
Location: Stratford-upon-Avon, England
Liked others: 33
Was liked: 72
Rank: 5K KGS
GD Posts: 1165
KGS: Dogen
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


This post by kirkmc was liked by: Joaz Banbeck
Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #3 Posted: Mon Aug 16, 2010 5:36 am 
Dies in gote

Posts: 22
Liked others: 4
Was liked: 4
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.

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #4 Posted: Mon Aug 16, 2010 6:34 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
What version of IE?

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #5 Posted: Mon Aug 16, 2010 6:59 am 
Dies in gote

Posts: 22
Liked others: 4
Was liked: 4
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?

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #6 Posted: Mon Aug 16, 2010 7:28 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
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.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #7 Posted: Mon Aug 16, 2010 7:38 am 
Dies in gote

Posts: 22
Liked others: 4
Was liked: 4
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.

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #8 Posted: Mon Aug 16, 2010 7:42 am 
Dies in gote

Posts: 22
Liked others: 4
Was liked: 4
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.

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #9 Posted: Mon Aug 16, 2010 8:55 am 
Tengen

Posts: 4382
Location: Caldas da Rainha, Portugal
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
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".

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #10 Posted: Mon Aug 16, 2010 9:30 am 
Lives in gote
User avatar

Posts: 379
Liked others: 105
Was liked: 123
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. :cry:

_________________
"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

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #11 Posted: Mon Aug 16, 2010 9:55 am 
Lives with ko
User avatar

Posts: 251
Location: Waterloo, Ontario (Canada)
Liked others: 110
Was liked: 155
Rank: AGA 1k
GD Posts: 1190
KGS: apetresc
IGS: apetresc
OGS: apetresc
Universal go server handle: apetresc
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.

_________________
The road to wisdom? Well, it's plain, and simple to express: Err, and err, and err again; but less, and less, and less!
Image Image Image Image

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #12 Posted: Mon Aug 16, 2010 10:21 am 
Oza

Posts: 3724
Liked others: 20
Was liked: 4672
I'm on IE8.

Not sure which threads give me the message but it's definitely NOT any Malkovich forums as I zap those.

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #13 Posted: Mon Aug 16, 2010 11:00 am 
Lives with ko
User avatar

Posts: 251
Location: Waterloo, Ontario (Canada)
Liked others: 110
Was liked: 155
Rank: AGA 1k
GD Posts: 1190
KGS: apetresc
IGS: apetresc
OGS: apetresc
Universal go server handle: apetresc
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:
Code:
Error: too much recursion
Source File: http://www.lifein19x19.com/eidogo-phpbb3/eidogo/player/js/all.compressed.js
Line: 1161

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.

_________________
The road to wisdom? Well, it's plain, and simple to express: Err, and err, and err again; but less, and less, and less!
Image Image Image Image

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #14 Posted: Mon Aug 16, 2010 11:25 am 
Lives with ko
User avatar

Posts: 251
Location: Waterloo, Ontario (Canada)
Liked others: 110
Was liked: 155
Rank: AGA 1k
GD Posts: 1190
KGS: apetresc
IGS: apetresc
OGS: apetresc
Universal go server handle: apetresc
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.

_________________
The road to wisdom? Well, it's plain, and simple to express: Err, and err, and err again; but less, and less, and less!
Image Image Image Image


This post by apetresc was liked by: CarlJung
Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #15 Posted: Mon Aug 16, 2010 11:47 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
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.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #16 Posted: Mon Aug 16, 2010 12:30 pm 
Lives with ko
User avatar

Posts: 251
Location: Waterloo, Ontario (Canada)
Liked others: 110
Was liked: 155
Rank: AGA 1k
GD Posts: 1190
KGS: apetresc
IGS: apetresc
OGS: apetresc
Universal go server handle: apetresc
fwiffo wrote:
Wow, that's weird. What app made the offending SGF?


Good question; I PMed Kirby about it, since he posted it.

_________________
The road to wisdom? Well, it's plain, and simple to express: Err, and err, and err again; but less, and less, and less!
Image Image Image Image

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #17 Posted: Mon Aug 16, 2010 12:42 pm 
Oza

Posts: 3724
Liked others: 20
Was liked: 4672
Adrian: I'm impressed. Thank you.

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #18 Posted: Mon Aug 16, 2010 12:49 pm 
Lives in gote
User avatar

Posts: 429
Location: Sweden
Liked others: 101
Was liked: 73
Rank: SDK
KGS: CarlJung
Adrian = Javascript 9P.

_________________
FusekiLibrary, an opening library.
SGF converter tools: Wbaduk NGF to SGF | 440 go problems | Fuseki made easy | Tesuji made easy | Elementary training & Dan level testing | Dan Tutor Shortcut To Dan

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #19 Posted: Mon Aug 16, 2010 1:09 pm 
Dies in gote

Posts: 22
Liked others: 4
Was liked: 4
Good work Adrian! But why did the Eidogo app appear to work after I had nixed the script? Did it just skip the bad code an proceed from there?

Top
 Profile  
 
Offline
 Post subject: Re: Stack overflow
Post #20 Posted: Mon Aug 16, 2010 1:18 pm 
Lives with ko
User avatar

Posts: 251
Location: Waterloo, Ontario (Canada)
Liked others: 110
Was liked: 155
Rank: AGA 1k
GD Posts: 1190
KGS: apetresc
IGS: apetresc
OGS: apetresc
Universal go server handle: apetresc
Kirby got back to me; it was taken from the Korean Baduk Association site (if you steal the URL from their gibo_load() calls). I checked a few out and they all use KO instead of KM, and it doesn't affect them because they're really only intended to run in their own player which probably makes the same mistake. Just something to keep in mind.
bobmcg wrote:
Good work Adrian! But why did the Eidogo app appear to work after I had nixed the script? Did it just skip the bad code an proceed from there?

Exactly; it processes that part towards the end. You might have noticed that if you killed the script, it worked but it wasn't quite right; for example, the forward arrow buttons were still greyed out instead of red like they usually are. This is because the script wasn't quite done initializing everything.

_________________
The road to wisdom? Well, it's plain, and simple to express: Err, and err, and err again; but less, and less, and less!
Image Image Image Image


This post by apetresc was liked by: bobmcg
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group