Need help: MP 1.0.0 random crash in Vista (1 Viewer)

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
42
Texas
Home Country
United States of America United States of America
We do indeed use threading for image management to improve GUI performance. I think this will require a patch to Media Portal itself, but I will investigate, and if that's what we need, that's what I'll do.

EDIT: Issue on our tracker here. If you star the issue you will receive email updates as progress is made.
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    We do indeed use threading for image management to improve GUI performance. I think this will require a patch to Media Portal itself, but I will investigate, and if that's what we need, that's what I'll do.

    EDIT: Issue on our tracker here. If you star the issue you will receive email updates as progress is made.

    How about loading the textures in a separate thread, but then using the main MP thread to update the actual textures in fontEngine.dll?
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    42
    Texas
    Home Country
    United States of America United States of America
    That would probably work but it sounds like it would require some changes that might introduce a bit of risk. If this is truly a threading issue, we could just wrap the remove logic and the render logic in lock statements based on the texture object. That way it would be impossible to unload a texture while MP is trying to use it to render in another thread. I think this would both solve the issue and keep the risk of new bugs being introduced to a minimum.

    I'll try to put together a patch and a test core.dll tonight.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I saw you tagged this issue as resolved in Mantis tourettes. Does your fix also apply to Moving Pictures' asynchronous loading/unloading behavior, or should I still look into this?

    Not sure. Its just a "hack" to try to delay the texture unloading on C++ side (usually I won't touch the C# side code :)) fontEngine.dll is pretty stupid component (no logic inside it), it mainly exports some low level functions to C# side. So all the actual locking logic should go into C# side (I just added some safe guards as MP was sometimes panicing on my HTPC). Not sure if it has some side effects like rendering clitches etc. when MP side is not playing nicely.

    ...so, the C# should be handling the locking correctly and make sure that when the rendering pass is ongoing textures & surfaces are left alone in the fontEngine.dll side. All changes must be done pretty carefully as it its easy to introduce some pretty well "hidden" dead locks (as you see that the timing has been working on luck basis for few years already with pretty small odds to get MP to crash to desktop :))

    The locking must be done on rendering pass basis (as one to me it looks like one rendering call to the fontEngine.dll can cause multiple textures to be rendered).
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    42
    Texas
    Home Country
    United States of America United States of America
    Sorry for the delay on this, I had a busy weekend, and I think I just needed a little break from coding, so I haven't done much work the last few days. Attached are updated DLLs for core.dll and bass.net.dll (required for unrelated changes to core.dll in the latest version of the source code).

    If you choose to test these binaries please make sure that you are using:
    1. The latest SVN of MediaPortal
    2. Moving Pictures 0.7.1

    Regardless, of what you have installed use these patched files at your own risk. These are experimental changes that have extremely limited testing. And just to be clear this patch is meant to fix the AccessViolationException errors that have been occasionally showing up for some users and nothing else.

    Feedback is welcome. I have experienced this issue a couple times but I have had a hard time reproducing it consistently, so I am not 100% that this fixes the problem, but I am hopeful. Let me know how this change works for you guys. If I get positive feedback I will submit this for integration with 1.0.1.

    The .zip file is what most people are probably interested in. Back up the existing files first, but just copy the files to your MediaPortal folder. The .patch file contains the source code changes and is really only meant for other developers to take a peek at the changes I have made.
     

    Attachments

    • access_violation_fix_binaries.zip
      30.7 KB
    • access_violation_fix.patch
      30.7 KB

    druid9

    MP Donator
  • Premium Supporter
  • December 31, 2006
    255
    9
    63
    Not sure if this is relevant, but I was having this issue very consistently, and resolved it by turning off the RSS Ticker.

    Maybe the constant rendering of this is part of the problem, and exacerbates the other issues.

    Just trying to be helpful, know nothing in a technical sense, but this seems to have worked for me.

    Sig is probably out of date, I am currently using MediaStream on MP 1.0.0. with latest MovingPictures
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Not sure if this is relevant, but I was having this issue very consistently, and resolved it by turning off the RSS Ticker.

    Not sure how RSS works (didn't check the code) but following could be possible:

    - RSS handling could change the Process() method timing which could lead to the more likely
    - RSS plugin itself is causing those access violation errors by updating some textures
     

    Users who are viewing this thread

    Top Bottom