"RSI license file exists but is invalid"

We’ve upgraded to INtime v7 (a test environment for new computer hardware) and I’m running into trouble using RMP in my application.

When I attempt to instantiate the MotionController object (via RSI::RapidCode::MotionController::CreateFromSoftware(const char* const)), RMP complains:

Error creating RMP motion controller : {RSI Error} ErrorNumber(5141)(RSIPlatformMessageRSI_LICENSE_INVALID)
Line(401)
Function(MotionController::InitControl)
Warning?(No)
Text(Win32 RMP: RSI license file exists but is invalid :: {platformOS.c, line 2389} : License file invalid for this serial number C:\MyAppDir\MotionControllers\RapidPath\Runtime\RSI\rsi.lic : Contact RSI with serial #: 0 (0x0) (Error 5141) (MotionController::InitControl) (Object 0) (File motioncontroller.cpp) (Line 401) (Version 10.4.3.0))
ShortText()

Curiously, I have a simple C++ program that, when I run it, does NOT experience that problem.

// cl /EHsc /Zi /I%RSI_DIR%\include poc.cpp /link /LIBPATH:%RSI_DIR%\lib\x86 RapidCode.lib

#include "rsi.h"
#include <string>
#include <iostream>
#include <exception>

#define APP_DIR "C:\\MyAppDir"
#define RSI_DIR  APP_DIR ## "\\MotionControllers\\RapidPath\\Runtime\\RSI"

#define TEST_ARG "C:\\MyAppDir\\MotionControllers/RapidPath/Runtime/RSI/"

void ErrorCheck( RSI::RapidCode::RapidCodeObject* obj ) {
  auto err_count = obj->ErrorLogCountGet();
  if (err_count > 0) {
    std::cerr << "  Errors: " << err_count << "\n";
    auto err = obj->ErrorLogGet();
    std::cerr <<
      "        Number: " << static_cast<int32_t>(err->number) << "\n"
      "    Short Text: " << err->shortText << "\n"
      "          Text: " << err->text << "\n"
      "  Object Index: " << err->objectIndex << "\n"
      "     isWarning: " << err->isWarning << "\n"
      "  functionName: " << err->functionName << "\n"
      "      fileName: " << err->fileName << "\n"
      "    lineNumber: " << err->lineNumber << "\n"
      ;
  }
}

int main( int argc, const char** argv ) {
  try {
    std::cout << "Arg: '" << TEST_ARG << "'\n";
    auto mc = RSI::RapidCode::MotionController::CreateFromSoftware(TEST_ARG);
    std::cout << "MC: " << mc << "\n";
    std::cout <<
      "  RMP Version       : " << mc->VersionGet() << "\n"
      "  RMP Serial Number : " << mc->SerialNumberGet() << "\n"
      ;
    ErrorCheck(mc);

    return 0;
  }
  catch (const std::exception& e) {
    std::cerr << "Exception: " << e.what() << "\n"
      ;
    return 1;
  }
}

When I run it, I get this output

Arg: ‘C:\MyAppDir\MotionControllers/RapidPath/Runtime/RSI/’
MC: 011C4308
RMP Version : 10.4.3.0
RMP Serial Number : 13738

(no errors)

We recently upgrade from 10.3.8 to 10.4.3. My application has been built against 10.4.3. It’s a 32-bit app.
I’m not sure what I might be doing wrong. Do you have any ideas?

I wrote a similar Python script to test the behavior, and my Python interface fails the way my application does. I have not yet gotten the example to work with your Python interface. It keeps complaining about not being able to load some DLL dependency of _RapidCode(.pyd).

Hi Todd,

I believe the issue is related to INtimeLicenseLibrary.dll. You want to use the one from #.#.#/x86/IntimeLicenseLibrary.dll rather than the one in the INtime folder. We had to get a fix from them which we distribute. Try replacing the located in the %intime%\bin folder the one we include. Let me know if that doesn’t work for you.

Is this an issue with v7?
Are they planning to fix something, or should I expect always to use the DLL you distribute?

Hi Todd,

Its an issue with several of their releases. I do hope they fix it. I would expect that at some point in the future. For now, we including a working option for when you see the error.