Kodi cannot start, closes itself automatically
#1
Expected Behavior
Kodi app should start and enter the menu.

Actual Behavior
The error is that I cannot start Kodi and make it correctly enter the menu, and the app will close automatically, especially:
after my computer boot into desktop for a while;
after I initiated and closed Kodi once or more times.
I can see Kodi trying to start: the Kodi app icon displayed in the taskbar, but it cannot proceed to enter the menu.
This error won't happen when I start Kodi right after computer boot up into Windows desktop.
I've tried a clean install to see if this error persists, and find out that this error still happens.
Also, the same Kodi environment (settings and plugins) are applied to a Kodi Leia 18.5 installation on Raspbian on Raspberry Pi 4, but no errors happened there.

Possible Fix
None found.

To Reproduce
Steps to reproduce the behavior:
start the Kodi app after Windows boot for a while (I'm not clearly know how much time it exactly needed); or:
restart Kodi for one or a few times.

Debug logs
The debug logs can be found here:
failed startup log 1 https://paste.kodi.tv/apahudolob.kodi
failed startup log 2 https://paste.kodi.tv/dudovivuma.kodi
successful startup log 1 https://paste.kodi.tv/icahesuhog.kodi
successful startup log 2 https://paste.kodi.tv/joyodubuna.kodi
successful startup log 3 https://paste.kodi.tv/mucivanoyu.kodi

Under situations that errors happened, the last line of logs would always read 
Code:
DEBUG: CIRServerSuite::Connect: connecting to: ::1:24000 ...

I tried to utilize different graphic cards (Intel/nVidia) with the newest driver to cross-validate if the reason errors happened is due to a graphic card issue.

Screenshots
https://imgur.com/a/NHvFGu4

Additional context or screenshots (if appropriate)
You can see that the Kodi icon appeared and then disappeared.
There is also another situation that I did not capture and provide, where the app might just display a black screen and then closes.

Your Environment
Kodi Leia 18.5, 18.6.
Windows 10.
On a laptop; and I tried to utilize different graphic cards (Intel/nVidia) with the newest driver to cross-validate if the reason errors happened is due to a graphic card issue.
Reply
#2
Thanks @dowba

The CIRServerSuite entry is normal.

I believe the issue is either audio or graphics related, but I am currently swaying to graphics as the graphics card checks never complete. I do note the following line and wonder how you have started playback so early in the Kodi startup.
xml:
CAESinkDirectSound::CheckPlayStatus: Resuming Playback

Do you know why you have unusual screen resolutions... AdjustWindow: resizing due to size change (0,40,1920,1041)->(-9,2,1929,1050)

As for your "successful startup log", why is there only 1 second of log? There must be more to these logs.

I also note that your failed logs show 2 audio devices but your successful logs show 4 audio devices. Which audio device are you trying to use. Can you ensure your audio drivers are correctly setup...

Image
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2020-03-21, 02:43)Karellen Wrote: Thanks @dowba

The CIRServerSuite entry is normal.

I believe the issue is either audio or graphics related, but I am currently swaying to graphics as the graphics card checks never complete. I do note the following line and wonder how you have started playback so early in the Kodi startup.
xml:
CAESinkDirectSound::CheckPlayStatus: Resuming Playback

Do you know why you have unusual screen resolutions... AdjustWindow: resizing due to size change (0,40,1920,1041)->(-9,2,1929,1050)

As for your "successful startup log", why is there only 1 second of log? There must be more to these logs.

I also note that your failed logs show 2 audio devices but your successful logs show 4 audio devices. Which audio device are you trying to use. Can you ensure your audio drivers are correctly setup...

Image

Thanks @Karellen

I don't even noticed that an unusual resolution exists. I do remember I adopt windowed display mode where the resolution cannot be set and maximize its size as the following image(3) shows. I have two monitors(one external and the other is laptop's screen), and the maximize window size is set according to external screen's supported resolution.
After I view your reply, I tried to modify settings by editing "%appdata%\Kodi\userdata\guisettings.xml", setting it to:
xml:

<setting id="videoscreen.resolution"></setting>
<setting id="window.height"></setting>
<setting id="window.width"></setting>
<setting id="videoscreen.screenmode" default="true">DESKTOP</setting>
and after that I tried to start Kodi, but still failed.

Here is the resolution settings I get after the above edits in a successful Kodi startup after rebooting my computer and start Kodi as soon as it boot into Windows desktop:

(1)
Image

and here is the audio settings I get in a successful Kodi startup(I always leave it to default).

(2)
Image

And what's more is that, after a successful Kodi startup, and after I switch to another window (maybe browser... etc) for a while and returned to Kodi, Kodi would hang in a darker screen(maybe entered power-saving mode), and within maybe 10 seconds Kodi would terminate itself(hereinafter "crash"). (I did not report the problem previously but I think it is related, and it is also a problem not just happening once) 
I just captured the "crash" logs as the following link shows (I've deleted PVR IPTV Simple Client AddOnLogs to meet the maximum size requirement).

https://paste.kodi.tv/codapodovo.kodi

After the hanging and "crash" situation, I tried to start Kodi again and succeed in starting a few times and also failed a few times.

failed startup after "crash" logs are https://paste.kodi.tv/asifuguciw.kodi


For testing purpose, I changed to windowed display mode and maximize window size as image(3) shows
(3)
Image
in this situation I also got a failure in starting Kodi, and logs are as follows:
https://paste.kodi.tv/onijelupuw.kodi

The reason that the successful startup logs last for only 1 second is that I close Kodi as soon as Kodi enter the menu just for testing and validating purpose.
As for the
Code:
CAESinkDirectSound::CheckPlayStatus: Resuming Playback
part, I (did not try/did not know how to) play things at startup stage of Kodi, and therefore I did not know why the message appeared.
Reply
#4
if this is the same as what i see it is some thing to do with Windows Explorer and the number open
right click task manager restart Windows Explorer

or it will be running in task manager close and try again
Reply
#5
@dowba

This is an unusual case, and one where we are on the backfoot with support as there are just way too many variables that could affect Kodi. It could be drivers, settings of devices, other installed software.

Did you check why two of your audio devices keep disappearing? Are your audio devices correctly set up?

In case you have made some inadvertent change in Kodi, can you go to your %AppData% folder, and rename the existing \Kodi\ folder to \KodiOld\. Start Kodi and a new folder will be created. Can you now test Kodi and see if you still experience the crashing issue.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#6
Thanks @the_other_guy, @Karellen

Restarting explorer.exe works, which allow me to enter the menu again. But I still cannot locate what the problem is.
Here are my device manager screenshots about my audio controllers and speakers, and all indicate that they are installed correctly and work well.

Image
I think the problem is not related to my DIRECTSOUND devices (I adopt DIRECTSOUND in my Kodi settings) as well:
  • failed log 1: I have AE_DEVTYPE_PCM:Speakers - 喇叭 (Realtek® Audio) AE_DEVTYPE_PCM:default
  • failed log 2: I have AE_DEVTYPE_PCM:Speakers - 喇叭 (Realtek® Audio) AE_DEVTYPE_PCM:default AE_DEVTYPE_HDMI:HDMI - Philips 190CW (NVIDIA High Definition Audio);
  • successful log 1: I have AE_DEVTYPE_PCM:Speakers - 喇叭 (Realtek® Audio) + AE_DEVTYPE_PCM:default 
  • successful log 2: I have AE_DEVTYPE_PCM:Speakers - 喇叭 (Realtek® Audio) + AE_DEVTYPE_PCM:default 
  • successful log 3: I have AE_DEVTYPE_PCM:Speakers - 喇叭 (Realtek® Audio) AE_DEVTYPE_PCM:default AE_DEVTYPE_HDMI:HDMI - Philips 190CW (NVIDIA High Definition Audio)
The different part "AE_DEVTYPE_HDMI:HDMI - Philips 190CW (NVIDIA High Definition Audio)" is there because there is an adapter that I connect my HDMI-only laptop to a VGA-only monitor Philips 190CW, and If I did not plug in in the HDMI to VGA adapter, the device will not show.
The adapter has an audio out jack, where I can plug in my earphone. And from there it becomes an audio device.
Reply
#7
(2020-03-22, 23:06)dowba Wrote:  

I captured another "crash" / auto-terminating logs as follows:
https://paste.kodi.tv/owilogidon.kodi
Reply
#8
(2020-03-21, 22:23)Karellen Wrote:  

I adopt your suggestion and try to cross-validate.
Once the "cannot enter the menu" situation happens, I rename my old %APPDATA%\Kodi directory and restart Kodi (a.k.a. a fresh config).
I could make it enter the menu at the first time, but failed at the second time.
Here are the logs about the failure of this situation.
https://paste.kodi.tv/debodiseku.kodi
Reply
#9
(2020-03-22, 23:28)dowba Wrote:
(2020-03-21, 22:23)Karellen Wrote:  

I adopt your suggestion and try to cross-validate.
Once the "cannot enter the menu" situation happens, I rename my old %APPDATA%\Kodi directory and restart Kodi (a.k.a. a fresh config).
I could make it enter the menu at the first time, but failed at the second time.
Here are the logs about the failure of this situation.
https://paste.kodi.tv/debodiseku.kodi 

Sorry I cannot edit the post.
I find out that I forget to switch on debug mode in the first fresh config retry, and therefore the "not debug" logs were generated.
When I try to correct it with a third startup, I found out that Kodi succeeds again. It is so weird.
But then when I made a fourth try, Kodi failed again, and the logs are as follows(with debugging):
https://paste.kodi.tv/isabahatoj.kodi
Reply
#10
Sorry but I don't read Mandarin(?), but I take your word the devices are correctly set up.

ok, so some more information is coming to light which you should have mentioned in your first post.

A VGA monitor with a HDMI converter? I guess this may be your problem- most likely Kodi/Windows is not receiving a correct handshake.

You are using a dual monitor setup. So when is it crashing - when using the laptop screen or when using a VGA monitor? Your Settings screenshots only show "default" so I don't know which screen that is. Also, change your settings level from Advanced to Expert for more settings.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#11
After two-weeks of cross-validation, I found out that the error happens more frequently in a dual-monitor situation than that in a single-monitor situation.
But it does not mean in single-monitor cases errors won't happen.
Here is a log I captured in a failed startup of Kodi.
https://paste.kodi.tv/uludozofoy.kodi
Reply
#12
Also I found out that Kodi would be more likely to fail in a remote desktop situation.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi cannot start, closes itself automatically0