2005-04-22, 21:10
(madtw @ april 22 2005,06:23 Wrote:henk: try the latest cvs...hi,
jpf: i intentionally made it so that the back & menu buttons work for subscreens but the menu button only works for the main screen. it is mainly so that you don't ditch out of the script unintentionally... i use the back button when closing subscreens and then hit the menu button when i truly want to quit the script from the main screen. to each his own i guess...
the timeout on the socket is a good idea.. i originally had the timeout coded when i was testing in linux but python in xbmc didn't like the code. in the end i ended up ripping it out. now that you've figured out the magic incantantation, i can put the socket timeout code back in...
when i couldn't exit the screens a while ago, i tried using other actions besides the back and menu buttons but it did not work. the more i read about your debugging, the more i think this might be a threading issue... one thread is blocked on a socket and the other thread requests the window be closed. since there are still pending events on the window, it isn't entirely freed up but new events cannot be created because the window id is no longer valid? the -10000 window id is something xbmc assigns to new python windows... i haven't hard coded any ids into the scripts.
if you take a look at mythtvguide.py, you can see how i restricted threaded events from modifying the screen at the same time. you could try adding in similar code into the screens that are causing problems to see if it helps... start at line 489.
as for recreating connections... with some quick calls to test if a connection is still valid, it should be possible to add in recreating a dead connection into the getinstance calls that retrieve a connection/database object. at the moment, i try to hang on to connections for as short a time as possible but there is no retry. this has been working well for me so far but i must not be getting any timeouts on my connections.
i'm not sure what the problem is with your last mysql error... i haven't touched that module in a long time. what version of mysql are you using? i'm running version 4.0.23... if you're running a newer version it could be that something has changed breaking mysql.py.
ok well, the thing is that the screens don't freeze. i just can't exit them. for example in the recorded movies screen, i often get stuck in the preview window. i can play the movie from there, i can delete and copy etc. i just can't exit it. can we put an emergency exit key in there? is there some special way that the program needs to be killed completely?