Move path calculator causes Browser Crash

If you find a bug please report it here

Move path calculator causes Browser Crash

Postby KGB » Sun Jul 11, 2010 12:56 am

Anyone else have this problem?

When I click on a unit, then move the map, then click far away (as in more than the unit can move in 1 or even 2 turns) the movement path calculator crashes my browser (Firefox - latest version) about 1 in 10 times.

Typically during a turn I'll experience anywhere from 2-5 complete crashes and restarts of Firefox depending on how many units I have to move.

It appears to me that the more times the movement path calculator is used, the closer I get to a crash of the browser. There appears to be some kind of limit / resource that the movement path calculator leaks/exceeds that causes the eventual crash. It's very annoying to say the least.

Also I've mentioned this before, but I *never* get any of the sounds in the game to play in Firefox. The only time I ever get the click sounds is after a crash-restart of Firefox. After moving a couple of units I lose the sounds again so maybe that's related to why it's crashing.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Move path calculator causes Browser Crash

Postby HaZe » Sun Jul 11, 2010 8:31 am

Exactly the same here.

Firefox 3.3.6
HaZe
 
Posts: 3
Joined: Sun May 30, 2010 11:05 am

Re: Move path calculator causes Browser Crash

Postby piranha » Sat Jul 24, 2010 8:43 am

I think snotling will do some optimizing on the path calculator but if you want to avoid this problem in the meantime you can use Chrome or Opera instead.

The path calculator is making a lot of calculations when drawing paths and the longer the more testing required.
Its supposed to return the best path found after 2 seconds but perhaps it can break before that happens.

But Chrome javascript parsing is about 3 times faster than FF so you will get better paths and no crashes using it.

Check this benchmark diagram:
http://ie.microsoft.com/testdrive/bench ... fault.html

For us the improvements coming with IE9 are very welcome as beta3 is extremely choppy in IE8.
According to that benchmark test Chrome is 15 times faster than IE8 but in some of our testing its closer to 100 times faster :o .

Anyway I know the choice of browser is important for a lot of people and FF have such a good reputation but its worth testing chrome. After using it only to test our game I have now switched over to using it as my standard browser because the speed.
User avatar
piranha
Site Admin
 
Posts: 1188
Joined: Fri Feb 12, 2010 9:44 pm

Re: Move path calculator causes Browser Crash

Postby KGB » Sat Jul 24, 2010 5:04 pm

Piranha,

Thanks for the tip on Chrome/Opera. I have Chrome installed but I much prefer Firefox.

Maybe I didn't explain the bug well enough. I don't think the crash is caused by too many calculations. When I get the crash it happens *instantly*. By that I mean:

A) I move the map by clicking on the mini-map
B) I click on a unit/stack
C) I move the map by clicking on the mini-map (sometimes the destination does not require a mini-map click)
D) I click on the destination.
E) Firefox crashes instantly (not after 1 or 2 seconds of calculating a path)

I've definitely seen the 2 second timeout many times if I click on complex paths. Those do not normally cause crashes. They just cause a 2 second delay.

I suspect that somehow the server or the javascript code doesn't realize I've selected a new stack (even tho I get the highlighted stack) or some resource from the last path calculation wasn't free'd properly so that eventually I run out of some resource that causes the instant crash.

Note also that I usually click the deselect stack/unit button often during my turn then click another stack/unit to prepare to move it. Maybe something isn't getting released properly. Or maybe when a stack runs out of moves in rough terrain (eg has 3 moves left on hills but can't move because it requires 6 moves) something gets not free'd.

I'd be more than happy to run some debug code and post the results if it would help you find the problem because it's hugely annoying to have the browser crash/restart multiple times a turn (in games where I have a lot of men to move).

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Move path calculator causes Browser Crash

Postby KGB » Wed Aug 18, 2010 9:57 pm

Some more info on this after paying attention to see exactly what causes the crashes (sometimes it's handy playing in 20 games and doing 10 turns a day :lol: )

I've noticed a lot of crashes (not every time) when doing the following:

1) I click on a stack (3+ armies) in a city that is already grouped.
2) I deselect a unit or two (manually via the individual unit icons under the map). At the same time I often add in a unit from the city that just got produced (usually my stack is in the upper left corner).
3) I click on a destination to move the remaining stack.

So for example, say I had a stack of 3 Light Cav + 1 Elf (all grouped) in the upper left corner of a city that is producing Light Calv. On my next turn, the stack of 4 is grouped but the newly produced Light Calvary isn't. So I select the stack, add in the Light Cavalry and remove the Elf (I want to move the full 20) using only the icons (not the group all button). Then I click to move on a distant destination (not sure if it has to be more than the 20 moves the Cavalry can move).

The crash in this case happens instantly if it happens. I suspect something about deselecting/selecting units causes some kind of exception. Again, not 100% of the time does this happen or I can't quite get the 100% case yet. Just that it happens quite often.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Move path calculator causes Browser Crash

Postby SnotlinG » Sat Aug 21, 2010 10:57 am

Thanks for all investigations :-)
Im not giving much feedback here as Im still busy with the other development of mapeditor etc etc. When I reach the bugfixing stage I will re-read all info here and probably come with feedback/questions.

So its very appreciated even though Im currently not replying much here.
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Move path calculator causes Browser Crash

Postby bras » Sat Nov 13, 2010 2:27 am

I have exactly the same problem as KGB described. I mostly use Firefox and sometimes use IE, but the crashes occur in Firefox only. I often do the same manipulations as KGB described.
bras
 
Posts: 22
Joined: Wed Sep 22, 2010 10:52 pm

Re: Move path calculator causes Browser Crash

Postby SnotlinG » Thu Nov 25, 2010 8:42 pm

Hello,
Im now looking at this bug for Beta3, but so far unable to replicate it using Firefox.
Have you found out any specific order of actions that cause it?
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Move path calculator causes Browser Crash

Postby bras » Thu Nov 25, 2010 9:04 pm

To me it seems that the crushes are particularly likely when a group has to go through another group and the total number of units in both groups exceeds 8.

Another correlation seems to be with a more complicated path to be calculated, in particular if it involves crossing to the sea or the mountains. But I am not saying this occurs on its own only, it could well be coupled with something else that KGB described, perhaps some selecting and unselecting.
bras
 
Posts: 22
Joined: Wed Sep 22, 2010 10:52 pm

Re: Move path calculator causes Browser Crash

Postby SnotlinG » Thu Nov 25, 2010 9:59 pm

Ok, thanks for the feedback, i´ll see if I can replicate :-)

I hope you shouldnt get the crash during moving through your own units anymore as I fixed this bug even in Beta2 the other day :-)
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 33 guests

cron
Not able to open ./cache/data_global.php