2018-09-17, 15:20
Thanks @HiassofT for taking an interest, Millhouse pointed me at JSON too.
For example
The string parameter in that CUtil::ValidatePath call is g_application.CurrentFile(), and I am wondering if this is sometimes being deleted in the middle of the JSON processing, say if player track change and JSON call coincide.
Anyway I have enabled logging and set a script running to make lots of Player.GetItems calls during playback. So far it is stubbornly refusing to crash of course
I'll report back when I have something.
EDIT: I think I have found the cause of the seg fault - it was as I suspected above, the JSON thread using a pointer to something that the main thread could deleted in the meantime. Fix in PR14454
(2018-09-17, 11:38)HiassofT Wrote: @DaveBlake kodi seems to be crashing in CUtil::ValidatePath (xbmc/Util.cpp) servicing a JsonRPC request. The audio library is also involvedThat crash log does show a call to CMusicDatabase::GetSongByFileName, but I have a couple more that still relate to the Player.GetItem JSON call but don't get as far as the DB, so not quite in my backyard.
For example
Code:
#0 0x74de0fe4 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6
#1 0x005f7984 in CUtil::ValidatePath(std::string const&, bool) ()
#2 0x005ff2f4 in CURL::Parse(std::string const&) ()
#3 0x009e49e4 in ?? ()
#4 0x0042fb70 in XFILE::CDirectory::Exists(std::string const&, bool) ()
#5 0x00490e54 in JSONRPC::CAudioLibrary::FillFileItem(std::string const&, std::shared_ptr<CFileItem>&, CVariant const&) ()
#6 0x0046aa0c in JSONRPC::CPlayerOperations::GetItem(std::string const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*, CVariant const&, CVariant&) ()
#7 0x004814c4 in JSONRPC::CJSONRPC::HandleMethodCall(CVariant const&, CVariant&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) ()
#8 0x004816ec in JSONRPC::CJSONRPC::MethodCall(std::string const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) ()
#9 0x009dea40 in CHTTPJsonRpcHandler::HandleRequest() ()
#10 0x005126f0 in CWebServer::HandleRequest(std::shared_ptr<IHTTPRequestHandler> const&) ()
#11 0x00512c2c in CWebServer::HandlePartialRequest(MHD_Connection*, CWebServer::ConnectionHandler*, HTTPRequest const&, char const*, unsigned int*, void**) ()
#12 0x0050fc24 in CWebServer::AnswerToConnection(void*, MHD_Connection*, char const*, char const*, char const*, char const*, unsigned int*, void**) ()
Anyway I have enabled logging and set a script running to make lots of Player.GetItems calls during playback. So far it is stubbornly refusing to crash of course
I'll report back when I have something.
EDIT: I think I have found the cause of the seg fault - it was as I suspected above, the JSON thread using a pointer to something that the main thread could deleted in the meantime. Fix in PR14454