Inconsistency bug for the Numbers with Dice/Dominoes activities
Closed, ResolvedPublic

Description

My kids found a bug that is shown in the image below. It involves both the "Numbers with Dice" activity and the "Numbers with Dominoes" activity. The bug is that they were in neither activity fully but where in both activities partially. They are partially in the dice activity because the instructions/directions say "dice". They were partially in the dominoes activity because dominoes were being displayed (instead of dice). However, the dominoes contained no dots.

I was able to test while the program was in that buggy state. The program had an expected number as the correct answer even though no dots were displayed on the dominoes. I just kept clicking answers until I guessed the correct one. I observed no other unexpected behavior while the program was in this state.

I don't know how to reproduce the problem. I tried briefly without success.

I think my kids were playing the 1.0 beta version (because they prefer that one to installed one), but I can't be certain of that.

Hi,
Thanks for the report.
It looks indeed like a bug, "Numbers with dice" should always show some dice, not dominoes. I tried but also could not reproduce this issue at all.

Can you tell us on which platform/operating system this happened?

Also by the way, I just noticed that for "Numbers with dominoes" the intro voice for UK English is wrong (it's a copy of the voice for Number with dices, talking about dices...). We should remove it.

The platform/operating system is Ubuntu 18.04 LTS. (I can get the minor version or any more information if you want.)

FWIW, I don't have speakers connected to the computer that my kids use to play Gcompris, so I am currently unable to give feedback about audio.

I can't reproduce either, I'll try again later

I had a look to the code and there is a part that should be a bit clearer to be able to maintain it more easily. Maybe the problem comes from there.
Number with dices (smallnumber) and number with dominos (smallnumber2) inherit from GLetters. But in GLetters if I can see where smallnumber2 is called from can not see where smallnumber is called from.
I will see with Tim and Johnny why we have done it this way.

@echarruau : if you look at Smallnumbers.qml, you can see that it basically works the same as GLetters, with two main differences:
-it has useDataset set to true, to use the dataset system
-it overrides the function getImage(key) to use dice images instead of characters (see GLetters.qml line 48)

Oh, I just found how to reproduce this bug!

-In smallnumbers2, finish first level and quit the activity while the bonus is running, then open smallnumbers: empty dominoes appear instead of dices.

-And similarly the other way, close smallnumbers while the bonus is running, then open smallnumbers2: nothing is falling at all.

So it should be possible to fix it now that we have a clue...

timotheegiet closed this task as Resolved.Oct 8 2020, 5:46 PM
timotheegiet claimed this task.

... And bug fixed :)

tysonwilliams added a comment.EditedOct 12 2020, 4:26 PM

I tried following your directions, but I can't reproduce the bug. Do you care enough about this to have me verify it? I am not too concerned about it, but I will try to verify if you want.

Well at least I could 100% reproduce the bug you described with the steps I explained, and then I understood from the code why it could happen and made a fix to make sure it should not happen anymore...
On which version did you try to reproduce? (old build from KDE/1.0 branch from before Oct. 8th or newer ?)

I tested on commit 3be from Oct 1

Ah, I forgot to precise in my explanations to reproduce: you need to exit the activity using the escape key.
Using the Home button from the bar already had the fix to prevent the bug to happen.

Indeed. I was exiting via the Home button. I instantly reproduced it when exiting via the the escape key. I will verify soon.

I have verified that this is fixed. Great work! :)