Bug PVR Recorded TV item list causing loop to GetRecordingLastPlayedPosition
#1
Not sure if this is a PVR GUI specific issue or a general GUI issue, but what's happening is that the PVR's GetRecordingLastPlayedPosition is getting called infinitely when the user has any recording item highlighted in the UI.  Go into TV / Recordings / {series} and then highlight any recording.  I wasn't really able to track down the root cause myself, but it acts like the highlighted control is constantly being redrawn, which is causing it to ultimately call GetRecordingLastPlayedPosition.  Probably simple to fix, but the best I can do right now is provide a sample call stack and hope ksooo sees this.

(Call stack is from a Windows x64 build of master branch, ref ead400093c - "Merge pull request #14923 …")

Thank you!

text:

kodi.exe!PVR::CPVRRecording::GetResumePoint() Line 310 C++
kodi.exe!KODI::GUILIB::GUIINFO::CVideoGUIInfo::GetBool(bool & value, const CGUIListItem * gitem, int contextWindow, const KODI::GUILIB::GUIINFO::CGUIInfo & info) Line 625 C++
kodi.exe!KODI::GUILIB::GUIINFO::CGUIInfoProviders::GetBool(bool & value, const CGUIListItem * item, int contextWindow, const KODI::GUILIB::GUIINFO::CGUIInfo & info) Line 104 C++
kodi.exe!CGUIInfoManager::GetItemBool(const CGUIListItem * item, int contextWindow, int condition) Line 9744 C++
kodi.exe!CGUIInfoManager::GetMultiInfoBool(const KODI::GUILIB::GUIINFO::CGUIInfo & info, int contextWindow, const CGUIListItem * item) Line 9266 C++
kodi.exe!CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListItem * item) Line 9233 C++
kodi.exe!INFO::InfoSingle::Update(const CGUIListItem * item) Line 27 C++
kodi.exe!INFO::InfoBool::Get(const CGUIListItem * item) Line 37 C++
kodi.exe!INFO::CSkinVariableString::GetValue(bool preferImage, const CGUIListItem * item) Line 65 C++
kodi.exe!CGUIInfoManager::GetSkinVariableString(int info, bool preferImage, const CGUIListItem * item) Line 9830 C++
kodi.exe!CGUIInfoManager::GetMultiInfoItemImage(const CFileItem * item, int contextWindow, const KODI::GUILIB::GUIINFO::CGUIInfo & info, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * fallback) Line 9728 C++
kodi.exe!CGUIInfoManager::GetItemImage(const CGUIListItem * item, int contextWindow, int info, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * fallback) Line 9721 C++
kodi.exe!KODI::GUILIB::GUIINFO::CGUIInfoLabel::GetItemLabel(const CGUIListItem * item, bool preferImages, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * fallback) Line 78 C++
kodi.exe!CGUIImage::UpdateInfo(const CGUIListItem * item) Line 66 C++
kodi.exe!CGUIListGroup::UpdateInfo(const CGUIListItem * item) Line 87 C++
kodi.exe!CGUIListItemLayout::Process(CGUIListItem * item, int parentID, unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 67 C++
kodi.exe!CGUIBaseContainer::ProcessItem(float posX, float posY, std::shared_ptr<CGUIListItem> & item, bool focused, unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 193 C++
kodi.exe!CGUIBaseContainer::Process(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 127 C++
kodi.exe!CGUIControl::DoProcess(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 135 C++
kodi.exe!CGUIBaseContainer::DoProcess(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 68 C++
kodi.exe!CGUIControlGroup::Process(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 93 C++
kodi.exe!CGUIControl::DoProcess(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 135 C++
kodi.exe!CGUIControlGroup::Process(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 93 C++
kodi.exe!CGUIControl::DoProcess(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 135 C++
kodi.exe!CGUIControlGroup::Process(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 93 C++
kodi.exe!CGUIControl::DoProcess(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 135 C++
kodi.exe!CGUIWindow::DoProcess(unsigned int currentTime, std::vector<CDirtyRegion,std::allocator<CDirtyRegion> > & dirtyregions) Line 334 C++
kodi.exe!CGUIWindowManager::Process(unsigned int currentTime) Line 1098 C++
kodi.exe!CApplication::FrameMove(bool processEvents, bool processGUI) Line 2401 C++
kodi.exe!CXBApplicationEx::Run(const CAppParamParser & params) Line 71 C++
kodi.exe!XBMC_Run(bool renderGUI, const CAppParamParser & params) Line 72 C++
kodi.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * __formal, char * commandLine, int __formal) Line 121 C++
Reply
#2
Is there an actual problem with this?
Reply
#3
It seems your pvr client supports server side play positions, thus the resume point for a recording can change at any time. Another client may have just watched part of the recording on another device while you're highlighting the recording on your device.

If that causes actual trouble I could fix it to refresh only every x seconds, but only if it causes trouble...

I see generally no problem with calling the add-on constantly.
Reply
#4
(2018-11-26, 09:17)ksooo Wrote: It seems your pvr client supports server side play positions, thus the resume point for a recording can change at any time. Another client may have just watched part of the recording on another device while you're highlighting the recording on your device.

If that causes actual trouble I could fix it to refresh only every x seconds, but only if it causes trouble...

I see generally no problem with calling the add-on constantly.
Well in my particular case it's ultimately calling a web service a few thousand times, which was causing some folks some unexpected performance concerns.  The data is expensive for me to get and becomes more expensive as the number of recordings they have increases.  If this is the way it was intended to be no worries, I blocked it for now by just checking if it's asking for the exact same thing it just asked for and returning the previous result.  It just seemed like a bug given the sheer magnitude of invocations -- is this getting called for every frame draw? (I think it was twice per refresh - once to choose the list item icon and again to get the actual resume position?)

I'll just formalize the block I put in place so if the user stops on a recording it won't go off and do the same work repeatedly.  If all the official PVRs work fine with this, I say leave it alone - one odd man out isn't worth screwing everyone else up.  If you did ultimately want to tone it down, once or twice per second would seem like a pretty reasonable refresh rate to me.  That would still feel fairly real-time to the end user.

Appreciate the info as always ksooo!
Reply
#5
I see. Number of recordings is unrelated as this only happens for the one selected recording.

However, I think I will limit the calls to max 1 per 5 secs I guess.
Reply
#6
Here we go: https://github.com/xbmc/xbmc/pull/14961
Reply
#7
Thank you sir! I greatly appreciate the flexibility here. Hopefully it benefits more than just me!
Reply

Logout Mark Read Team Forum Stats Members Help
PVR Recorded TV item list causing loop to GetRecordingLastPlayedPosition0