Author Topic: [3.8.4] XMPlay crashes with AccessViolation when starting with xmp-apx plug-in  (Read 843 times)


  • Posts: 4
Not sure if 3.8.3 or 3.8.4 is where this started.  I have tested with and no problems.  When starting the player, shortly after requesting output interface from plug-in (xmp-apx), there is an access violation reading 0x00000001.  If I remove xmp-apx.dll there is no issue starting.  I do not have symbols for xmplay.exe so I can't say much more.

I tried updating the xmpout.h and xmpfunc.h from the SDK.  I saw only minor changes for 3.8.2 in xmpfunc.h, but applied them nonetheless.  No difference before or after.

I set breakpoints in each of my interface callbacks and did not see any additional calls.  I don't know if my callback interface is supposed to have a new function pointer at the end or what exactly.

All this code runs normally and shortly after returning the XMPOUT pointer from this function, XMPlay tries to access a nullptr:

extern "C" __declspec(dllexport) XMPOUT* XMPOUT_GetInterface(DWORD face,
   InterfaceProc faceproc)
   if (face == 0)
      Debugger::print("Player requesting plug-in interface...");

      // initialize output interface singleton
      static XMPOUT out = {
         0,         // flags
         "Devices", // label
         nullptr, // getGeneralInfo

      if (player == nullptr)
         // initialize player interface singleton
         player.reset(new XMPlayPlayer(
            (XMPFUNC_MISC*) faceproc(XMPFUNC_MISC_FACE),
            (XMPFUNC_STATUS*) faceproc(XMPFUNC_STATUS_FACE)));

         // initialize plug-in options file path
         CHAR pathBuffer[MAX_PATH];
         if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, pathBuffer)))
            SHCreateDirectoryExA(NULL, iniFilePath.c_str(), NULL);
            DWORD pathLength = GetModuleFileNameA(dllInstance, pathBuffer, MAX_PATH);
            if (pathLength > 0 && pathLength <= MAX_PATH)
               const std::string pathString(pathBuffer, pathLength);
               const auto pos = pathString.find_last_of('\\');
               if (pos != std::string::npos)
                  iniFilePath.assign(pathString.substr(0, pos + 1));

         // load plug-in options from file

      return &out;

   return nullptr;

Ian @ un4seen

  • Administrator
  • Posts: 23563
That looks like you may not be using the WINAPI (stdcall) calling convention? All of the plugin's exported functions, including the XMPOUT_GetInterface function, should be using WINAPI. If the problem persists even then, please upload a dump file from the crash to have a look at here:


  • Posts: 4
All interface functions are using WINAPI (aka __stdcall).  Nothing has changed there.

One note, I update the xmp-coverart.svp to v8 and was able to start with no issue.  I'm not sure how/why xmp-apx.dll and xmp-coverart.svp are interacting.

Ian @ un4seen

  • Administrator
  • Posts: 23563
Make sure the XMPOUT_GetInterface function is using WINAPI/stdcall too (it doesn't appear to be in the code above).