Win Crashes on Windows
#46
Ok. Don't rebuild it yet. :-) I just found the issue.

Basically Finalize shouldn't be called (or at least shouldn't execute) multiple times but it looks like it is. Let me make a change and post back here with a link to a fix in my repo when it's ready.
Reply
#47
Hurray! I didn't think of checking if finalize was only called once per initialize. Duh!
Reply
#48
Finalize executes (and unloads python) 10 seconds after the last script closes. By default the 'script.common.plugin.cache' is always running now, so on my system Finalize never gets called during the normal course of running. This has caused other problems we didn't see before since Finalize stopped being called when this script was introduced.

I'm still not sure how it's being called for you since it's not supposed to be called while there's scripts running. In any case, the flag that determines whether or not we've been initialized is interrogated in the Finalize without the lock held. This MAY be an issue if Finalize can be called from any thread other than the main thread (which I'm not sure is actually possible). I can fix this and we can see if it addresses the issue but I tend to doubt it (might as well try though).

I'll be ready within an hour or so (I hope)
Reply
#49
Ok. Here is my repo: https://github.com/jimfcarroll/xbmc

The fix is on the branch 'fix-python-finalize'

If you can clone my repo and change the branch, then build from scratch, we can see if this addresses anything. If you don't know how to do that, post back here and I'll help.
Reply
#50
Sorry to say it's still crashing, same place.

Here's the log (Ran it, browse around a little, the PVR thing probably added tons on things as it's not usually that large): https://dl.dropbox.com/u/4044591/xbmc_python_fix_1.log

Reply
#51
@jfcarroll: I can confirm XBMC is still crashing when using the slideshow screensaver. I left XBMC to run the screensaver around 4 hours, tried starting ForumBrowser and got a "XBMC has stopped working" error dialog. The log file recorded this error:

Code:
11:52:29 T:232   DEBUG: ------ Window Deinit (C:\Users\Administrator\AppData\Roaming\XBMC\addons\screensaver.xbmc.slideshow\resources\skins\default\720p\script-python-slideshow.xml) ------
11:52:29 T:4580   DEBUG: NEWADDON PythonCallbackHandler construction with PyThreadState 0x1eff1c48
11:52:29 T:2336    INFO: Scriptresult: Success
11:52:29 T:2336   ERROR: The python script "C:\Users\Administrator\AppData\Roaming\XBMC\addons\screensaver.xbmc.slideshow\default.py" has left several classes in memory that should have been cleaned up. The classes include: WindowXMLDialog,Monitor
11:52:29 T:2336    INFO: Python script stopped
11:52:29 T:2336   DEBUG: Thread XBPyThread 2336 terminating
11:52:29 T:232   DEBUG: waiting for python thread 25 to stop
11:52:29 T:232   DEBUG: python thread 25 destructed
Reply
#52
Thanks. Can you paste your entire log somewhere?
Reply
#53
Zeflash, I think I managed to reproduce this on Linux (though it doesn't seem to want to do it in the debugger). For now, your system will get more stable if you have the default addon script.common.plugin.cache installed. I'm not sure why it's not there by default but you probably never cleared your user directory since switching to Frodo.

This is not a real solution but might provide a workaround until I figure out what's going on.
Reply
#54
(2012-12-12, 14:14)jfcarroll Wrote: Zeflash, I think I managed to reproduce this on Linux (though it doesn't seem to want to do it in the debugger). For now, your system will get more stable if you have the default addon script.common.plugin.cache installed. I'm not sure why it's not there by default but you probably never cleared your user directory since switching to Frodo.

This is not a real solution but might provide a workaround until I figure out what's going on.

Thanks, I did do an install from scratch. I use xbmc as a portable install, and did install in a new folder. I didn't get the script you are talking about.
On my end I just removed the finalize call altogether and built my own version. I also like to modify the subtitle step, 0.1s is just too precise. I might fork a version and submit a patch for that matter.

Reply
#55
(2012-12-12, 15:50)Zeflash Wrote: Thanks, I did do an install from scratch. I use xbmc as a portable install, and did install in a new folder. I didn't get the script you are talking about.
On my end I just removed the finalize call altogether and built my own version. I also like to modify the subtitle step, 0.1s is just too precise. I might fork a version and submit a patch for that matter.


Did that fix the problem for you? If you could upload your fix that would be great.
Reply
#56
(2012-12-12, 13:47)jfcarroll Wrote: Thanks. Can you paste your entire log somewhere?

No, sorry. The old log was written over. I'll run the screensaver test again and spit out a fresh debug log for you.

Reply
#57
(2012-12-12, 14:14)jfcarroll Wrote: Zeflash, I think I managed to reproduce this on Linux (though it doesn't seem to want to do it in the debugger). For now, your system will get more stable if you have the default addon script.common.plugin.cache installed. I'm not sure why it's not there by default but you probably never cleared your user directory since switching to Frodo.

This is not a real solution but might provide a workaround until I figure out what's going on.

This seemed to do the trick for me. No crashes in the last little while since installing this script along with doing a clean install of XBMC RC1. Hopefully it holds. Thanks for the input.

Reply
#58
Ok. I added several stability fixes which may address this. Can you try it again with the current master? If you're going to wait for a nightly build please make sure that this commit is in the build:

https://github.com/xbmc/xbmc/commit/3ea4...cc081abc4f

If it still fails, it would really help to get a backtrace if possible. You'll need to run it in the VS debugger to do that.

Thanks
Jim
Reply
#59
Is this commit already in the latest nightlies? I am still getting crashes when I try to do any of the following:

1) open "TV Show Next aired" addon (issue is not always but can be generated if try the this after leaving xbmc for a while)
2) Try to download subtitles (pretty much every time)
3) Open Navi-x sometimes sames as "TV show next aired addon"

Let me know and I can try and see if this is still there. I will get some debug logs too.

thanks
Intel® Quad Core i5 Sandybridge @3.40GHz | ASRock Z775 Mobo 8GB DDR3 Ram | Logitech K400 Keyboard |
| Logitec Harmony 550 Remote| 46' Samsung LCD TV | Onkyo TX-S605 w/ Bose 5.1 Surround
Reply
#60
Ok. Another fix here: https://github.com/xbmc/xbmc/commit/47c3...24a1228885

This should address the crash on exit. I cannot seem to reproduce the above problem though. I'll keep trying.

Please let me know if you're still having problems after upgrading to a release with that in it.

Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Crashes on Windows0