Application Compiler One or More feature 'MRC' resulted in Error
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes
I am getting error when I compile the my code for Application Compiler ( Standalone )
Below is my code . It runs fine but throws error when i run the MRC *.exe. Below is my code
I get the error string for "Content = fetchOutputs(Content); ". I have added picture for the error message.
Accepted Answer
When I copy your code into an m file, I instantly see an error at this line. I assume you're getting that error, too.
function WorkingDir = getcurrentdir

If you are treating this file as a function file, either all or none of the functions must end with an end. However, it seems that startupfcn() is the main function and the other functions are nested. In that case, none of the functions need an end.
For more info on function files, local functions, and nested function, https://www.mathworks.com/help/matlab/matlab_prog/types-of-functions.html
Additionally, the function getcurrentdir() probably should have an underscore to match the function call. get_currentdir().
10 Comments
Guillaume
on 16 Dec 2019
Actually, the end keyword is optional for functions (in my opinion, it's a bad coding style). GUIDE generates code without function end. However, if one function in a file has an end, then all functions must have an end.
Adam Danz
on 16 Dec 2019
Life is Wonderful
on 17 Dec 2019
Edited: Life is Wonderful
on 17 Dec 2019
Thanks a lot for the feedback and help
When I copy your code into an m file, I instantly see an error at this line. I assume you're getting that error, too.
The problem was in input while adding the question ( my mistake)
Please find the attachment . Attachment has 3 folder
1 Input : containing result data files. Provide the path to the result folder if we run the code from the matlab editor ( F5)
2 mfile : contains mfile to analyze the result file.
3 Standalone_app: contain *.mlapp file for gui control
Problem : start the startupfcn.exe and locate the folder /../../MathWorks/input/
- select the folder test_that_results_hatch_S2V2DS
- Please see the error- screen shot added in the folder
The goal is to generate successful distribution
- for_testing
- for_redistribution_files_only
- for_redistribution
I am facing issue when startupfcn.exe is executed (generated from the standalone compiler)
I don't see "Content" is passed to the function get_fieldnames(Content) as an input argument because Content was NOT return successfully from the get_test_that() which was called from get_Searchforfile.
When I run your code from matlab (not from an exe) I do not get that error (copied from your zip file, below).

In get_Searchforfile(), the output Content is only defined if at least one of the many conditionals are met. On possibility is that Content is never defined because the inputs never meet any of the conditional requirements. To investigate what set of inputs may lead to this problem, you could do the following.
- Toward the top of get_Searchforfile, initialize Content as empty: Content = [];
- At the end of get_Searchforfile, add the following conditional that will print the inputs if Content is not defined.
if isempty(Content)
% This will pass the 2 inputs to the base workspace
% where you can explore the inputs.
assignin('base','Param_Target',Param_Target)
assignin('base','Files',Files)
error('Aborted')
end
Life is Wonderful
on 18 Dec 2019
Thanks Adam!!
I think the problem is with
function WorkingDir = get_currentdir()
if isdeployed % Stand-alone mode.
% [status, result] = system('path');
[result] = uigetdir();
sprintf('Your folder is %s', result);
WorkingDir = char(regexpi(result, 'Path=(.*?);', 'tokens', 'once'));
else % MATLAB mode.
WorkingDir = uigetdir();
end
When startupfcn.exe is executed the uigetdir() directory does not work any more...
What i see the Copyfile folder is generated in the "for_testing" i.e. it' self generated ( This is unexpected )where it is collecting the Renamefile .
Copyfile is the folder is expected to be generated at Result folder "test_that_results_hatch_S2V2DS"
Can you please give me the right implementation when Standalone Compiler is used to generate the *.exe.
Thank you!!
Adam Danz
on 18 Dec 2019
What releasse of matlab are you using? There was a bug with uigetdir() in r2018a prior to update #4
Make sure you're using full paths
Lastly, see point #2 in this list
Life is Wonderful
on 18 Dec 2019
Edited: Life is Wonderful
on 18 Dec 2019
Mine is R2019b..
I will try.Thank you!!
Life is Wonderful
on 18 Dec 2019
I just place uigetdir.m in the same directory as the main file. It works great!!
Super help. Thanks a lot Adam.
Adam Danz
on 18 Dec 2019
High five!
Life is Wonderful
on 19 Dec 2019
Hi Adam,
Can you please help me for the below issue as described in the link
Thanks a lot.
More Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
See Also
on 16 Dec 2019
on 25 Dec 2019
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)