Kodi crashes when switching profiles

Hi Team,

It would appear that switching user profiles can cause Kodi to crash. I found that when logging off and selecting another profile can cause Kodi to crash.

I am running Kodi 16.1 on a Pi3. I have 2 user profiles configured: “Master User” and “Jessica”. I can reproduce the issue by following these steps:

  1. Start the Raspberry Pi3 (which automatically loads Kodi).
  2. Login to the Master User profile.
  3. Log off the Master User and within – say 2 seconds – login to the Jessica profile.
  4. Log off the Jessica profile and within – say 2 seconds – login to the Master User profile.
  5. Log off the Master User and within – say 2 seconds – login to the Jessica profile.

At that stage, the screen goes black, Kodi crashes and I am back in Raspbian.

I enabled debug logging (in both profiles) and meticulously went through the steps to reproduce the fault. In doing so, I spend more time than the 2 seconds I denoted in the steps above between selecting the next profile. The result was that Kodi did not crash in step 5. When I started “speeding” up my profile selection, it would instantly crash. It is also to be noted that it has never crashed upon selecting the Master User profile.

Below is the last bit of my debug log. Please note that I changed the SELECT statements to look like S-E-L-E-C-T in order to circumvent this web site’s anti-hacking measures.

Code:
22:23:17 795.883972 T:1944465408   DEBUG: ------ Window Deinit (LoginScreen.xml) ------
22:23:17 795.884094 T:1944465408   DEBUG: ------ Window Init (Startup.xml) ------
22:23:17 795.884155 T:1944465408    INFO: Loading skin file: Startup.xml, load type: LOAD_EVERY_TIME
22:23:17 795.886169 T:1944465408   ERROR: ExecuteAsync - Not executing non-existing script script.favourites
22:23:17 795.904724 T:1944465408   DEBUG: Activating window ID: 10000
22:23:17 795.904846 T:1944465408   DEBUG: ------ Window Deinit (Startup.xml) ------
22:23:17 795.904968 T:1944465408   DEBUG: ------ Window Init (Home.xml) ------
22:23:17 795.924622 T:1591735216   DEBUG: Thread LanguageInvoker start, auto delete: false
22:23:17 795.924805 T:1591735216    INFO: initializing python engine.
22:23:17 795.924866 T:1591735216   DEBUG: CPythonInvoker(38, /home/pi/.kodi/addons/script.skinshortcuts/default.py): start processing
22:23:17 795.924927 T:1641018288   DEBUG: CRecentlyAddedJob::UpdateMusic() - Running RecentlyAdded home screen update
22:23:17 795.924988 T:1944465408  NOTICE: ActiveAE DSP - starting
22:23:17 795.930237 T:1944465408   DEBUG: no profile autoexec.py (/home/pi/.kodi/userdata/profiles/Jessica/autoexec.py) found, skipping
22:23:17 795.936462 T:1684792240   ERROR: COMXImageFile::ReadFile special://masterprofile/profiles/Jessica/Thumbnails/2/21b87904.jpg not found
22:23:17 795.936523 T:1684792240  NOTICE: LoadJpeg: unable to load special://masterprofile/profiles/Jessica/Thumbnails/2/21b87904.jpg
22:23:17 795.936829 T:1684792240   ERROR: DoWork - Direct texture file loading failed for special://masterprofile/profiles/Jessica/Thumbnails/2/21b87904.jpg
22:23:17 795.942810 T:1944465408    INFO: Unloading old skin ...
22:23:17 795.943115 T:1944465408   DEBUG: ------ Window Deinit (Home.xml) ------
22:23:17 795.950684 T:1641018288   DEBUG: GetRecentlyAddedAlbumSongs() query: S-E-L-E-C-T songview.*, songartistview.* FROM (S-E-L-E-C-T idAlbum FROM album ORDER BY idAlbum DESC LIMIT 10) AS recentalbums JOIN songview ON songview.idAlbum = recentalbums.idAlbum JOIN songartistview ON songview.idSong = songartistview.idSong ORDER BY songview.idAlbum desc, songview.itrack, songartistview.iOrder
22:23:17 795.952698 T:1641018288   DEBUG: GetRecentlyAddedAlbums query: S-E-L-E-C-T albumview.*, albumartistview.* FROM (S-E-L-E-C-T idAlbum FROM album WHERE strAlbum != '' ORDER BY idAlbum DESC LIMIT 10) AS recentalbums JOIN albumview ON albumview.idAlbum = recentalbums.idAlbum LEFT JOIN albumartistview ON albumview.idAlbum = albumartistview.idAlbum ORDER BY albumview.idAlbum desc, albumartistview.iOrder
22:23:17 795.973328 T:1944465408   DEBUG: Cleanup - Closed bundle
22:23:17 795.981445 T:1944465408   DEBUG: Infobool 'skin.hassetting(alternatetvosd)' still used by 4 instances
22:23:17 795.982422 T:1944465408   DEBUG: Infobool '!skin.hassetting(alternatetvosd)' still used by 3 instances
22:23:17 795.982483 T:1944465408    INFO:   load skin from: /home/pi/.kodi/addons/skin.aeon.nox.5 (version: 5.8.6)
22:23:17 796.076904 T:1944465408    INFO:   load fonts for skin...
22:23:17 796.081787 T:1944465408    INFO: Loading fonts from /home/pi/.kodi/addons/skin.aeon.nox.5/1080i/Font.xml
22:23:17 796.122925 T:1944465408   DEBUG: POParser: loaded 243 strings from file /home/pi/.kodi/addons/skin.aeon.nox.5/language/English/strings.po
22:23:17 796.123169 T:1944465408    INFO: Loading skin includes from /home/pi/.kodi/addons/skin.aeon.nox.5/1080i/includes.xml
22:23:17 796.188904 T:1674830768   DEBUG: -->Python Interpreter Initialized<--
22:23:17 796.189148 T:1674830768   DEBUG: CPythonInvoker(35, /home/pi/.kodi/addons/service.xbmc.versioncheck/service.py): the source file to load is "/home/pi/.kodi/addons/service.xbmc.versioncheck/service.py"
22:23:18 796.603149 T:1760289712   DEBUG: CZeroconfAvahi::groupCallback: Service successfully established
22:23:18 796.735535 T:1674830768   DEBUG: Previous line repeats 3 times.
22:23:18 796.735657 T:1674830768   DEBUG: CPythonInvoker(35, /home/pi/.kodi/addons/service.xbmc.versioncheck/service.py): setting the Python path to /home/pi/.kodi/addons/service.xbmc.versioncheck:/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7
22:23:18 796.735718 T:1674830768   DEBUG: CPythonInvoker(35, /home/pi/.kodi/addons/service.xbmc.versioncheck/service.py): entering source directory /home/pi/.kodi/addons/service.xbmc.versioncheck
22:23:18 796.735962 T:1674830768   DEBUG: CPythonInvoker(35, /home/pi/.kodi/addons/service.xbmc.versioncheck/service.py): instantiating addon using automatically obtained id of "service.xbmc.versioncheck" dependent on version 2.1.0 of the xbmc.python api
22:23:18 796.739441 T:1591735216   DEBUG: -->Python Interpreter Initialized<--
22:23:18 796.739624 T:1591735216   DEBUG: CPythonInvoker(38, /home/pi/.kodi/addons/script.skinshortcuts/default.py): the source file to load is "/home/pi/.kodi/addons/script.skinshortcuts/default.py"
22:23:18 796.813416 T:1944465408    INFO:   load new skin...
22:23:18 796.814209 T:1944465408    INFO: Loading user windows, path /home/pi/.kodi/addons/skin.aeon.nox.5/1080i
22:23:18 796.882874 T:1944465408   DEBUG: Load Skin XML: 78.33ms
22:23:18 796.882996 T:1944465408    INFO:   initialize new skin...
22:23:18 796.883057 T:1944465408   DEBUG: guilib: Fill viewport on change for solving rendering passes
22:23:18 796.883118 T:1944465408    INFO: Loading skin file: DialogVolumeBar.xml, load type: LOAD_ON_GUI_INIT
22:23:18 796.898926 T:1944465408   DEBUG: OpenBundle - Opened bundle /home/pi/.kodi/addons/skin.aeon.nox.5/media/Textures.xbt
22:23:18 796.899231 T:1944465408    INFO: Loading skin file: DialogKaiToast.xml, load type: LOAD_ON_GUI_INIT
22:23:18 796.904846 T:1944465408    INFO: Loading skin file: DialogMuteBug.xml, load type: LOAD_ON_GUI_INIT
22:23:18 796.914124 T:1944465408    INFO: Loading skin file: DialogSeekBar.xml, load type: LOAD_ON_GUI_INIT
22:23:18 796.963013 T:1944465408    INFO: Loading skin file: VideoOSDSettings.xml, load type: LOAD_ON_GUI_INIT
22:23:18 796.993835 T:1944465408    INFO: Previous line repeats 1 times.
22:23:18 796.993958 T:1944465408    INFO: Loading skin file: DialogBusy.xml, load type: LOAD_ON_GUI_INIT
22:23:18 797.005615 T:1944465408    INFO: Loading skin file: DialogExtendedProgressBar.xml, load type: LOAD_ON_GUI_INIT
22:23:18 797.013733 T:1944465408    INFO: Loading skin file: DialogSubtitles.xml, load type: LOAD_ON_GUI_INIT
22:23:18 797.041138 T:1944465408    INFO: Loading skin file: DialogPVRChannelsOSD.xml, load type: LOAD_ON_GUI_INIT
22:23:18 797.047058 T:1944465408    INFO: Loading skin file: DialogPVRGuideOSD.xml, load type: LOAD_ON_GUI_INIT
22:23:18 797.061646 T:1944465408    INFO: Loading skin file: VideoOSD.xml, load type: LOAD_ON_GUI_INIT
22:23:18 797.094788 T:1665909680   DEBUG: -->Python Interpreter Initialized<--
22:23:18 797.095032 T:1665909680   DEBUG: CPythonInvoker(36, /home/pi/.kodi/addons/script.grab.fanart/service.py): the source file to load is "/home/pi/.kodi/addons/script.grab.fanart/service.py"
22:23:18 797.104126 T:1944465408    INFO: Loading resource://resource.uisounds.confluence/sounds.xml
22:23:18 797.137756 T:1591735216   DEBUG: CPythonInvoker(38, /home/pi/.kodi/addons/script.skinshortcuts/default.py): setting the Python path to /home/pi/.kodi/addons/script.skinshortcuts:/home/pi/.kodi/addons/script.module.simplejson/lib:/home/pi/.kodi/addons/script.module.unidecode/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7
22:23:18 797.137939 T:1591735216   DEBUG: CPythonInvoker(38, /home/pi/.kodi/addons/script.skinshortcuts/default.py): entering source directory /home/pi/.kodi/addons/script.skinshortcuts
22:23:18 797.138062 T:1665909680   DEBUG: CPythonInvoker(36, /home/pi/.kodi/addons/script.grab.fanart/service.py): setting the Python path to /home/pi/.kodi/addons/script.grab.fanart:/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7
22:23:18 797.138123 T:1665909680   DEBUG: CPythonInvoker(36, /home/pi/.kodi/addons/script.grab.fanart/service.py): entering source directory /home/pi/.kodi/addons/script.grab.fanart
22:23:18 797.138184 T:1591735216   DEBUG: CPythonInvoker(38, /home/pi/.kodi/addons/script.skinshortcuts/default.py): instantiating addon using automatically obtained id of "script.skinshortcuts" dependent on version 2.20.0 of the xbmc.python api
22:23:18 797.157288 T:1665909680   DEBUG: CPythonInvoker(36, /home/pi/.kodi/addons/script.grab.fanart/service.py): instantiating addon using automatically obtained id of "script.grab.fanart" dependent on version 2.19.0 of the xbmc.python api
22:23:18 797.169495 T:1944465408    INFO:   skin loaded...
22:23:18 797.169617 T:1641018288   DEBUG: CRecentlyAddedJob::UpdateVideos() - Running RecentlyAdded home screen update
22:23:18 797.170715 T:1944465408   DEBUG: Activating window ID: 10000
22:23:18 797.170959 T:1944465408   DEBUG: ------ Window Init (Home.xml) ------
22:23:18 797.171082 T:1944465408    INFO: Loading skin file: Home.xml, load type: KEEP_IN_MEMORY
22:23:18 797.178040 T:1628435376   DEBUG: -->Python Interpreter Initialized<--
22:23:18 797.178223 T:1628435376   DEBUG: CPythonInvoker(37, /home/pi/.kodi/addons/service.library.data.provider/service.py): the source file to load is "/home/pi/.kodi/addons/service.library.data.provider/service.py"
22:23:18 797.180359 T:1641018288   DEBUG: CSettingsManager: requested setting (videolibrary.hiderecentlywatchedvideos) was not found.
22:23:18 797.180481 T:1674830768   DEBUG: Version Check: Version 0.3.19 started
22:23:18 797.181641 T:1641018288   DEBUG: RunQuery took 1 ms for 10 items query: select * from movie_view  ORDER BY dateAdded desc, idMovie desc LIMIT 10
22:23:18 797.227722 T:1641018288   DEBUG: RunQuery took 1 ms for 10 items query: select * from episode_view  ORDER BY dateAdded desc, idEpisode desc LIMIT 10
22:23:18 797.255981 T:1641018288   DEBUG: RunQuery took 1 ms for 10 items query: select * from musicvideo_view  ORDER BY dateAdded desc, idMVideo desc LIMIT 10
22:23:18 797.419678 T:1581249456   DEBUG: Thread LanguageInvoker start, auto delete: false
22:23:18 797.420044 T:1581249456    INFO: initializing python engine.
22:23:18 797.420227 T:1641018288   DEBUG: CRecentlyAddedJob::UpdateTotal() - Running RecentlyAdded home screen update

Is this a known issue? Is there a work-around (other than waiting longer to select another profile)?

Marc.