Thread Rating:
  • 0 Vote(s) - 0 Average
Windows - [Solved] KODI window closes right after launch
#1
Sad 
I'm building KODI on VS2017, I've followed all instructions, the project builds fine but when running it silently quits without warning (or anything in the logs).

I (painstakingly) traced this issue to reading the Home.xml of the skin, specifically when TinyXML is parsing it.
Edit: I'm not even sure anymore, it seems like sometimes it's Startup.xml, sometimes it's Home.xml, sometimes it's the one it processes after both...


Things I've tried:

Changing the file's encoding (I think the problem has to do with that?)

Building with VS2015, latest updates (with all the build steps from the start)

Switcing to the master branch (initially I had garbear's RetroPlayer branch)

Asking for help in #kodi-dev. Kodi [rechi] tried to help me yesterday and today but we obviously didn't get anywhere.
Noone else from there has responded.
I can get you logs from our discussion for extra info on the issue, or you can just ask me.


If you want to help me reply here or contact me on Freenode, handle is "Vel0city".

Thank you.

Edit: For solution see the last posts here.
Mostly working on Retroplayer.
Reply
#2
Try setting the KODI_HOME environment variable to point to the source directory. Failing to do so (as I have done many times) leads to these exact symptoms.

Next, try setting a breakpoint at the beginning and trace it until it crashes.
BTC: 1JtXwJdGdE9YnYgThWBT2StFCU5sEYkbVD (personal), https://kodi.tv/contribute/donate-bitcoin (foundation). Donations in the form of controllers, especially ones that don't work in Kodi, are also appreciated.
Reply
#3
Thanks garbear, it crashes on "special://xbmc/system/peripherals.xml" here.
Mostly working on Retroplayer.
Reply
#4
Please post tue Log from cmake and from visual studio. Also activate the debug log in Kodi and also post this.
Latest news about AudioDSP and my libraries are available on Twitter.

Developers can follow me on Github.
Reply
#5
>Also activate the debug log in Kodi and also post this.
I have all logging enabled in advancedsettings.xml, I assume that's what you mean.

CMake: https://pastebin.com/raw/Cyt5AYEU
VS: https://pastebin.com/raw/kgmtfrJv
Log: https://pastebin.com/raw/fst6392X
Mostly working on Retroplayer.
Reply
#6
Right this is one solution, it's also possible through the UI.

http://kodi.wiki/view/Log_file/Advanced#GUI_settings
Latest news about AudioDSP and my libraries are available on Twitter.

Developers can follow me on Github.
Reply
#7
Of course, but I don't have access to the UI, KODI literally instantly closes.
Mostly working on Retroplayer.
Reply
#8
From your log files I can't see any errors. Have you set KODI_HOME?
What you also can try is to run Kodi from the build directory without the visual studio debugger. Or build Kodi 17.1.

From first looking I can't see any issues. Maybe it's already to late Tongue
Latest news about AudioDSP and my libraries are available on Twitter.

Developers can follow me on Github.
Reply
#9
(2017-03-29, 23:10)Vel0cityX Wrote: Of course, but I don't have access to the UI, KODI literally instantly closes.

Okay, forgot about your issueBlush Does the version from the installer work?
Latest news about AudioDSP and my libraries are available on Twitter.

Developers can follow me on Github.
Reply
#10
WOW, it actually works if I just execute the .exe!

>Have you set KODI_HOME
Yes I have set KODI_HOME to point to the root kodi source dir.

>Does the version from the installer work?
Yes.

It has to do with VS, but what can I do now? I'll need it to work for debugging.
Mostly working on Retroplayer.
Reply
#11
From experience the easiest way to not have any trouble on Windows when only needing to debug Kodi is to install Kodi from the installer somewhere, then change build target directory on the project to that directory.

Best to add -p to launch args to be in portable mode so you can debug multiple Kodi versions at the same time.

Way less problems than KODI_HOME and other solutions.
Reply
#12
Please post exactly where you set KODI_HOME and to what.

I'm using VS2015 and I set it in the properties of the "kodi" project (which is also the startup project) in the option "Debugging > Environment" to "KODI_HOME=$(ProjectDir)" and the option "Debugging > Command Arguments" is set to "-p" to run in portable mode. That way all the stuff Kodi usually writes to the Windows user's profile is written into "kodi-build/portable_data" and does not overwrite anything from my standard Kodi installation.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#13
I guess sou habe der KODI_HOME to the source directory. If I remember it correctly it should be the build directory, where you run CMake.
Latest news about AudioDSP and my libraries are available on Twitter.

Developers can follow me on Github.
Reply
#14
(2017-03-30, 11:28)Tolriq Wrote: From experience the easiest way to not have any trouble on Windows when only needing to debug Kodi is to install Kodi from the installer somewhere, then change build target directory on the project to that directory.

Best to add -p to launch args to be in portable mode so you can debug multiple Kodi versions at the same time.

Way less problems than KODI_HOME and other solutions.

I think earlier or later he wants to do some changes to the Kodi codebase. So he has to build everything from scratch and learn how to setup a build environment.

@Vel0cityX
I really wonder why you have to set KODI_HOME manually. I setup a environment yesterday and don't have to set it manually. It was already set.

Please write down your exact for commands, cake calls and steps in Visual Studio.
Latest news about AudioDSP and my libraries are available on Twitter.

Developers can follow me on Github.
Reply
#15
Yeah I actually start VS with kodi-sln.bat, which sets KODI_HOME (the the build dir, which for me it's .../kodi/kodi-build), so I removed the env var entry.

>I guess sou habe der KODI_HOME to the source directory. If I remember it correctly it should be the build directory, where you run CMake.
I did, yeah, I'll try again without it.

>Please write down your exact for commands, cake calls and steps in Visual Studio.
I followed the wiki, so I run the 2 scripts in project\BuildDependencies, then I run tools\buildsteps\win32\make-mingwlibs.bat. All completed with no visible errors (the project does build after all).
Then I run:
Code:
cmake -G "Visual Studio 14" ..
in kodi/kodi-build.

Then I executed kodi/kodi-build/kodi-sln.bat that just sets up a few env vars (KODI_HOME included) and starts VS2017.


I will try that @Tolriq and @Montellese, thanks.
Edit: See next post, I did, no dice.
Mostly working on Retroplayer.
Reply



[Solved] KODI window closes right after launch00