Hasty Aliance - 1st turn never ends

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
dkulis

Hasty Aliance - 1st turn never ends

Post by dkulis »

I have a problem in Hasty Aliance - 1st turn never ends. This is ONLY with with v0.7.7 & v0.7.8-CVS, v0.7.6 works fine.

Symptoms:
- I do my moves for 1st turn
- Li'sar does hers
- orcs do their moves and then nothing more happens. I can scroll etc. (i.e. normal operations during AI turn)

Meanwhile wesnoth.exe process has around 50% CPU usage and keeps on grabbing more memory.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Your bug report lacks all the needed details.

What operating system are you using. If GNU/Linux what distribution? Did you install some pre-packaged binary or did you compile yourself? If you compiled yourself what versions of dependency libraries you have? What optimizations you used when compiling?

- Miyo
dkulis

Post by dkulis »

miyo wrote:What operating system are you using.
Win2k Pro
miyo wrote:Did you install some pre-packaged binary or did you compile yourself? If you compiled yourself what versions of dependency libraries you have?
- v0.7.6 (the Ok version) - built with VS2003.NET
- v0.7.7 (problem version) - prepackaged Win executable
- v0.7.8-CVS from 2004.05.20 (same problem) - built with VS2003.NET with
  • - SDL v1.2.7 devel_VC6
    - SDL_image v1.2.3 devel_VC6
    - SDL_mixer v1.2.5 devel_VC6
    - SDL_net v1.2.5 devel_VC6
    - SDL_ttf v2.0.6 devel_VC6
miyo wrote:What optimizations you used when compiling?
Default ones with VC (can't specify)

Anything else?
O'Dubhghaill

Post by O'Dubhghaill »

I'm having the exact same problem on Wesnoth 0.7.7 on debian unstable using the current unstable binary package.
thk

Post by thk »

Yep, same over here on Mandrake 9.2. There is a huge amount of text-output during the whole game in the terminal I start Wesnoth from and when the 'never ending turn' runs that output seems to be repeating itself, like in some infinite loop (ain't sure, cause it's coming so fast, but it _looks_ the same...)
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Start Wesnoth from terminal with 'wesnoth &> /var/tmp/wesnoth.log'

- Miyo
cipso

same problem (bug 9038)

Post by cipso »

I reported same problem.

https://savannah.nongnu.org/bugs/?func= ... em_id=9038

I found that Wesnoth is eating memory at that turn... it ate 160megs (then I quit that scenario).

-cipso
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Well this is happening to me too, with Debian Linux. Using debug I discovered that this happens right after the troll leader is moved, when there are only 2 trolls left to be moved.
This is probably an AI problem. Here is a screenshout including AI output:
jyrierik
Posts: 65
Joined: May 23rd, 2004, 10:12 pm

Post by jyrierik »

I'm having the same problem with 0.7.7 with the Mac OS X version running X.3.3 (Build 7F44). Goes into never-neverland after the visible Orcs/Trolls finish their move & uses up as much free processor cycles as it can grab according to "top". Previous versions ran fine (although I sometimes had some sluggishness from time to time). Looks like an OS independent problem.

Jyri
jbmesserly

Post by jbmesserly »

It looks like the AI is caught in an infinite loop. It can't get out of ai::do_move(). In particular, it's looping in the acquire villages movement phase. That part calls ai::get_villages(...), which for some reason returns "got_village == true" endlessly.

I'll see if I can figure out why that's happening.
jbmesserly

Post by jbmesserly »

Problem fixed in 0.7.8-CVS.

The fix is for get_villages(...) to return true if it *actually* makes a move, not just that it *tried* to make some moves. Otherwise, it got stuck "trying" to make a move forever.

Of course, the real question is why get_village_combinations(...) is getting caught in a loop returning the same invalid moves over and over again. I'm not sure if that needs to be looked into or not; it suggests that that function might not be working properly.

In any case, it's not looping now and the AI seems to be making reasonable moves. I'll save further investigation for another day (or night).

Dave, if you have any ideas what's going on with the new AI village code, let me know.
jbmesserly

Post by jbmesserly »

p.s.-- see the comment of my CVS commit to src/ai.cpp, it goes into more gory detail about the problem and the fix that I added.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Hmm...I'm looking into what the problem is.

get_villages() should no longer have to cause the ai to be recalculated from scratch anymore, since it generally does all the moves it has to, instead of just one move.

The only time it should return invalid moves though, is if someone got ambushed, but that clearly isn't happening here, so I'll have to look into that.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Eponymous-Archon
Posts: 558
Joined: February 1st, 2004, 6:17 pm
Location: New Jersey, USA

Post by Eponymous-Archon »

miyo wrote:Your bug report lacks all the needed details.
Well, a few details anyway.

Sith, any chance for a recompiled Mac version with the CVS bugfix in there?

I know you're just sitting around looking for something to do. ;-)
The Eponymous Archon
Post Reply