If you have configuration files from the KDE4 version of kmahjongg, the KF5 version will fail to start. The terminal is flooded with log_kmahjongg: Set a new Background: "/usr/share/apps/kmahjongglib/backgrounds/default.desktop" log_libkmahjongg: Using background at "/usr/share/kmahjongglib/backgrounds/egyptian.svgz" log_kmahjongg: Error loading the layout. Try to load the default layout. log_kmahjongg: Inside LoadDefault(), located layout at "/usr/share/kmahjongg/layouts/default.desktop" log_kmahjongg: Using layout at "/usr/share/kmahjongg/layouts/default.layout" log_kmahjongg: Set a new Background: "/usr/share/apps/kmahjongglib/backgrounds/default.desktop" ... It seems that the config migration doesn't take into account the different location of the data files in the kf5 version of libkmahjongg. After migration, ~/.config/kmahjonggrc contains the lines: [General] Background_file=/usr/share/apps/kmahjongglib/backgrounds/default_old.desktop Layout_file=/usr/share/apps/kmahjongg/layouts/checkered.desktop Tileset_file=/usr/share/apps/kmahjongglib/tilesets/default.desktop But in KF5 those files are located in /usr/share/kmahjongg{lib} instead. This seems to confuse the application. Reproducible: Always Steps to Reproduce: 1. Upgrade from kmahjongg 15.12 to 16.04 (make sure kmahjongg has been started so there is a config file in ~/.kde) 2. Start kmahjongg
Uh, that's bad. :( Can you (or somebody else) please attach kde4 config files for me to test?
Created attachment 98152 [details] Minimal config file Put this file in ~/.kde4/share/config/ and remove ~/.config/kmahjonggrc, then try to start kmahjongg
Hmm, for me that works just fine. On first start I get similar output as yours but the game starts. On second start, the output shrinks down a few error messages and the game also starts. If the paths are wrong, the loading falls back to a default. It should load the game fine, though. After the first start my config file starts with: 1 [General] 2 Background_file=/home/fs/kde5apps/share/kmahjongglib/backgrounds/egyptian.desktop 3 Layout_file=/home/fs/kde5apps/share/kmahjongg/layouts/default.desktop 4 Tileset_file=/home/fs/kde5apps/share/kmahjongglib/tilesets/default.desktop I changed some background-related stuff in libkmahjongg in November. https://quickgit.kde.org/?p=libkmahjongg.git&a=commit&h=86435f2505b2f915f1f200f41a17e470668880ca Might that be related? Since I do not have access to a distro package of the new KMahjongg yet, I can only test with the Git version. And there I cannot yet reproduce the problem. Can someone else please check on their system?
Strange, this is with plain 16.04 beta, no patches, so it shouldn't be much different from current git. Other Arch users have reported the same issue.
I was able to reproduce using the git version.
What am I doing wrong? I do: - copy the file attached earlier to ~.kde/share/config/kmahjonggrc, - change the path inside the file to the location of the desktop file on my system (resides under $HOME), - remove .config/kmahjonggrc and then - start KMahjongg. KMahjongg starts fine and the new kmahjonggrc file is created in .config/ with the correct layout.
Now I removed the whole install dir and the build dirs of libkdegames, libkmahjongg and kmahjongg, rebuilt everything and still the same. Here it starts fine.
Simpler steps to reproduce: open ~/.config/kmahjonggrc, and point Layout_file to a non-existant path. The KDE4 settings migration is just the trigger here.
Ah, thanks. Now I can reproduce.
*** Bug 364646 has been marked as a duplicate of this bug. ***
I am sorry about this problem. It did not occur on my box when I ported KMahjongg. Two months ago I tried to debug this but got confused by all the locations stuff can be put to (by CMake) and looked for (by Qt). Currenty I am in the process of finding a flat in another city and starting a new job so in the coming weeks (or small number of months) I am likely not able to sit down for this again.
I had a look at the problem today, and this should fix it: https://git.reviewboard.kde.org/r/128279 Ideally, kmahjongg would try to adjust the path though IMHO, e.g. try to load $XDG_DATA_DIRS/kmahjongg/layouts/FILENAME_WITHOUT_PATH before falling back to the default. Currently, the KDE4 migration basically resets the layout, background and tileset because the paths have changed.
Git commit 22600c69edbf59bc83377e3b96e3899ba935b1a3 by Wolfgang Bauer. Committed on 01/07/2016 at 11:30. Pushed by wbauer into branch 'Applications/16.04'. Fix endless loop when configured layout cannot be loaded Adjust the configured layout when the default is loaded as fallback. Otherwise loadSettings() will think that the layout has been changed in the settings, load the layout again and call startNewGame(), which in turn calls loadSettings() again, resulting in an endless loop. FIXED-IN: 16.04.3 REVIEW: 128279 M +1 -0 kmahjongg.cpp http://commits.kde.org/kmahjongg/22600c69edbf59bc83377e3b96e3899ba935b1a3