Bug 436017 - Crash when running ‘Enrich your vocabulary’ in Norwegian Nynorsk locale
Summary: Crash when running ‘Enrich your vocabulary’ in Norwegian Nynorsk locale
Status: RESOLVED FIXED
Alias: None
Product: gcompris
Classification: Applications
Component: general (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Jazeix Johnny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-21 18:13 UTC by Karl Ove Hufthammer
Modified: 2021-04-21 19:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2021-04-21 18:13:50 UTC
SUMMARY
When starting the ‘Enrich your vocabulary’ under a Norwegian Nynorsk locale, GCompris crashes.


STEPS TO REPRODUCE
1. Start GCompris by running ‘LANGUAGE=nn ./gcompris-qt’.
2. Navigate to the ABC cow category and choose the right-most subcategory (‘Ordtilfang’).
3. Choose the ‘Utvid ordforrådet ditt’ (‘Lune ? Soleil ?’ icon) activity.

OBSERVED RESULT
GCompris crashes.

EXPECTED RESULT
The activity should be launched, and GCompris should not crash.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210417
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I guess this is somehow caused by an incomplete translation(?). But GCompris shouldn’t *crash* in any case.
Comment 1 Jazeix Johnny 2021-04-21 19:02:25 UTC
I can't reproduce the crash in my system (Qt5.15.2 too) but I have this warning appearing in the console:
<Unknown File>: translatedTxt is undefined. Adding an object with a undefined member does not create a role for it.

Anyway, this is probably due because some categories (kroppsdelar, ...) are not translated at all. We already did a fix but it seems it is not enough.
Also, click on them throw an error (qrc:/gcompris/src/activities/lang/lang.js:134: TypeError: Cannot read property 'length' of undefined)
Comment 2 Jazeix Johnny 2021-04-21 19:17:34 UTC
Git commit 1df4c4867ad842eec93ed3c17e8beb5d9540d089 by Johnny Jazeix.
Committed on 21/04/2021 at 19:16.
Pushed by jjazeix into branch 'KDE/1.0'.

lang, remove nn language as it is not enough translated. Some categories are fully missing causing crashes on some distributions

D  +0    -200  src/activities/lang/resource/content-nn.json

https://invent.kde.org/education/gcompris/commit/1df4c4867ad842eec93ed3c17e8beb5d9540d089
Comment 3 Jazeix Johnny 2021-04-21 19:18:02 UTC
Git commit 32994a47f16a9fed864de375a264cddfd96edd9a by Johnny Jazeix.
Committed on 21/04/2021 at 19:17.
Pushed by jjazeix into branch 'master'.

lang, remove nn language as it is not enough translated. Some categories are fully missing causing crashes on some distributions

D  +0    -200  src/activities/lang/resource/content-nn.json

https://invent.kde.org/education/gcompris/commit/32994a47f16a9fed864de375a264cddfd96edd9a
Comment 4 Jazeix Johnny 2021-04-21 19:21:46 UTC
It was a regression in Qt with recent versions that I didn't manage to fix.
Having fully missing categories caused a crash.
We decided to only ship translation above 40% for the gcompris_lang.po file and nn was 18% so it should not have been generated.