Bug Division by Zero
#1
When I power off my projector xbmc always crashed with an arithmetic exception.

> Program terminated with signal 8, Arithmetic exception.

the last lines in the log file is:
> 04:29:27 T:2686704496 DEBUG: CVideoReferenceClock: Received RandR event 101
> 04:29:27 T:2686704496 DEBUG: CVideoReferenceClock: Detected refreshrate: 0 hertz

I found "Detected refreshrate" in VideoReferenceClock.cpp and "Received RandR event" leads to GetRandRRate()
I've added a check for ==0 and returned 60

int CVideoReferenceClock::GetRandRRate()
{
int RefreshRate;
XRRScreenConfiguration *CurrInfo;

CurrInfo = XRRGetScreenInfo(m_Dpy, RootWindow(m_Dpy, m_vInfo->screen));
RefreshRate = XRRConfigCurrentRate(CurrInfo);
XRRFreeScreenConfigInfo(CurrInfo);

if(RefreshRate==0)
return 60;
else
return RefreshRate;
}

-Robert
Reply
#2
moved to dev on request by @ace20022
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Division by Zero0