Correct way to disable a service addon
#1
What is the correct way to disable a service addon, the example code from the wiki:-

Code:
import time
import xbmc

if __name__ == '__main__':
    monitor = xbmc.Monitor()

    while not monitor.abortRequested():
        # Sleep/wait for abort for 10 seconds
        if monitor.waitForAbort(10):
            # Abort was requested while waiting. We should exit
            break
        xbmc.log("hello addon! %s" % time.time(), level=xbmc.LOGDEBUG)

Crashes Kodi 17.3 Linux when pressing the Disable button Sad But works fine under 17.3 windows.

I get no crash log and these are the last entrys in the kodi.log file:-

Code:
19:50:05.986 T:3619525536    INFO: CPythonInvoker(15, /storage/.kodi/addons/service.test/main.py): script successfully run
19:50:05.986 T:3619525536    INFO: CPythonInvoker(15, /storage/.kodi/addons/service.test/main.py): waiting on thread 18446744072996598688
19:50:06.787 T:4118914672   DEBUG: CPythonInvoker(15, /storage/.kodi/addons/service.test/main.py): script termination took 803ms
19:50:32.397 T:3679450016   DEBUG: Thread JobWorker 3679450016 terminating (autodelete)
19:50:32.398 T:3844314016   DEBUG: Thread JobWorker 3844314016 terminating (autodelete)
19:50:32.398 T:3909088160   DEBUG: Thread JobWorker 3909088160 terminating (autodelete)
19:50:32.526 T:4031767456   DEBUG: Thread JobWorker 4031767456 terminating (autodelete)

Then the UI just hangs.

Any help please.
Reply
#2
Seems like it's not just the wiki sample code, every service addons I've tried all behave the same under Kodi 17.3 linux:-

service.watchdog
service.skin.widgets
service.popwindow
and many more.....

Press Disable and the UI just hangs and they all give the same log entrys:-

Code:
20:24:38.038 T:3587888032    INFO: CPythonInvoker(20, /storage/.kodi/addons/service.popwindow/service.py): script successfully run
20:24:38.039 T:3613053856    INFO: CPythonInvoker(21, /storage/.kodi/addons/service.popwindow/service.py): script successfully run
20:24:38.039 T:4120352368   DEBUG: CPythonInvoker(20, /storage/.kodi/addons/service.popwindow/service.py): script termination took 1ms
20:25:03.143 T:4032816032   DEBUG: Thread JobWorker 4032816032 terminating (autodelete)
20:25:03.144 T:3918525344   DEBUG: Thread JobWorker 3918525344 terminating (autodelete)
20:25:03.144 T:3977245600   DEBUG: Thread JobWorker 3977245600 terminating (autodelete)
20:25:03.191 T:3853788064   DEBUG: Thread JobWorker 3853788064 terminating (autodelete)
Reply

Logout Mark Read Team Forum Stats Members Help
Correct way to disable a service addon0