Release Artist Slideshow addon (with skin and addon integration)
Hey pkscout

Anyway we can improve on the exit resiliance of XSqueeze/AS? I am having some issues - due to some necessary changes in my threading, I am hanging on:

Code:
#wait here for Artist slideshow to finish, can occasionally take several seconds
      while (not xbmcgui.Window(xbmcgui.getCurrentWindowId()).getProperty("ArtistSlideshow.CleanupComplete") == "True"):
        log("Still waiting for artistslideshow to stop")
        xbmc.sleep(1000)

...I think the call to xbmc.sleep means the thread never unlocks from the current lock this is all wrapped in, so it just hangs there....

AS takes a *long* time to exit - without it my addon exits instantly, but even without this hang, it can take up to 10+ seconds, which is...inelegant.

If I remove the while loop above, AS will crash:

Code:
16:39:44 T:6008   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: access_voilation
                                            Traceback (most recent call last):
                                              File "C:\Users\x\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py", line 743, in <module>
                                                slideshow = Main()
                                              File "C:\Users\x\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py", line 155, in __init__
                                                self.WINDOW.clearProperty("ArtistSlideshowRunning")
                                            RuntimeError: access_voilation
                                            -->End of Python script error report<--

Can you maybe check if the window exists or just wrap it up in a try/except or something?

I'd really like to
a) not hang Smile
and
b) exit much more quickly if possible.

Any ideas on improvementsHuh

(testing with Frodo nightlies, which are a bit of a mess from a Python perspective!)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply


Messages In This Thread
New Test Version Available - by pkscout - 2012-03-08, 16:26
[No subject] - by mardup - 2012-03-10, 12:26
[No subject] - by pkscout - 2012-03-11, 01:35
RE: - by mardup - 2012-03-12, 17:50
RE: - by pkscout - 2012-03-13, 03:22
New Beta Version for Testing - by pkscout - 2012-07-13, 17:54
New Beta Version for Testing - by pkscout - 2012-07-14, 22:50
Pull Request for v1.4 Submitted - by pkscout - 2012-07-20, 23:01
New Beta Version for Testing - by pkscout - 2012-08-10, 03:18
RE: [RELEASE] Artist Slideshow 1.3.0 addon (with skin and addon integration) - by bossanova808 - 2012-09-24, 08:49
New Frodo BETA Support Files - by pkscout - 2012-11-21, 06:20
New 2.0.0 Beta Coming Soon - by pkscout - 2016-05-12, 02:54
Writing tips - by Parkerbup - 2017-02-03, 14:56
Add-on Artist Slideshow - by jo26 - 2014-08-08, 22:58
Logout Mark Read Team Forum Stats Members Help
Artist Slideshow addon (with skin and addon integration)5