Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
"The specified procedure could not be found" with MCR shared library

Subject: "The specified procedure could not be found" with MCR shared library

From: JoshD

Date: 30 Jan, 2013 20:05:44

Message: 1 of 2

I have an application for which I've created several plugins, all which load a shared library built using the MATLAB Compiler. This has worked fine for some time, however suddenly I've started getting an error:

An Error has occurred while trying to initialize the MCR.
The error is: Fatal error loading library C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v717\bin\win32\mclmcr.dll Error: The specified procedure could not be found.

To my knowledge I haven't changed anything that would have broken this, and this only happens on my development machine, it works fine on a test machine.

I've run Dependency Walker, and there's no indication of any missing procedures. I've tried uninstalling and reinstalling the MCR. This occurs right after stepping into mclInitializeApplication. Any ideas?

Thanks,
-Josh

Subject: "The specified procedure could not be found" with MCR shared library

From: JoshD

Date: 5 Feb, 2013 21:41:47

Message: 2 of 2

On Wednesday, January 30, 2013 3:05:44 PM UTC-5, JoshD wrote:
> I have an application for which I've created several plugins, all which load a shared library built using the MATLAB Compiler. This has worked fine for some time, however suddenly I've started getting an error:
>
> An Error has occurred while trying to initialize the MCR.
>
> The error is: Fatal error loading library C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v717\bin\win32\mclmcr.dll Error: The specified procedure could not be found.
>
> To my knowledge I haven't changed anything that would have broken this, and this only happens on my development machine, it works fine on a test machine.
>
> I've run Dependency Walker, and there's no indication of any missing procedures. I've tried uninstalling and reinstalling the MCR. This occurs right after stepping into mclInitializeApplication. Any ideas?

Finally figured out the problem. The issue arose after I wrote a new plugin for GStreamer to capture from the National Instruments IMAQdx library; remove the plugin and everything was fine again.

So I initialize GStreamer first, which scans and loads all plugins, including my plugin, which then depends on niimaqdx.dll, which depended on tbb.dll (Threading Building Blocks), which it loaded from C:\windows\syswow64\tbb.dll, at version 2. So when it got to loading my plugin which utilized the MCR, it loaded a bunch of DLLs including boost_serialization-vc90-mt-1_44.dll, which also uses TBB, but calls a procedure not located in version 2. MATLAB does include a tbb.dll in the bin directory, which was version 3, but "tbb.dll" was already loaded so it used that. A simple copy of the newer version to syswow64 fixed the problem, at least for now, but I won't be surprised if I have other conflicts in the future.

Hope this helps someone else. The key was to profile the app in Dependency Walker, with and without the offending plugin, and see what is loaded after the last successful load.

-Josh

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us