Win Kodi 15 hangs during exit
#1
Hi,

I have Kodi 15.0 installed on Windows 10 (build 10240) on a Surface Pro 3-tablet (i7, 8 GB RAM).
Every time I exit Kodi it hangs, and I have to kill it with the task manager. The result is that all the changes I have made in Kodi are not getting saved.

Same thing happens with Kodi 14.x by the way and I see the same on another computer with Windows 8.1 installed.

Anyone have a fix for that problem? Smile

Maybe I should mention, that on Windows 10 my user does not have administrator priviliges.

Best regards
TGMadsen
Reply
#2
Provide debug logs.................................
Win 8.1 64bit
NUC5i5RYK, Onkyo TX508, LG 42LM620T
Reply
#3
(2015-07-23, 13:10)Helioy Wrote: Provide debug logs.................................

Sorry Smile

http://xbmclogs.com/ptgspo8jf

During creation of this log, I haven't forced KODI to quit with Task Manager. It still hangs with the window on screen after I have pressed 'Exit'. After some time, Windows prompts me, that the program is not responding. As you can see at the bottom of the log, it took six minutes to terminate the ActiveAE thread, whatever that is Smile

Best Regards
TGMadsen
Reply
#4
This sort of issue is normally caused by an addons having not terminated one of it's processes, to quickly test if this is the case you can rename the addons folder in your Kodi appdata folder to something like addons_temp to temporarily remove them from Kodi and then do a test, and when you want your addons back rename the addons folder back. If that made any difference then you may have to unistall all your addons and then add then back one at a time to find out if it's a specific one causing the issue.
Reply
#5
Thanks but I have not installed any addons yet (installed Kodi this morning). Will try it though.

Best Regards
TGMadsen
Reply
#6
Thanks but I haven't installed any addons yet (installed the new Kodi 15.0 this morning). I have tried renaming the addons folder anyway though, but same thing happens. The log shows the same. It hangs with 'Thread ActiveAE 14232 terminating...'

Best Regards
TGMadsen
Reply
#7
I see the same hanging problem here. It was also in the previous Kodi version.
Reply
#8
If you are on Windows 10 use the DirectX 11 version, they just updated it to the Isengard final build yesterday:

http://forum.kodi.tv/showthread.php?tid=218274

It also corrects some video playback issues in Windows 10 and is generally less CPU intensive.

(I am on 10240 and don't have a problem exiting with this build).
Reply
#9
Thanks for the heads up regarding the DirectX 11 version.
I have just installed it (uninstalled the previous version first).

Without having any changes made to Kodi and no addons installed either, I see the same thing.
http://xbmclogs.com/pm5iiycwf

Well, I have to see what happens in the following days or weeks, when I probably reinstall Windows 10.

Best Regards
TGMadsen
Reply
#10
its something obviously audio related, what happens when you unplug your headphones?
Reply
#11
(2015-07-24, 11:21)helta Wrote: its something obviously audio related, what happens when you unplug your headphones?

Much better! http://pastebin.com/YnHqSkmZ

Well it seems that my Plantronics Savi 720 is the cause then.

Thank you! Smile

Best regards
TGMadsen
Reply
#12
hopefully one of the audio devs can chime in and find the root cause
Reply
#13
I suppose all these errors:
Code:
06:06:22 T:2308   ERROR: CAESinkDirectSound::CheckPlayStatus: Failed to play the DirectSound buffer: unknown

have something to do with it.

For OP: This seems to be DirectSound. Does WASAPI work?

scott s.
.
Reply
#14
(2015-07-24, 22:47)scott967 Wrote: I suppose all these errors:
Code:
06:06:22 T:2308   ERROR: CAESinkDirectSound::CheckPlayStatus: Failed to play the DirectSound buffer: unknown

have something to do with it.

For OP: This seems to be DirectSound. Does WASAPI work?

scott s.
.

'WASAPI:default' seems to work. I get sound out of my monitor and my Plantronics BackBeat Pro headphones with WASAPI and Kodi doesn't hang during exit.

Thanks! Smile

Best regards
TGMadsen
Reply
#15
I have the same issue, also Windows 10 and Kodi 15. It seems to occur in conjunction with another problem: when turning on the TV, Kodi sometimes loses the HDMI audio output, and I have to restart Kodi to get it back. Kodi then hangs on exit, so I have to get a keyboard, kill it in taskmgr and it's very frustrating. These issues are new to Windows 10 and/or Kodi 14/15. Didn't happen with XBMC/WIndows 8.


Last lines of my debug log are:

22:21:09 T:3640 DEBUG: Thread LanguageInvoker 3640 terminating
22:21:09 T:2636 DEBUG: Thread LanguageInvoker 2636 terminating
22:21:09 T:4064 INFO: Python script interrupted by user
22:21:09 T:4064 DEBUG: Thread LanguageInvoker 4064 terminating
22:21:13 T:2336 ERROR: ActiveAE::ActiveAE::CActiveAE::InitSink - failed to init
22:21:13 T:2336 DEBUG: Thread ActiveAE 2336 terminating


Dump file shows main thread waiting for CActiveAESink to exit:

6540 0 Main Thread Main Thread Kodi.exe!XbmcThreads::ConditionVariable::wait Normal
ntdll.dll!_NtWaitForAlertByThreadId@8()
ntdll.dll!RtlSleepConditionVariableCS()
KERNELBASE.dll!_SleepConditionVariableCS@12()
Kodi.exe!XbmcThreads::ConditionVariable::wait(CCriticalSection & lock={...}, unsigned long milliseconds=4294967295) Line 64
Kodi.exe!XbmcThreads::TightConditionVariable<bool volatile &>::wait<CCriticalSection>(CCriticalSection & lock={...}, unsigned long milliseconds=4294967295) Line 65
Kodi.exe!CEvent::WaitMSec(unsigned int milliSeconds=4294967295) Line 86
Kodi.exe!CThread::WaitForThreadExit(unsigned int)
Kodi.exe!CThread::StopThread(bool)
Kodi.exe!ActiveAE::CActiveAESink:Big Grinispose() Line 62
Kodi.exe!CApplication::Stop(int exitCode=0) Line 2702
Kodi.exe!CApplicationMessenger:TonguerocessMessage(ThreadMessage * pMsg=0x0194dadc) Line 268
Kodi.exe!CApplicationMessenger:TonguerocessMessages() Line 214
Kodi.exe!CApplication:Tonguerocess() Line 4229
Kodi.exe!CXBApplicationEx::Run() Line 109
Kodi.exe!WinMain(HINSTANCE__ * hInst=0x00260000, HINSTANCE__ * __formal=0x00000000, char * commandLine=0x01942c47, int __formal=1) Line 243
Kodi.exe!__tmainCRTStartup() Line 251
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()


CActiveAESink is blocked waiting on a critical section:

7540 0 Worker Thread Kodi.exe!_threadstartex dsound.dll!CDirectSoundSecondaryBuffer::GetCurrentPosition Above Normal
ntdll.dll!_NtWaitForAlertByThreadId@8()
ntdll.dll!@RtlpWaitOnAddressWithTimeout@16()
ntdll.dll!RtlpWaitOnAddress()
ntdll.dll!RtlpWaitOnCriticalSection()
ntdll.dll!RtlpEnterCriticalSectionContended()
ntdll.dll!_RtlEnterCriticalSection@4()
dsound.dll!CDirectSoundSecondaryBuffer::GetCurrentPosition(unsigned long *,unsigned long *)
dsound.dll!CImpDirectSoundBuffer<class CDirectSoundSecondaryBuffer>::GetCurrentPosition(unsigned long *,unsigned long *)
Kodi.exe!CAESinkDirectSound::UpdateCacheStatus() Line 632
Kodi.exe!CAESinkDirectSound::GetSpace() Line 687
Kodi.exe!CAESinkDirectSound::AddPackets(unsigned char * * data=0x127500d8, unsigned int frames=661, unsigned int offset=0) Line 370
Kodi.exe!ActiveAE::CActiveAESink::OutputSamples(ActiveAE::CSampleBuffer * samples=0x03629d28) Line 822
Kodi.exe!ActiveAE::CActiveAESink::StateMachine(int signal=6, Actor:Tonguerotocol * port=0x00000000, Actor::Message * msg=0x134333d8) Line 464
Kodi.exe!ActiveAE::CActiveAESink:Tonguerocess() Line 555
Kodi.exe!CThread::Action(void)
Kodi.exe!CThread:ConfusedtaticThread(void *)
Kodi.exe!_callthreadstartex() Line 376
Kodi.exe!_threadstartex(void * ptd) Line 354
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()


One of these threads probably owns that critical section:

1072 0 Worker Thread dsound.dll!CThread::ThreadStartRoutine() dsound.dll!CMutexLock::LockOrEvent Time Critical
ntdll.dll!_NtWaitForMultipleObjects@20()
KERNELBASE.dll!_WaitForMultipleObjectsEx@20()
KERNELBASE.dll!_WaitForMultipleObjects@16()
dsound.dll!CMutexLock::LockOrEvent(void *)
dsound.dll!CAudioMediaType::GetAudioFormat(void)
dsound.dll!CDirectSoundAdministrator::HandleFocusChange(void)
dsound.dll!CAudioMediaType::GetAudioFormat(void)
dsound.dll!CThread::ThreadLoop(void)
dsound.dll!CThread:TonguerivateThreadProc(void)
dsound.dll!CThread::ThreadStartRoutine(void *)
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()

2416 0 Worker Thread dsound.dll!CThreadBase::StaticThreadProc() dsound.dll!CLeapSystem::OnCriticalError Time Critical
ntdll.dll!_NtWaitForAlertByThreadId@8()
ntdll.dll!@RtlpWaitOnAddressWithTimeout@16()
ntdll.dll!RtlpWaitOnAddress()
ntdll.dll!RtlpWaitOnCriticalSection()
ntdll.dll!RtlpEnterCriticalSectionContended()
ntdll.dll!_RtlEnterCriticalSection@4()
dsound.dll!CLeapSystem::OnCriticalError(long)
dsound.dll!CAudioMediaType::GetAudioFormat(void)
dsound.dll!CThreadBase::StaticThreadProc(void *)
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()

3992 0 Worker Thread ntdll.dll!TppWorkerThread dsound.dll!CThreadBase::StopThread Normal
ntdll.dll!_NtWaitForSingleObject@12()
KERNELBASE.dll!_WaitForSingleObjectEx@12()
KERNELBASE.dll!_WaitForSingleObject@8()
dsound.dll!CThreadBase::StopThread(void)
dsound.dll!CGraphManager::Stop(int)
dsound.dll!CLeapSystem::StopGraph(unsigned int)
dsound.dll!CLeapSystem::OnCriticalError(long)
dsound.dll!CEngineRendererConnection::OnSessionDisconnected(enum AudioSessionDisconnectReason)
AudioSes.dll!CSessionDisconnect::Invoke(class ATL::CComPtr<struct IAudioSessionEvents>)
AudioSes.dll!CLockedList<ATL::CComPtr<IAudioSessionEvents>,0,1>::ForEachEntry()
AudioSes.dll!CAudioSessionControl::OnAudioSessionEvent()
AudioSes.dll!CAudioSessionControl::CAudioSessionNotificationDelegator::OnMediaNotification(struct MEDIA_NOTIFICATION_BLOCK *)
MMDevAPI.dll!CMediaNotifications::OnMediaNotificationWorkerHandler(struct _TP_CALLBACK_INSTANCE *)
MMDevAPI.dll!CMediaNotifications::MediaNotificationWorkerHandler(struct _TP_CALLBACK_INSTANCE *,void *)
ntdll.dll!TppSimplepExecuteCallback()
ntdll.dll!TppWorkerThread()
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 15 hangs during exit0