Kodi Community Forum

Full Version: Sporadic crash of Kodi when issuing a Playlist.Add
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
since update of Kodi to 16 Jarvis I'm experiencing a sporadic crash when sending a Playlist.Add, e.g.:

Playlist.Add
item = {
songid = 7853;
};
playlistid = 0;

I see this on MacOS and haven't tried to reproduce it on other platforms.

This is the call stack:

Thread 32 Crashed:
0 org.xbmc.kodi 0x000000010fb328f8 JSONRPC::CFileItemHandler::FillFileItemList(CVariant const&, CFileItemList&) + 40
1 org.xbmc.kodi 0x000000010fb4685f JSONRPC::CPlaylistOperations::HandleItemsParameter(int, CVariant const&, CFileItemList&) + 527
2 org.xbmc.kodi 0x000000010fb4632c JSONRPC::CPlaylistOperations::Add(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*, CVariant const&, CVariant&) + 268
3 org.xbmc.kodi 0x000000010fb397e9 JSONRPC::CJSONRPC::HandleMethodCall(CVariant const&, CVariant&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) + 521
4 org.xbmc.kodi 0x000000010fb3943a JSONRPC::CJSONRPC::MethodCall(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) + 458
5 org.xbmc.kodi 0x000000010fbd81ab CHTTPJsonRpcHandler::HandleRequest() + 667
6 org.xbmc.kodi 0x000000010f9a12c0 CWebServer::HandleRequest(IHTTPRequestHandler*) + 160
7 org.xbmc.kodi 0x000000010f99ffee CWebServer::AnswerToConnection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned long*, void**) + 1598
8 org.xbmc.kodi 0x00000001102d3d8b call_connection_handler + 187
9 org.xbmc.kodi 0x00000001102d2a7c MHD_connection_handle_idle + 1740
10 org.xbmc.kodi 0x00000001102e056d MHD_handle_connection + 1261
11 libsystem_pthread.dylib 0x00007fff8f94cc13 _pthread_body + 131
12 libsystem_pthread.dylib 0x00007fff8f94cb90 _pthread_start + 168
13 libsystem_pthread.dylib 0x00007fff8f94a375 thread_start + 13

I downloaded the source code and built Kodi with XCode. I'm able to reproduce the crash there as well, but I didn't really see a reason for it when evaluating the variables and looking at the code. Maybe a threading issue?

Is this something known or should I submit a bug report somewhere?

Regards,
Markus
Thanks for the link... looks like that this patch is only related to TVOS? I'm seeing this crash on my MacBook
Tried the patch anyway while removing "defined(TARGET_DARWIN_TVOS)". Didn't help. Thread size was increased from 524288 to 1048576.
I have a few report from user that there's crashes too with Playlist.GetItems and not only on MacOS.

But I can't get any of them to provide Kodi logs and crashdump Sad

Seems an old 14.x bug about playlist is back. Threading / racing condition but I can't find the related PR Sad