- Banned
- #1
Hi Developers,
this is actually not a new issue but one that I have finally been able to reproduce.
The problem is that with two Technotrend S2-3200 cards "sometimes" the building of the graph on the TvServer fails on the second card.
The exceptions that is thrown is
This also has been reported in several threads here under different circumstances.
It often happened when the EPG grapper did the first access on the second card. But not in all cases which made it hard to track down.
The problems root is in the method
TvCardDvbBase.AddTsWriterFilterToGraph()
after calling
_graphBuilder.AddFilter(_filterTsWriter, filtername);
the COM object MpTsAnalyzer is "sometimes" broken and any method call on this object yields a NOINTERFACE exceptions. I can also not be "wired" anymore in the graph.
Now with the latest SVN 20143 and the preload option it can reliably be reproduced in the original MediaPortal code (my code is quite different).
If you enable preload on both Technotrend S2 3200 cards or only on the card with the higher DevicePath you get the exception when you start the TVServer
it is the same problem, after the AddFilter call the TsWriter object is "broken" and the following connects on the filter pins fail and then the COM call in Decompose fails with the NOINTERFACE.
The strange thing is, that it works if you ONLY init the card with the lower DevicePath (lower PCI number) and leave the other card set to no preload.
Starting now a timeshift or EPG on either of the two cards with a client (MP or SetupTV) works fine.
But if you try to init (prelaod) both cards or the card with the higher DevicePath you get the exception.
So it is not just the order of initialization and its not a timing issue (I tested a sleep for 10 secs before trying to intialize the second card, no luck).
Any ideas?
BTW: I also changed the way the TT library is used in the TsWriter to link it to the DLL instead of dynamically loading it, makes no difference. I did not manage to link statically yet.
this is actually not a new issue but one that I have finally been able to reproduce.
The problem is that with two Technotrend S2-3200 cards "sometimes" the building of the graph on the TvServer fails on the second card.
The exceptions that is thrown is
Code:
2008-09-04 10:26:15.815000 [8]: Exception :System.InvalidCastException: Das COM-Objekt des Typs "MpTsAnalyzer" kann nicht in den Schnittstellentyp
"TvLibrary.Interfaces.Analyzer.ITechnoTrend" umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der QueryInterface-Aufruf an die COM-Komponente für die
Schnittstelle mit der IID "{B0AB5587-DCEC-49F4-B1AA-06EF58DBF1D3}" aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Schnittstelle nicht unterstützt (Ausnahme von
HRESULT: 0x80004002 (E_NOINTERFACE)).
bei TvLibrary.Interfaces.Analyzer.ITechnoTrend.IsTechnoTrend(Boolean& yesNo)
bei TvLibrary.Implementations.DVB.TechnoTrend.get_IsTechnoTrend() in
M:\TVEngine3Source\TVLibrary\TVLibrary\Implementations\DVB\ConditionalAccess\TechnoTrend\TechnoTrend.cs:Zeile 88.
bei TvLibrary.Implementations.DVB.ConditionalAccess..ctor(IBaseFilter tunerFilter, IBaseFilter analyzerFilter, IBaseFilter winTvUsbCiFilter, TvCardDvbBase card, Boolean useCAM)
in M:\TVEngine3Source\TVLibrary\TVLibrary\Implementations\DVB\ConditionalAccess\ConditionalAccess.cs:Zeile 112.
This also has been reported in several threads here under different circumstances.
It often happened when the EPG grapper did the first access on the second card. But not in all cases which made it hard to track down.
The problems root is in the method
TvCardDvbBase.AddTsWriterFilterToGraph()
after calling
_graphBuilder.AddFilter(_filterTsWriter, filtername);
the COM object MpTsAnalyzer is "sometimes" broken and any method call on this object yields a NOINTERFACE exceptions. I can also not be "wired" anymore in the graph.
Now with the latest SVN 20143 and the preload option it can reliably be reproduced in the original MediaPortal code (my code is quite different).
If you enable preload on both Technotrend S2 3200 cards or only on the card with the higher DevicePath you get the exception when you start the TVServer
Code:
2008-09-11 12:06:03.316800 [TVService]: Exception :TvLibrary.TvException: Unable to start graph
bei TvLibrary.Implementations.DVB.TvCardDVBS.BuildGraph()
bei TvService.TVController.InitController()
Exception :Unable to start graph
site :Void RunGraph(Int32)
source :TVLibrary
stacktrace: bei TvLibrary.Implementations.DVB.TvCardDVBS.BuildGraph()
bei TvService.TVController.InitController()
2008-09-11 12:06:06.764400 [TVService]: Exception :System.InvalidCastException: Das Objekt des Typs MpTsAnalyzer kann nicht in Typ DirectShowLib.IBaseFilter umgewandelt werden.
bei DirectShowLib.IEnumFilters.Next(Int32 cFilters, IBaseFilter[] ppFilter, Int32& pcFetched)
bei TvLibrary.Implementations.DVB.FilterGraphTools.RemoveAllFilters(IGraphBuilder graphBuilder)
bei TvLibrary.Implementations.DVB.TvCardDvbBase.Decompose()
bei TvLibrary.Implementations.DVB.TvCardDvbBase.Dispose()
bei TvLibrary.Implementations.DVB.TvCardDVBS.BuildGraph()
bei TvService.TVController.InitController()
Exception :Das Objekt des Typs MpTsAnalyzer kann nicht in Typ DirectShowLib.IBaseFilter umgewandelt werden.
site :Int32 Next(Int32, DirectShowLib.IBaseFilter[], Int32 ByRef)
source :DirectShowLib
stacktrace: bei DirectShowLib.IEnumFilters.Next(Int32 cFilters, IBaseFilter[] ppFilter, Int32& pcFetched)
bei TvLibrary.Implementations.DVB.FilterGraphTools.RemoveAllFilters(IGraphBuilder graphBuilder)
bei TvLibrary.Implementations.DVB.TvCardDvbBase.Decompose()
bei TvLibrary.Implementations.DVB.TvCardDvbBase.Dispose()
bei TvLibrary.Implementations.DVB.TvCardDVBS.BuildGraph()
bei TvService.TVController.InitController()
it is the same problem, after the AddFilter call the TsWriter object is "broken" and the following connects on the filter pins fail and then the COM call in Decompose fails with the NOINTERFACE.
The strange thing is, that it works if you ONLY init the card with the lower DevicePath (lower PCI number) and leave the other card set to no preload.
Starting now a timeshift or EPG on either of the two cards with a client (MP or SetupTV) works fine.
But if you try to init (prelaod) both cards or the card with the higher DevicePath you get the exception.
So it is not just the order of initialization and its not a timing issue (I tested a sleep for 10 secs before trying to intialize the second card, no luck).
Any ideas?
BTW: I also changed the way the TT library is used in the TsWriter to link it to the DLL instead of dynamically loading it, makes no difference. I did not manage to link statically yet.