Custom Data Grabber including Sky UK Channel/EPG Grabber (3 Viewers)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I was wondering the same...Does it check to see if the graph has been disposed of first, or blindly try and dispose of it?
    Looks maybe like a threading issue.
    PS is listening for events. It sees the WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE) and starts a thread to stop playback and clean up the graph ("PS: Player is playing, kick off stop player thread"). Then it receives another of the same events while the other thread is still running. It starts another thread which throws the exception because the first thread has already [partially] done the job. That is my best guess... :)
     

    richardc1983

    Portal Pro
    October 10, 2012
    251
    24
    Leeds
    Home Country
    United Kingdom United Kingdom
    Hi there,

    I am not sure about your other issue, I will try and look into it.

    As for the WOL command, I believe it is only sent when MePo starts (although there were rumours to change this behaviour) - I am out of the loop of developments at the moment :(

    J.

    Sometimes it works if the server has only been put to sleep a couple of minutes and one of the clients resumes... otherwise it only seems to work if I close MP and then reopen it.

    I wish they would bring back the restart on resume feature it was flawless. They dont seem to be able to fix these issues with resume from sleep.[DOUBLEPOST=1385161327][/DOUBLEPOST]
    Looks maybe like a threading issue.
    PS is listening for events. It sees the WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE) and starts a thread to stop playback and clean up the graph ("PS: Player is playing, kick off stop player thread"). Then it receives another of the same events while the other thread is still running. It starts another thread which throws the exception because the first thread has already [partially] done the job. That is my best guess... :)

    Are we referring to the reason why MP crashes on resume here or the tuning issue?

    Tonight I changed a setting in the resume settings of MP config "stop playback on removal of an audio renderer" and the crashes have reduced. However now sometimes it is completely frozen when it resumes rather than crashing.

    How can powerscheduler be fixed if it is a threading issue?

    Not sure what can be done really. DJblue needs to comment I guess as its his build. The tuning issue is the main concern.
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    I was wondering the same...Does it check to see if the graph has been disposed of first, or blindly try and dispose of it?
    Looks maybe like a threading issue.
    PS is listening for events. It sees the WM_POWERBROADCAST (PBT_POWERSETTINGCHANGE) and starts a thread to stop playback and clean up the graph ("PS: Player is playing, kick off stop player thread"). Then it receives another of the same events while the other thread is still running. It starts another thread which throws the exception because the first thread has already [partially] done the job. That is my best guess... :)
    Your guess is correct - PS gets the "enter away mode" event twice and thus tries to stop the player twice.
    What I do not understand: PS does not blindly stop the player - it checks for the player being playing before starting the stop thread and once again before calling the g_player.Stop() method. So we have a "I cannot query the player whether it is really stopped or is in the process of beeing stopped" issue here, which ofc might not get fixed easily. I wonder if it arises also with other threads / plugins trying to stop the player.
    But since it is quite easy to prevent double processing of the "away mode" events, I will provide a workaround fix for PS.

    Michael
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Yeah, I guess the player only sets its state to "stopped" at the end of stopping. Thanks. :)
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    I found the cause of the problem:
    The PBT_POWERSETTINGCHANGE event (e.g. indicating "enter away mode") is sent twice, since both the MP core and PowerScheduler register for it. This is an unlucky cooincidence of a rework in MediaPortal.Application\MediaPortal.cs (which is registering the event since 1.5 pre-release) and the integration of PowerScheduler (which is registering the event since its beginnings because it was not handled by MP so far...). One effect of this is that PowerScheduler tries to stop the player twice...

    I already provided a fix which removes the registering for the PBT_POWERSETTINGCHANGE event from the PowerScheduler code (JIRA issue MP1-4302).

    Michael
     

    Benoire

    MP Donator
  • Premium Supporter
  • March 17, 2012
    679
    161
    44
    Auckland
    Home Country
    New Zealand New Zealand
    Morning fellas,

    As I'm using this mod I need to ask this here.

    How is MP set to deal with programs that overrun their timeslot? For example, it was qualifying at interlagos and it was raining. The qualifying schedule was pushed out due to heavy rain. From what I can tell, MP recorded the original set length but I know from experience Sky automatically extend the program if it overruns (I know this happened as there was no outro to the program it just simply stopped).

    Is MP able to continuously check the scheduled programs against the data being sent when recording and only activate the post record length once that PID I presume(?) has stopped transmitting? I guess I'm talking about a similar function to that old school PDC+ on VCRs that allowed the recording to extend as long as the program was running from the provider.

    In this instance, MP did not extend (despite a 7 minute post schedule record) and therefore missed the final 7 minutes of quali this morning and simply stopped without the standard end of program gumf that BBC do for their qualifying sessions.

    @DJBlu - if you get the chance, when you sort out the FTA issues for the NZ plugin can you also set the default transponder to Horizontal polarity as the latest version is set to vertical.

    Many thanks,

    Chris
     

    bob808

    MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    Home Country
    United Kingdom United Kingdom
    I have a bit of an odd problem with 1.5 and the latest sky grabber - I am missing some of my tuners in the plugin.

    Mediaportal sees them ok, but they don't show to map tinings against.

    I have 2 tbs 6981 cards, but the latest plugin doesn't show all 4 tuners, older versions did. Any suggestions??
     

    Users who are viewing this thread

    Top Bottom