Win Crashes on Windows
#31
Can you guys verify this is fixed in B3?

Thanks
Reply
#32
(2012-12-07, 18:31)jfcarroll Wrote: Can you guys verify this is fixed in B3?

Thanks

Tested with the December 7th build and haven't had XBMC crash with a C++ exception. Not sure if that is due to the fix or because I disabled the slideshow screensaver. Actually, all of the issues I have had since Beta 1 (ie. the constant crashing) has been fixed by not using that screensaver.

Reply
#33
Bringing more info about this - I've been testing around plexbmc on both eden & frodo, and it keeps crashing pretty regularly probably because it uses python extensively.
The "crash" always result in the UI freezing, as most of the time the log shows an exception has been thrown in CApplication:Tonguerocess().

When Frodo beta 2 there's a bit more information in the log. This freeze is always logged like this:

00:35:06 T:5096 INFO: Python, unloading python shared library because no scripts are running anymore
00:35:06 T:5096 ERROR: Unhandled exception in CApplication:Tonguerocess() : Access violation at 0x1e003747: Writing location 0x00000000
00:35:07 T:5096 INFO: Python, unloading python shared library because no scripts are running anymore

The access violation always occurs at the same address.

I'll try to build a new version with the mentioned patch - although the source I get off the master branch doesn't seem to correspond to Frodo (unrelated exe build versions, eden splashscreen). Is there a special git repo for frodo?

Edit:
Just tried with the latest nightly build, this specific crash still happens. First time it happened when I turned off the debugging log (I thought the bug was gone!)
Then happened again on exiting (alt-F4). Save address again.
I'll try to run a build in my dev VM see if I can get more info on why/where it crashes.
Reply
#34
Just updated to Beta 3 and I'm happy to report that I'm no longer getting the C++ exception crash anymore. Thank you for all of the time you spent on fixing this JFCarroll. Now if only we can get the slideshow screensaver to stop crashing XBMC... Tongue
Reply
#35
Hi there, I'm new to the threads but a longtime user of XBMC on Windows 7. I have been having the same problem Zeflash describes for several months now and would like to report the issue continues with Frodo Beta 3. Below is what I see at the end of every debug log when the problem occurs. The crash always happens when navigating the UI and it seems to only happen after I've watched something and have returned to the UI. Thanks for your help in advance!

3:03:20 T:2376 INFO: Python, unloading python shared library because no scripts are running anymore
13:03:20 T:2376 ERROR: Unhandled exception in CApplication:Tonguerocess() : Access violation at 0x1e003747: Writing location 0x00000000
13:03:20 T:2376 INFO: Python, unloading python shared library because no scripts are running anymore
13:03:43 T:1148 DEBUG: Thread Jobworker 1148 terminating (autodelete)
13:03:43 T:3204 DEBUG: Thread Jobworker 3204 terminating (autodelete)
13:03:43 T:332 DEBUG: Thread Jobworker 332 terminating (autodelete)
13:03:43 T:3296 DEBUG: Thread Jobworker 3296 terminating (autodelete)
Reply
#36
I managed to repro the crash on the dev VM.
it's indeed a python issue; it crashes in XBPython.cpp, in the XBPython::Finalize() function, on the Py_Finalize() call.
Here's the stack:
Code:
    python26.dll!1e003747()     
    [Frames below may be incorrect and/or missing, no symbols loaded for python26.dll]    
    python26.dll!1e006d21()     
    python26.dll!1e006d21()     
    python26.dll!1e0315cc()     
    python26.dll!1e02bb13()     
>    XBMC.exe!XBPython::Finalize()  Line 605    C++
    XBMC.exe!XBPython::Process()  Line 683    C++
    XBMC.exe!CApplication::Process()  Line 5042    C++
    XBMC.exe!CXBApplicationEx::Run()  Line 142    C++
    XBMC.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * __formal, char * commandLine, HINSTANCE__ * __formal)  Line 163    C++
    XBMC.exe!__tmainCRTStartup()  Line 275 + 0x2c bytes    C
    XBMC.exe!WinMainCRTStartup()  Line 189    C
    kernel32.dll!75b11174()     
    ntdll.dll!7738b3f5()     
    ntdll.dll!7738b3c8()

Using the plexbmc video addon, I just browse around and play things until it crashes. Seems that finalize is called in a delayed way, as sometimes it just crashes while I'm doing absolutely nothing.
It's not limited to plexbmc though. I'm pretty sure just using the subtitles plugin results in the same kind of crash later on. On my end it's been going on for so long I can't even remember when it started to crash randomly like that (before eden). I've switched to Plex for a while but I'm trying to come back to XBMC because it's so much advanced. Having it crash every 10 minutes is obviously not something positive for the WAF though.
Reply
#37
That's interesting as I am also using the plexbmc addon. Maybe the problem is on that side of things.
Reply
#38
I don't think it has to do with the plexbmc plugin specifically. Any plugin that triggers a lot of python script execution might also exhibit this behavior.
I see in the code that the python parser is cleaned up (finalize) after 10 seconds of inactivity; Would it be an issue not to clean it up, and keep it ready to be used?

When I remove the finalize that is called after this inactivity timer, I obviously don't get any more crashes, and even though it's difficult to judge given there's plenty of things being allocated / deallocated while browsing around, it doesn't seem to be leaking.

Maybe there's some kind of leak or resource still in use in the python script when the finalize call is made, which triggers the crash? I'm going to make myself a build without the finalize and see how it runs in the medium run, watching the memory usage.
Reply
#39
Sranshaft, can you verify it's fixed with the screensaver running?

Zeflash,cogdok I'm not sure how you're even getting Finalize to be called since there are default scripts that run forever now. Finalize used to be invoked periodically and it did a lot of catch-all cleanup. Since we have permanently running scripts now, how is it even being called at all? The scriptCounter never gets to 0. Of course, this might be the problem.
Reply
#40
Ah. Zeflash. You must be using Eden. Finalize is really never called in Frodo if you have the default scripts running. I dont suppose you can get me the same backtrace for Frodo?
Reply
#41
(2012-12-11, 15:27)jfcarroll Wrote: Sranshaft, can you verify it's fixed with the screensaver running?

Ah, yeah. I forgot I switched to the blank screensaver due to crashing with the slideshow screensaver. I'll run through the tests and report back my findings tomorrow.

Reply
#42
Hmmm no, in my case finalize gets called 10 seconds after my last browse action via plexbmc.
I'm using a clean XBMC install, subtitles script and plexbmc, that's it.

What are these ever running scripts?

In any case, finalize has an issue of some kind. I saw may posts on stackoverflow about segfaults or access violation when calling finalize so I'm assuming its quite finicky.

Now if you're saying that it should never be called, then it's not needed and removing it is "harmless". At least until a proper cleanup solution is conceived.
Reply
#43
(2012-12-11, 15:32)jfcarroll Wrote: Ah. Zeflash. You must be using Eden. Finalize is really never called in Frodo if you have the default scripts running. I dont suppose you can get me the same backtrace for Frodo?

I'm using Frodo, built from yesterday's sources. I can put a log where the finalize is being called and post it, you'll see that it happens roughly 10 seconds after the last plexbmc call (the only running script in my case).
It's not crashing on the first finalize, but after some time.
Reply
#44
Guys, I see a major problem in the Finalize code that could result in what you're seeing but I'm not sure. Can you build from my repo if I fix it?
Reply
#45
(2012-12-11, 15:52)jfcarroll Wrote: Guys, I see a major problem in the Finalize code that could result in what you're seeing but I'm not sure. Can you build from my repo if I fix it?

I'll try. I found your repo.

Ok actually the github branch from jimfcarroll is 10 days old so it might not be the right one Smile
Please tell me where to check and I'll try.
Reply

Logout Mark Read Team Forum Stats Members Help
Crashes on Windows0