[fixed] deploy tool crashes on mpaudioswitcher.ax (1 Viewer)

asselin

MP Donator
  • Premium Supporter
  • May 29, 2010
    9
    11
    Home Country
    United States of America United States of America
    OK, so the call to
    Code:
    AMovieDllRegisterServer2(TRUE)
    is crashing. I'm going to take a leap and guess that the extra entry in the AMOVIESETUP_FILTER structure is mucking things up:

    line 59
    Code:
    {&__uuidof(CAudioSwitcherFilter), L"MediaPortal AudioSwitcher", MERIT_DO_NOT_USE, countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory}

    In the MS SDK doc, the structure doesn't take a final class ID, but interestingly, just removing that extra member doesn't work because mpaudioswitcher is pulling in a set of DirectShow header files that are local to MediaPortal (from mediaportal\Core.cpp\mpc-hc_subs\src\BaseClasses). And in that directory is a combase.h file with a definition of AMOVIESETUP_FILTER in it with the offending extra member. So I also had to remove "..\..\mediaportal\Core.cpp\mpc-hc_subs\src\BaseClasses" from the INCLUDEs and substitute $(DSHOW_BASE). Anybody know why MediaPortal has this local copy of the DirectShow headers?

    I'm guessing the 2 conflicting definitions of AMOVIESETUP_FILTER are causing the problem and perhaps it's causing the DLL initialization code that is filling in the last member to either clobber something, or overwrite memory that in some cases isn't allocated.

    Giant hypothesis there, but it's a bug that should be fixed anyway even if it's not what's causing the crash. :)

    Attached is a new build with that bug fixed to try out.
     

    Attachments

    • MPAudioSwitcher with struct fix.zip
      60.6 KB

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    So I also had to remove "..\..\mediaportal\Core.cpp\mpc-hc_subs\src\BaseClasses" from the INCLUDEs and substitute $(DSHOW_BASE). Anybody know why MediaPortal has this local copy of the DirectShow headers?

    Audio Switcher filter is mostly MPC-HC component - and it requires own baseclasses. Not sure if that dependency could be easialy removed.
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    57
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    MPAudioSwitcher with struct fix.zip also fails to register with the same access violation message.

    Here's the log...

    14-04-2004 00:12:30.578 [2d8]initinst 1
    14-04-2004 00:12:30.578 [2d8]initinst 2
    14-04-2004 00:12:30.578 [2d8]initinst 3
    14-04-2004 00:12:30.578 [2d8]initinst 4
    14-04-2004 00:12:30.578 [2d8]register 1
    14-04-2004 00:12:31.500 [2d8]exitinst 1
    14-04-2004 00:12:31.500 [2d8]exitinst 2
    14-04-2004 00:12:31.500 [2d8]exitinst 3

    Could you build a debug version of this and see if we can catch a crash?
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi, this is the debug version, just removing this extra CLSID_LegacyAmFilterCategory and based on $(DSHOW_BASE) like asselin.
    Can you try all this version ?
    On my side :
    MPAudioSwitcher_Release_Normal.rar : Original source (just rebuild it)
    MPAudioSwitcher_Debug.rar : i didn't get error and with the remove (CLSID_LegacyAmFilterCategory), register is ok but filter is not available.
    AudioSwitcher_MPC_HC.rar : Original MPC-HC source, to see if this one is ok.
    Thanks.
     

    frankteb

    MP Donator
  • Premium Supporter
  • April 5, 2005
    1,118
    92
    Home Country
    Germany Germany
    AW: deploy tool crashes on mpaudioswitcher.ax

    MPAudioSwitcher_Release_Normal: didn't register
    MPAudioSwitcher_Debug: works
    AudioSwitcher_MPC_HC: works
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Re: AW: deploy tool crashes on mpaudioswitcher.ax

    MPAudioSwitcher_Release_Normal: didn't register
    MPAudioSwitcher_Debug: works
    AudioSwitcher_MPC_HC: works

    Nice :)

    On my side in the debug version, with graphstudio or other soft to list filter, we didn't get it.
    Can you look on your side ? Also with AudioSwitcher_MPC_HC ?
    Will try to look what is the diff between MPC-HC source and own.
    Thanks in advance :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi,

    I have try to merge source from MPC-HC :
    This is the release, can you try and see if it's works ?
    Thanks,
    Seb.

    Edit : New version, missing line for TV.
     

    frankteb

    MP Donator
  • Premium Supporter
  • April 5, 2005
    1,118
    92
    Home Country
    Germany Germany
    AW: deploy tool crashes on mpaudioswitcher.ax

    On my side in the debug version, with graphstudio or other soft to list filter, we didn't get it.
    Can you look on your side ? Also with AudioSwitcher_MPC_HC ?
    Will try to look what is the diff between MPC-HC source and own.

    What do you exactly mean?

    I have try to merge source from MPC-HC :
    This is the release, can you try and see if it's works ?

    MPAS_Release_merge_MPC-HC_v3: I didn't get any message when I try to register. So I don't know if the registration was successfully.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Re: AW: deploy tool crashes on mpaudioswitcher.ax

    On my side in the debug version, with graphstudio or other soft to list filter, we didn't get it.
    Can you look on your side ? Also with AudioSwitcher_MPC_HC ?
    Will try to look what is the diff between MPC-HC source and own.

    What do you exactly mean?

    I have try to merge source from MPC-HC :
    This is the release, can you try and see if it's works ?

    MPAS_Release_merge_MPC-HC_v3: I didn't get any message when I try to register. So I don't know if the registration was successfully.

    That's strange. For me, it registers fine on my Vista machine, and I get the usual dialog to confirm this. I don't know if there is any way to get more information from regsvr32.exe

    You might try unregistering it first, if you system is in a bit of a mess.

    Mark
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Re: AW: deploy tool crashes on mpaudioswitcher.ax

    On my side in the debug version, with graphstudio or other soft to list filter, we didn't get it.
    Can you look on your side ? Also with AudioSwitcher_MPC_HC ?
    Will try to look what is the diff between MPC-HC source and own.

    What do you exactly mean?

    I have try to merge source from MPC-HC :
    This is the release, can you try and see if it's works ?

    MPAS_Release_merge_MPC-HC_v3: I didn't get any message when I try to register. So I don't know if the registration was successfully.

    That's strange. For me, it registers fine on my Vista machine, and I get the usual dialog to confirm this. I don't know if there is any way to get more information from regsvr32.exe

    You might try unregistering it first, if you system is in a bit of a mess.

    Mark

    Hi frankteb and Mark.

    Yes normally we should see a message when register the filter, like Mark said can you unregister it to see if you see something ?

    Sorry for my english, i mean :
    When we register this filter, if we use a soft like graphstudio or graphedit (RadScorpion’s blog » MONOGRAM GraphStudio) and we make ctrl-f, in the list we should see MediaPortal AudioSwitcher, if not filter was not register.

    For me, the debug version show a message (filter register) but it didn't appear in the list.
    After register MPAS_Release_merge_MPC-HC_v3 (we can see a message normally), we should see it in the list :).

    Just to be sure, with original MediaPortal AudioSwitcher, you get a message (like what it can't register) ?.
    Thanks.
     

    Users who are viewing this thread

    Top Bottom