Solved Kodi V19.1 Crashes -- But starts correctly when disconnected from the Internet!
Hey guys, I just noticed something which hopefully helps finding the cause of the start-up crashes:
I'm experiencing the crash immediately upon startup on two different PCs, both Win10 Pro with fresh install, no addons etc installed.
Just for testing, I disconnected them from the internet. When doing this, Kodi started correctly and continued functioning when reconnecting. But if I then -with Internet on- close Kodi and restart, it will again crash.
Maybe the other guys having the same issue can test whether they can confirm this.
A proper debug log of a crash version would be something the devs can dig their teeth into.
I did a fresh portable installation in a folder separate from "programs", that's why the folder might seem a bit odd. But the effect is the same if I install Kodi the normal way under programs.
I can't see the crash in the log. But if there's something else you want me to test, just let me know.
@Martin_HM I take it that was with the internet connected?  If so, could you run the same installation, without it being connected to the internet, let Kodi start up and settle for a few seconds, then shut it down and post the log from that run (where I presume from your earlier post that it won't crash)?

Learning Linux the hard way !!
@black_eagle : Correct, that was with internet connected.

Debug w/o Internet
This is with LAN disconnected. Kodi starts up properly.
At 19:35:46 I connected LAN and downloaded a language addon. This worked properly. After this I closed Kodi.

Debug Crash
I restarted Kodi with LAN connected and it again crashed immediately after showing the start screen.
@Martin_HM Hmm, remote debugging is always difficult, but the first thing that strikes me is the version check addon.  I think I'd start by disabling that and see if it makes a difference.  At the very least, it will eliminate it as a suspect.
Learning Linux the hard way !!
Is this something I can modify myself or do you need to create a test version?
(2021-05-24, 20:42)Martin_HM Wrote: Is this something I can modify myself or do you need to create a test version?

Start Kodi without it connected to the internet. Then Settings->Addons->My add-ons->Services->version check and disable it.  Quit Kodi, re-connect the internet and see if Kodi will start.
Learning Linux the hard way !!
Sorry, no, that didn't make a difference. With Version Check deactivated, it still crashes.
(2021-05-24, 22:36)Martin_HM Wrote: Sorry, no, that didn't make a difference. With Version Check deactivated, it still crashes.

Well, it was worth a try.  Some discussion on this on a github issue regarding it seems to indicate that it's related to ws-discovery. If that's the case then it needs fixing in core.
Learning Linux the hard way !!
Is this v19.1 you're using? and if so was everythingok with v19.0? Also disabling internet, do you mean you've disabled the network port or unplugged it?

If yes to all of these then @black_eagle could be right and it's the same issue as where a malformed SMB WS-discovery message is being recieved from another device on the network. You could try leaving Kodi connection on and then temporarily disconnect everything else from the network, see if Kodi then runs, and if it does connect the other devices one at a time, checking Kodi after each one is connected before moving onto the next, and try and establish which device is causing the problem. If you narrow it down to one device then you can decide whether it is something you need connected all the time until the fix is merged.
@jjd-uk : All Yes.
I was using V19.0 before and it worked fine. 
I updated to V19.1 and it crashed upon start-up. Meaning the Matrix screen comes up for a few seconds and then Kodi closes.
All subsequent tests are done on a separate Desktop PC with a clean portable installation.
Disconnecting internet (more on that below) was done both by physically unplugging the LAN cable and by disabling the Ethernet adapter (one at a time). Both with the same effect: Kodi didn't crash.

As for the test you suggested:
I found that Kodi crashes if one particular device is switched on. It is a webcam, Axis M1034-W.
This webcam is connected via WLAN, while the PC is on LAN.
Kodi will crash even if internet access for both the PC and the webcam is inhibited in the router. So it is not the internet access making it crash, it is having these two devices on the router (AVM Fritzbox 7590).
If the webcam is physically off, then Kodi works.
If the webcam is on, then Kodi crashes instantly.
If the webcam is off, I start Kodi and then plug in the webcam, then Kodi crashes once the webcam has booted.

Log files:
Webcam Off - Kodi ok
Webcam On - Kodi crashes on Start
Webcam switched after Start - Kodi crashes
Internet inhibited, Webcam on - Kodi crashes
So it looks like it could be exactly the same bug as not sure if @jogal will be able to confirm with those logs. Assuming it is the same bug then there is a fix that is pending review for inclusion, once it is included then you can either switch either a Nightly of v19 branch (which is basically v19.1 with the bug fixes since that release), these Nightlies lead up to a formal v19.2 release if you wish to wait for that. For now your options are likely rollback to v19.0 until fix is included, or leave that webcam disconnected.
V19.0 works perfectly for me on my HTPC. So no problem with that.
Can you let me know once the Nightly is online in the downloads? Then I will test it on my setup.
Keep an eye on that Github Issue report, once fixed the Issue will be closed. The Matrix nightlies can be found at so once the Issue is closed, then fix should appear in one of those builds the day after. I'll try and remember to come back here, but providing that info just in case it slips my mind.

Logout Mark Read Team Forum Stats Members Help
Kodi V19.1 Crashes -- But starts correctly when disconnected from the Internet!0
This forum uses Lukasz Tkacz MyBB addons.