Error g_player & WinampPlugin (1 Viewer)

Messiahs

Portal Pro
December 11, 2008
222
106
Home Country
Germany Germany
quickly fire more then one play command to external music player (winamp):

PHP:
2011-11-26 22:21:37.815413 [ERROR][(21)]: Message:Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2011-11-26 22:21:37.820414 [ERROR][(21)]: StackTrace:   bei MediaPortal.Player.g_Player.Play(String strFile, MediaType type, TextReader chapters) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\Player\g_player.cs:Zeile 1345.
   bei MediaPortal.Player.g_Player.Play(String strFile, MediaType type) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\Player\g_player.cs:Zeile 1190.
   bei MediaPortal.Player.g_Player.Play(String strFile) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\Player\g_player.cs:Zeile 1185.
   bei MediaPortal.Playlists.PlayListPlayer.FakePlayer.MediaPortal.Playlists.PlayListPlayer.IPlayer.Play(String strFile) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\PlayList\PlayListPlayer.cs:Zeile 59.
   bei MediaPortal.Playlists.PlayListPlayer.Play(Int32 iSong, Boolean setFullScreenVideo) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\PlayList\PlayListPlayer.cs:Zeile 548.
   bei MediaPortal.Playlists.PlayListPlayer.Play(Int32 iSong) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\PlayList\PlayListPlayer.cs:Zeile 480.
   bei xpTunes.MediaPortal.ProcessPlugins.xpTunes.mpPlayer.playById(requestHeader headerTmp) in F:\Daten\Source\vbNet\mpTunes\mpTunes\shared\mpPlayer.vb:Zeile 278.
2011-11-26 22:21:44.099773 [ERROR][MPMain(8)]: Exception   :System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei MediaPortal.Player.g_Player.Process() in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\Player\g_player.cs:Zeile 2089.
   bei MediaPortalApp.OnProcess() in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\MediaPortal.Application\MediaPortal.cs:Zeile 2106.
   bei MediaPortal.D3DApp.Application_Idle(Object sender, EventArgs e) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\MediaPortal.Application\d3dapp.cs:Zeile 2798.
   bei System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.Run(Form mainForm)

Solution:
class g_player.cs
PHP:
   [MethodImpl(MethodImplOptions.Synchronized)] <- added
    public static bool Play(string strFile, MediaType type, TextReader chapters)
    {

next error:
PHP:
2011-11-26 22:44:52.462747 [ERROR][MPMain(8)]: Exception   :System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei MediaPortal.Player.g_Player.Process() in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\Core\Player\g_player.cs:Zeile 2089.
   bei MediaPortalApp.OnProcess() in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\MediaPortal.Application\MediaPortal.cs:Zeile 2106.
   bei MediaPortal.D3DApp.Application_Idle(Object sender, EventArgs e) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\MediaPortal.Application\d3dapp.cs:Zeile 2798.
   bei System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.Run(Form mainForm)
   bei MediaPortalApp.Main(String[] args) in F:\Daten\Source\MediaPortal\svn\trunk\mediaportal\MediaPortal.Application\MediaPortal.cs:Zeile 620.

Solution:
class g_player.cs
PHP:
    public static void Process()
    {
 ...
      try { <- added, cause after _player.Process()  _player can be null
          _player.Process();
          if (_player.Initializing)
          {
              return;
          }

------------------------------------

WinampPlugin.cs
Code:
PHP:
public override void Dispose()
    {
            m_winampController.Dispose();
    }

should be changed to:
PHP:
public override void Dispose()
    {
        if (m_winampController != null)
        {
            m_winampController.Dispose();
         }  
    }
 

Users who are viewing this thread

Top Bottom