[fixed] AA Branch : Error while switching from widowed to fullscreen (Atl+Enter) (1 Viewer)

Smeulf

Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Hi all,

    Sorry about this, but I found another issue in the AA branch (it's perfectly working with the last commit in dev branch before AA branch creation) :

    - Switch to "window mode" (Alt+Enter) if not
    - Start a video
    - Switch to FullScreen Mode (Alt+Enter)

    => I got this error each time, causing once again black screen :

    Code:
    [2012-02-25 02:28:32,815] [29627  ] [InputMgr ] [ERROR] - InputManager: Error dispatching 'KeyEvent'
    SlimDX.Direct3D9.Direct3D9Exception: D3DERR_INVALIDCALL: Invalid call (-2005530516)
      à System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
      à System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
      à MediaPortal.UI.SkinEngine.GUI.MainForm.SwitchMode(ScreenMode mode)
      à MediaPortal.UI.SkinEngine.SkinEnginePlugin.<RegisterGlobalKeyBindings>b__1()
      à MediaPortal.UI.SkinEngine.InputManagement.InputManager.<>c__DisplayClass2.<AddKeyBinding>b__1()
      à MediaPortal.UI.SkinEngine.InputManagement.InputManager.ExecuteKeyPress(KeyEvent evt)
      à MediaPortal.UI.SkinEngine.InputManagement.InputManager.DispatchEvent(InputEvent evt)
      à MediaPortal.UI.SkinEngine.InputManagement.InputManager.Dispatch(Object o)

    This time, it's not related to AA enabled or not.

    Cheers.

    Smeulf.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I can manage this one time with your steps:

    Code:
        private void WriteGlyphToTexture(FT_BitmapGlyph Glyph, int pwidth, int pheight, Byte[] BitmapBuffer)
        {
          // Lock the the area we intend to update
          Rectangle charArea = new Rectangle(_currentX, _currentY, pwidth, pheight);
          DataRectangle rect = _texture.LockRectangle(0, charArea, LockFlags.None);
    the LockRectangle fails, which could cause the "texture locked" exception from the other report.

    So maybe the issue comes directly from FronAssetCore, when a call to LockRectangle fails while the GUI is doing measuring and sizing.

    Code:
        [Externer Code] 
    >    SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.WriteGlyphToTexture(Tao.FreeType.FT_BitmapGlyph Glyph = {Tao.FreeType.FT_BitmapGlyph}, int pwidth = 11, int pheight = 22, byte[] BitmapBuffer = {byte[152]}) Zeile 331 + 0x38 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.AddGlyph(uint glyphIndex = 18) Zeile 296 + 0x66 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.Character(char character = '/') Zeile 472 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.PartialTextWidth(string text = "/", int fromIndex = 0, int toIndex = 0, float fontSize = 25.0, bool kerning = true) Zeile 155 + 0x29 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.TextWidth(string text = "/", float fontSize = 25.0, bool kerning = true) Zeile 118 + 0x35 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.FontAsset.TextWidth(string text = "/", float fontSize = 25.0, bool kerning = true) Zeile 85 + 0x1e Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Rendering.TextBuffer.TextWidth(string text = "/") Zeile 236 + 0x24 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.Label.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = NaN Height = 579.0}) Zeile 245 + 0x2a Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = NaN Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.StackPanel.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 722.0 Height = 579.0}) Zeile 175 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 722.0 Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.Grid.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 130 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.Grid.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 130 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.Border.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 273 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.Control.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 312 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateDesiredSize(System.Collections.Generic.IEnumerator<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement> currentVisibleChildEnumerator = {System.Collections.Generic.List<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement>.Enumerator}, System.Drawing.SizeF currentAvailableSize = {Width = 768.0 Height = 595.0}) Zeile 231 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 77 + 0x31 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateDesiredSize(System.Collections.Generic.IEnumerator<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement> currentVisibleChildEnumerator = {System.Collections.Generic.List<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement>.Enumerator}, System.Drawing.SizeF currentAvailableSize = {Width = 1280.0 Height = 595.0}) Zeile 239 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateDesiredSize(System.Collections.Generic.IEnumerator<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement> currentVisibleChildEnumerator = {System.Collections.Generic.List<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement>.Enumerator}, System.Drawing.SizeF currentAvailableSize = {Width = 1280.0 Height = 595.0}) Zeile 233 + 0x1d Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 77 + 0x31 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.Grid.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 130 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.UpdateLayoutRoot(System.Drawing.SizeF skinSize = {Width = 1280.0 Height = 720.0}) Zeile 1263 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.Screen.Prepare() Zeile 452 + 0x25 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.DoExchangeScreen_NoLock(MediaPortal.UI.SkinEngine.ScreenManagement.Screen screen = {MediaPortal.UI.SkinEngine.ScreenManagement.Screen}) Zeile 858 + 0xa Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.DoShowScreen_NoLock(MediaPortal.UI.SkinEngine.ScreenManagement.Screen screen = {MediaPortal.UI.SkinEngine.ScreenManagement.Screen}, bool closeDialogs = true) Zeile 648 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.OnMessageReceived(MediaPortal.Common.Messaging.AsynchronousMessageQueue queue = {MediaPortal.Common.Messaging.AsynchronousMessageQueue}, MediaPortal.Common.Messaging.SystemMessage message = {MediaPortal.Common.Messaging.SystemMessage}) Zeile 328 + 0xe Bytes    C#
        MediaPortal.Common.dll!MediaPortal.Common.Messaging.AsynchronousMessageQueue.DoWork() Zeile 150 + 0x11 Bytes    C#
        [Externer Code]


    Error case 2 related to same scenario, AccessViolation:
    Code:
        private bool AddGlyph(uint glyphIndex)
        {
          // FreeType measures font size in terms Of 1/64ths of a point.
          // 1 point = 1/72th of an inch. Resolution is in dots (pixels) per inch.
          float point_size = 64.0f * _charSet.RenderedSize * 72.0f / _resolution;
          FT.FT_Set_Char_Size(_family.Face, (int) point_size, 0, _resolution, 0);
     
          // Font does not contain that glyph, the 'missing' glyph will be shown instead
          if (glyphIndex == 0 && _charSet.GetCharacter(0) != null)
            return false;
     
          // Load the glyph for the current character.
          if (FT.FT_Load_Glyph(_family.Face, glyphIndex, FT.FT_LOAD_DEFAULT) != 0)
            return false;

    I got MP2 back to live by "ALT+Enter" to toggle screen, then all was fine again

    Stacktrace:
    Code:
        [Externer Code]   
    >    SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.AddGlyph(uint glyphIndex = 79) Zeile 248 + 0x23 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.Character(char character = 'l') Zeile 472 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.PartialTextWidth(string text = "Playing", int fromIndex = 0, int toIndex = 6, float fontSize = 25.0, bool kerning = true) Zeile 155 + 0x29 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.AssetCore.FontAssetCore.TextWidth(string text = "Playing", float fontSize = 25.0, bool kerning = true) Zeile 118 + 0x35 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ContentManagement.FontAsset.TextWidth(string text = "Playing", float fontSize = 25.0, bool kerning = true) Zeile 85 + 0x1e Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Rendering.TextBuffer.TextWidth(string text = "Playing") Zeile 236 + 0x24 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.Label.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 245 + 0x2a Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.Grid.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 130 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.Grid.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 130 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.Border.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 732.0 Height = 579.0}) Zeile 273 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.Control.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 312 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateDesiredSize(System.Collections.Generic.IEnumerator<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement> currentVisibleChildEnumerator = {System.Collections.Generic.List<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement>.Enumerator}, System.Drawing.SizeF currentAvailableSize = {Width = 768.0 Height = 595.0}) Zeile 231 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 77 + 0x31 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 768.0 Height = 595.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateDesiredSize(System.Collections.Generic.IEnumerator<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement> currentVisibleChildEnumerator = {System.Collections.Generic.List<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement>.Enumerator}, System.Drawing.SizeF currentAvailableSize = {Width = 1280.0 Height = 595.0}) Zeile 239 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateDesiredSize(System.Collections.Generic.IEnumerator<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement> currentVisibleChildEnumerator = {System.Collections.Generic.List<MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement>.Enumerator}, System.Drawing.SizeF currentAvailableSize = {Width = 1280.0 Height = 595.0}) Zeile 233 + 0x1d Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.DockPanel.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 77 + 0x31 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Panels.Grid.CalculateInnerDesiredSize(System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 130 + 0xd Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.Measure(ref System.Drawing.SizeF totalSize = {Width = 1280.0 Height = 720.0}) Zeile 1023 + 0x54 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.Controls.Visuals.FrameworkElement.UpdateLayoutRoot(System.Drawing.SizeF skinSize = {Width = 1280.0 Height = 720.0}) Zeile 1263 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.Screen.Prepare() Zeile 452 + 0x25 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.DoExchangeScreen_NoLock(MediaPortal.UI.SkinEngine.ScreenManagement.Screen screen = {MediaPortal.UI.SkinEngine.ScreenManagement.Screen}) Zeile 858 + 0xa Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.Recreate_NoLock(MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.ScreenManagerMemento memento = {MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.ScreenManagerMemento}) Zeile 510 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.ScreenManagement.ScreenManager.ExecuteWithTempReleasedResources(System.Action action = {Method = {System.Reflection.RuntimeMethodInfo}}) Zeile 474 + 0xb Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.DirectX.GraphicsDevice.Reset() Zeile 278 + 0x5f Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.GUI.MainForm.StartUI() Zeile 250 + 0x5 Bytes    C#
        SkinEngine.dll!MediaPortal.UI.SkinEngine.GUI.MainForm.SwitchMode(MediaPortal.UI.Presentation.Screens.ScreenMode mode = FullScreen) Zeile 452 + 0x8 Bytes    C#
        [Externer Code]   
        SkinEngine.dll!MediaPortal.UI.SkinEngine.GUI.MainForm.WndProc(ref System.Windows.Forms.Message m = {System.Windows.Forms.Message}) Zeile 748 + 0xb Bytes    C#
        [Externer Code]   
        MediaPortal.UI.dll!MediaPortal.UI.Services.RemovableMedia._DeviceVolumeMonitor.WndProc(ref System.Windows.Forms.Message msg = {System.Windows.Forms.Message}) Zeile 124 + 0xb Bytes    C#
        [Externer Code]   
        MP2-Client.exe!MediaPortal.Client.ApplicationLauncher.Main(string[] args = {string[0]}) Zeile 171 + 0x5 Bytes    C#
        [Externer Code]
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    One patch for Render() method of GraphicsDevice to improve the error handling. Not every exception is a "DeviceLost", and as mentioned in MSDN this occures only on driver hangs and errors.

    Proposed change is:
    Code:
    catch (Direct3D9Exception e)
          {
            DeviceState state = _device.CheckDeviceState(_setup.RenderTarget.Handle);
            _deviceLost = state != DeviceState.Ok;
            ServiceRegistration.Get<ILogger>().Warn("GraphicsDevice: DeviceState: {0}", state);
            ServiceRegistration.Get<ILogger>().Warn("GraphicsDevice: DirectX Exception, DeviceLost: {0}", e, _deviceLost);
            return _deviceLost;
          }

    This keeps the GUI rendering even in the 1st error case above (INVALID_CALL), but the 2nd (AccessViolation) is not, because it's unhandled when invoked from MainForm.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    There are two patches that seem to fix both issue :)

    first one adds logging to FontAssetCore when acessing Texture and FT (freetype6 wrapper) calls. I only put lock into few places for testing and this already seems to work. More places should be further checked maybe.

    2nd path updates our used dll's to new version. after changing them the AccessViolation is gone (hopefully). Source is the "all-in-one" package from http://www.gtk.org/download/win32.php
     

    Attachments

    • 0001-Locking-in-FontAssetCore.cs.patch
      9.4 KB
    • 0002-Freetype-update-seems-to-fix-AccessViolation.patch
      872.4 KB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Just to follow up the other report here: https://forum.team-mediaportal.com/threads/anti-aliasing-branch-issue.105865/

    When I have both patches above applied and am playing video, I cannot switch from AA "None" to any AA mode (2,4,8...), the GUI hangs than. I think the AA switching could be related to the FontAssetCore as well. My locking is not right, because now it seems to deadlock.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Summary for the found problems:
    • switching fullscreen/windowed while playing --> fixed by adding locks to FontAssetCore
    • the locking is correct, there is no deadlock. my issue came from test changes (AA settings called ReCreateDevice, which hangs, but Reset is ok!)
    • updating the FreeType lib is not required and should be skipped
    • improved exception handling, corrected "device lost" state handling
    • refactored VideoPlayer release/reallocate code
    • new workaround for "AA None" to any "AA enabled" mode
    I've pushed changes to AA branch, please check if they work also for you :)
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Many thanks Morpheus, I'll check all that tomorow evening, as I'm currently away from home.

    Cheers.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Hey guys,

    I must admit that I didn't have the time to reproduce the original error. But I just tested as described by Yohann above with the current AA-Branch and there's no error for me.

    I tried playing videos and watching tv - both single and pip, tv as sd and hd. I changed many times between windowed and fullscreen and I didn't get a single error or lock-up.

    So whatever the error was, for me it seems to be solved.

    Thanks, Morpheus!
    Michael

    ---

    Well, spoken too soon... Indeed there are errors in the logs, but the behaviour of MP2-client was for me without an error - I just didn't notice anything being wrong... Logs attached
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Well, no more black screen nor errors in logs.

    Just a little problem : when switching from window to fullscreen with AA enabled (8 samples only btw), the video lags for a few seconds, then speed up to synchronize the sound track, and then plays at normal speed once synchronized.

    Can be related to my GPU...
     

    Users who are viewing this thread

    Top Bottom