Bug Division by Zero - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Bug Division by Zero (/showthread.php?tid=196522) |
Division by Zero - ravenclaw - 2014-05-30 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 RE: Division by Zero - Martijn - 2014-05-30 moved to dev on request by @ace20022 |