Iagno hangs every game or two in Ubuntu 12.04, is very slow to take AI turns, crashes, loops sounds and gives wrong score in the end. Worked fine in 11.10

Bug #988138 reported by Derek
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
gnome-games (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Following is spammed to ~/.xsession-errors - might be related.

** (iagno:30066): CRITICAL **: computer_player_move: assertion `self != NULL' failed

Once it hangs, if it is playing sounds of pieces, those loop indefinitely.
You can't close it using the X in the app window, or quit in the left Unity 2D bar.

You have to open a terminal and issue a kill.

After the kill, this is spammed to .xsession-errors.

unity-2d-shell: [WARNING] QDBusError("org.freedesktop.DBus.Error.UnknownMethod", "No such interface `org.ayatana.bamf.application' on object at path /org/ayatana/bamf/application890181547")

Also, I really really dislike the new error message that shows up on illegal moves. I assume that used to be in the footer of the app window, I can't recall. All I know is that every time it shows up, the playing area shrinks slightly, which is really distracting.

Oh, also, the application seems to be overall much more sluggish than in the prior release.

Revision history for this message
Derek (bugs-m8y) wrote :

Oh. Here's a bit more from the log...
This after trying to close properly in Unity.
** (iagno:32236): CRITICAL **: computer_player_move: assertion `self != NULL' failed
Window manager warning: Receiving a NET_CLOSE_WINDOW message for 0x3000003 (Iagno) without a timestamp! This means some buggy (outdated) application is on the loose!
Window manager warning: Tried to ping a window with CurrentTime! Not allowed.
Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
unity-2d-shell: [WARNING] Wnck: Received a timestamp of 0; window activation may not function properly.

Revision history for this message
Derek (bugs-m8y) wrote :

Ooh. Here's some more.

** (iagno:32332): CRITICAL **: computer_player_move: assertion `self != NULL' failed
*** glibc detected *** /usr/games/iagno: malloc(): memory corruption: 0x0000000000bbef10 ***
Assertion 'out->type == OUTSTANDING_STREAM' failed at pulse.c:646, function stream_drain_cb(). Aborting.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe7b30700 (LWP 32337)]
0x00007ffff55ae445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff55ae445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff55b1bab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fffed3adaa7 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libcanberra-0.28/libcanberra-pulse.so
#3 0x00007fffed189985 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#4 0x00007fffecd2a693 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so
#5 0x00007fffecd2aa03 in pa_pdispatch_run ()
   from /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so
#6 0x00007fffed171bdd in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#7 0x00007fffecd2f2a9 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so
#8 0x00007fffed184a1e in pa_mainloop_dispatch ()
   from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#9 0x00007fffed184de5 in pa_mainloop_iterate ()
   from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#10 0x00007fffed184e90 in pa_mainloop_run ()
   from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#11 0x00007fffed19330f in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#12 0x00007fffecd3cd18 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so
#13 0x00007ffff593ce9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---'
#14 0x00007ffff566a4bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#15 0x0000000000000000 in ?? ()

Revision history for this message
Derek (bugs-m8y) wrote :

Tested in non-2D Unity, lag still happens.
Can get so bad that the window greys out just because the AI is thinking.

Did they remove an AI thread, or did the AI get a lot dumber?
It used to be even level 3 AI on this computer completed almost instantly.

Anyway it hung, looped music, and crashed in Unity as well.

It does seem to be Pulse Audio related.

summary: - Iagno hangs every game or two in Ubuntu 12.04
+ Iagno hangs every game or two in Ubuntu 12.04. Pulse Audio related?
Revision history for this message
Tha (tha) wrote : Re: Iagno hangs every game or two in Ubuntu 12.04. Pulse Audio related?

Just a theory: Could it be that the routine that determines the move by the computer player comes up with illegal moves? Since the level three computer player sometimes suddenly comes up with weird stupid moves, could it be that it comes up with illegal moves as well? That would explain why it looks like it runs into an eternal loop of doing one illegal move over and over again.

Revision history for this message
Derek (bugs-m8y) wrote :

So. I don't think it has anything to do with pulseaudio, since it hangs and the window greys out even with sound completely disabled.
I haven't gotten it to completely lock up though, so it could be that it only actually crashes if it is trying to play sounds when it locks.

As for Tha's AI theory - maybe? But it probably means someone really screwed up something that worked great in 11.10 - perhaps related to adding that annoying top message area that makes the game area resize.

Revision history for this message
Derek (bugs-m8y) wrote :

Another hilarious way that Iagno is now screwed up.
I just finished a game, after many freezes and delays.

Keep in mind this is only against the level 1 AI. And yet it still crawls along and frequently hangs when it used to respond almost instantly. Nonetheless it seems as dumb as ever or even dumber, so if anything was done to the AI it made it worse.

Anyway. On to the amusingness.
After winning it gives the score:
Dark (AI): 06 Light (me): 57

Actual score?
Dark (AI): 04 Light (me): 60

Revision history for this message
Derek (bugs-m8y) wrote :

You know... all these problems feel as if someone threw threading in, badly...

Revision history for this message
Derek (bugs-m8y) wrote :

Looks like the final score is routinely wrong. 18/45 this time instead of 11/53. Sooo, pretty clearly is showing the score of the turn before my final one.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-games (Ubuntu):
status: New → Confirmed
Revision history for this message
Bill Baker (euphgeek) wrote :

I would just like to add that I'm seeing these issues as well. After playing a few games, the sound will get stuck in a loop from time to time, eventually getting to a point where I have to kill the game in order to stop it. And as other people have said, the score at the end is always wrong. It seems that the previous version of iagno was a lot more stable. I never had any problems with that version.

Derek (bugs-m8y)
summary: - Iagno hangs every game or two in Ubuntu 12.04. Pulse Audio related?
+ Iagno hangs every game or two in Ubuntu 12.04, is very slow to take AI
+ turns, crashes, loops sounds and gives wrong score in the end. Worked
+ fine in 11.10
Revision history for this message
Derek (bugs-m8y) wrote :

Found another interesting symptom. After the usual lag and darkening window when AI was trying to move, I took a turn. It hung a bit, and after the turn, instead of my move having been taken, the AI had taken a move instead and the entire row was the AI colour. I hit undo a few times, and the pattern of play did not match the last few moves we'd taken.

Reeeeally feels like someone added buggy threading in this version.
Guess I'd need to find out 'sactly what version of Iagno Ubuntu is using and if any changes were made to it.

Revision history for this message
Derek (bugs-m8y) wrote :

If this adds any info at all, it still happens after having moved to the MATE window manager (which is awesome btw).

Oh. Also, the incorrect scores are a little odd in just how far off they are.

I won 0-44 but the score is 13-27 - also odd in that I only captured 4 on the last turn.

Revision history for this message
Derek (bugs-m8y) wrote :

Oh. One thing that *is* different in MATE is that I can't open a 2nd window of Iagno as I could in the past in Gnome 2. If I launch Iagno from the window manager or commandline and there is already one instance of the program launched, it exits immediately.
This obviously leaves an empty loading window for a little while in MATE.

This does work in Unity which makes me wonder if the overall brokenness might be related to some change in Iagno itself. Some sort of client/server change that was intended to make it work w/ the new window management, and broke things entirely.

Revision history for this message
Bill Duetschler (bikergeek) wrote :

Affects me, too, on Xubuntu 12.04.

One more quirk: I'm playing it on the same difficulty level I always have, and the AI has suddenly become much easier to beat. Lends credibility to someone's comment about the AI having been dumbed-down.

Revision history for this message
Derek (bugs-m8y) wrote :

So, it looks like the reason the score is so wildly off on some games (07-32 instead of 00-42 in last game) is that the score is only updated when the AI captures. In this case, I made 7 moves, he made one, then I made 3 more.

For those 10 moves I made, the score did not budge.

Someone really broke this game. IMO it should be reverted to whatever it was in the last release.

BTW, the "not opening a second window" thing seems to impact some other games too. Tetravex for example has that problem. Klotski does not.

Revision history for this message
Derek (bugs-m8y) wrote :

So. Yeah, the AI is quite a bit dumber, but here's another score that was entertaining to post.
Final stats.
Light: Human
Dark: AI
Dark: 20
Light: 13

"Light player wins!"

Yes, the message contradicts the score :)
(actual score on the board was Dark: 0 Light: 38 - AI didn't move for like 7 years or so)

And, yeah, Iagno still regularly crashes, although trying to search for it on errors.ubuntu.com doesn't seem to work.

Revision history for this message
Derek (bugs-m8y) wrote :

Hm. One reason it might not show up on errors.ubuntu.com is that it just crashed on me 4 times in the past half hour, and only one of them popped up an error report.

Revision history for this message
Derek (bugs-m8y) wrote :

So, interestingly, when it closes suddenly without being prompted for an error report, it seems to be when the AI has a piece left, and he cannot capture anything and I can't capture his piece.

At that point, boom. No more game window. Probably a crash although I haven't checked it in GDB.

Anyway. Just one more thing in this overall broken version.
Revert to previous version!

Revision history for this message
Derek (bugs-m8y) wrote :

Yet another bug in this buggy buggy version. If the AI does multiple moves (you slipped up and he got a bunch of moves due to no open positions for you), you can't undo past all the moves. It appears that as soon as you try one undo, the horribly slow AI thinking freezes everything up, and you can't do anything until it redoes the move. There's no way to get past it. At least, have only had this happen once, but I tried undoing 5 times without any better results.

Revision history for this message
Derek (bugs-m8y) wrote :

http://git.gnome.org/browse/gnome-games/commit/iagno/src?id=e9e8ae3e5b573cba9f535b5dceaf7bf98eabd126

I guess I should check to see if the errors exist prior to this commit. Looks like a port and a major rewrite.
Just offhand, one thing is the undo history seems to assume a move occurs.
That might explain undo prob in last comment? Anyway. Ports do create bugs.

Revision history for this message
serranellus (serranellus) wrote :

The game WAS excellent, so I confirm all the over reported troubles and ask for a step back.
(p.s.: Also the graphic was better in previous version! Where is the sunmoon theme?)

Revision history for this message
Bill Baker (euphgeek) wrote :

serranellus: The sun and star theme is still there, you just have to enable it in the preferences under Appearance.

Revision history for this message
Derek (bugs-m8y) wrote :

So. I'd like to note that if you play on Hard.
1) Hard is now a lot easier (either that or I've gotten a lot better, but I don't think so)

2) It locks up almost every single game. In fact, I have yet to finish a game on hard due to lockups. It doesn't crash (at least yet)
but it goes completely unresponsive until I get bored and kill it 5-10 minutes later.

BTW, most egregious example of that scoring bug. Winning with a board sweep while the score reports a 19:19 tie.

Revision history for this message
Bill Duetschler (bikergeek) wrote :

another bug: If you reach a position where neither player can make a legal move, but the board is not completely filled, the game isn't declared "over" with the victor the player with the greater number of tokens. In the example I'm attaching, neither player can move and Dark obviously wins. Playing as Dark and trying to move to any of the five vacant squares results in an illegal-move warning, but neither does the game recognize the "Game Over" situation.

Revision history for this message
Derek (bugs-m8y) wrote :

FWIW, it isn't locking up on Hard, it just takes a really really long time while the GUI goes unresponsive. If I go do something else, and check back in 5-10 minutes, it has unfrozen. I can then take another move. As the board positions constrain, the freezes become shorter.
The AI is still stupid.
I really suspect all this breakage was due to the rewrite linked in comment #20

Major rewrites do tend to be common sources of bugs.

Revision history for this message
Derek (bugs-m8y) wrote :
Revision history for this message
Bill Duetschler (bikergeek) wrote :

Bug still present in Xubuntu Quantal 12.10.

Revision history for this message
Derek (bugs-m8y) wrote :

After having played 6 games in a row that I had to kill due to UI locking up during the AI's "thinking" (which is much wimpier than before) I have a new request.
If you guys aren't going to revert this broken version of Iagno, then please just remove it 'cause it just looks bad.

I suggest replacing it with grhino which appears to actually work.
It may not look as attractive, but the AI responds instantly, and with intelligent moves. And who cares about looks if the game doesn't work, right?

Revision history for this message
Michael Catanzaro (mike-catanzaro) wrote :

Hi, most of these have been fixed upstream.

[1] is the AI freeze, [2] is a workaround (not really a fix) that stops the looping sounds (probably the cause of the crash in comment #2), [3] is for the broken scores (also reported at [4]), [5] is for when neither player can move, [6] handles the undo bug.

I think the issue in comment #11 may have magically been fixed, but I'm not sure.

I'm watching the upstream bug tracker at bugzilla.gnome.org - feel free to report any further Iagno bugs you find directly there, but please only if you've reproduced the issue in the most recent 3.8 or 3.10 release (currently 3.8.3 and 3.10.1).

[1] https://git.gnome.org/browse/iagno/commit/?h=gnome-3-8&id=b591b6cb1244d0341dfb58b71183e95ed45530c7
[2] https://git.gnome.org/browse/iagno/commit/?h=gnome-3-8&id=800dddeb76363010daee3c8189f93623f31f8889
[3] https://git.gnome.org/browse/iagno/commit/?h=gnome-3-8&id=23e84c69b67eee55a1d0787d520033394db306ec
[4] https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/990739
[5] https://git.gnome.org/browse/iagno/commit/?h=gnome-3-8&id=7557806a0037fc8fba347c5c8325757977ade0ff
[6] https://git.gnome.org/browse/iagno/commit/?h=gnome-3-8&id=d50f9b5d6ce403e417a90350745e88518c896d7d

Revision history for this message
Michael Catanzaro (mike-catanzaro) wrote :

I forgot [1] which fixes the dumb AI (but only on levels 2 and 3 - we left level 1 as-is).

[1] https://git.gnome.org/browse/iagno/commit/?h=gnome-3-10&id=75eb88a9fa96d3803e8397af92e3a9028d09046b

Revision history for this message
Dago (dagoqd3) wrote :

Michael Catanzaro.... i'am new on ubuntu 12.04 i have downloaded the file iagno -3.10.1.tar.gz but i cant install it, i love play Iagno and as everybody says..
please guide me to install on ubuntu 12.04
thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.