Application Compiler Fail "Update resource failed: 110" and "No Installer Package Created"

Hello,
I'm having trouble compiling a very simple application. I've attached the class and project in the attached zip file. I'm using the Application Compiler GUI not command line tools to compile. I've tried on both 2019a 64-bit and 2015b 32-bit, which I've used successfully many times in the past.
In 2019a, the failure log is
mcc -o untitled -W WinMain:untitled -T link:exe -d 'C:\Users\reavemt1\Desktop\New folder\untitled\for_testing' -v 'C:\Users\reavemt1\Desktop\New folder\untitled.m' -r 'C:\Program Files\MATLAB\R2019a\toolbox\compiler\Resources\default_icon.ico'
Compiler version: 7.0.1 (R2019a)
Dependency analysis by REQUIREMENTS.
Parsing file "C:\Users\reavemt1\Desktop\New folder\untitled.m"
(referenced from command line).
Generating file "C:\Users\reavemt1\Desktop\New folder\untitled\for_testing\readme.txt".
Packaging...
Creating the bundle...
Creating the install agent URL file...
Failed to embed unzip in your application.
Update resource failed: 110
Failed to create the web based installer.
No installer package created.
In 2015b, the failure log is
mcc -C -o untitled -W WinMain:untitled -T link:exe -d 'C:\Users\reavemt1\Desktop\New folder\untitled\for_testing' -v 'C:\Users\reavemt1\Desktop\New folder\untitled.m'
Compiler version: 6.1 (R2015b)
Dependency analysis by REQUIREMENTS.
Begin validation of MEX files: Thu Jun 13 10:08:52 2019
End validation of MEX files: Thu Jun 13 10:08:52 2019
[Warning: Adding path "C:\Users\reavemt1\Desktop\New folder" to Compiler path
instance.]
[]
Parsing file "C:\Users\reavemt1\Desktop\New folder\untitled.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\reavemt1\Desktop\New folder\untitled\for_testing\readme.txt".
Packaging...
Adding custom icon C:\Program Files (x86)\MATLAB\R2015b\toolbox\compiler\Resources\default_icon.ico to C:\Users\reavemt1\Desktop\New folder\untitled\for_testing\untitled.exe.
Attempting to embed the CTF archive into the application C:\Users\reavemt1\Desktop\New folder\untitled\for_testing\untitled.exe.
Finished embedding CTF archive. Deleting the external CTF archive.
Creating the bundle...
Failed to embed installer splash screen C:\Program Files (x86)\MATLAB\R2015b\toolbox\compiler\Resources\default_splash.png.
Update resource failed: 110
Attempting to embed default installer splash screen, C:\Program Files (x86)\MATLAB\R2015b\toolbox\compiler\Resources\default_splash.png.
Failed to embed installer splash screen C:\Program Files (x86)\MATLAB\R2015b\toolbox\compiler\Resources\default_splash.png.
Update resource failed: 110
Failed to create the web based installer.
No installer package created.
Note that my PC is Windows 10 Enterprise 64-bit with 32GB of RAM. I should have no memory issues. I've also confirmed that "C:\Program Files (x86)\MATLAB\R2015b\toolbox\compiler\Resources\default_splash.png" exists.

 Accepted Answer

110 error usually indicates the system cannot open the device or file specified.
  1. Do you have any antivirus software running? Can you disable antivirus software and retry?
  2. Can you launch MATLAB with admin right?

6 Comments

Hello Helen,
I'm encountering the exact same problem as described above by Matthew Reaves. I'm trying to deploy in the same kind of setting, to the same kind of user.
I've actually sucessfully created an installer with the same program in the past and now I keep seeing "Update resource failed". I haven't yet been able to package my executable properly using Matlab tools. I tried your two suggestions, it didn't change anything. There are quite a few posts about this, yet no solution provided. I'm currently installing a 64bit version of Matlab to see if memory might be in cause, but again... with doubts as it doesn't work for the web installer either.
What are my options to properly deploy applications using Matlab? From my experience, the applicationCompiler tool does not allow me to package executables.
I've included an example of the error below:
Packaging...
Adding custom icon C:\dtdtools\tools\matlab\v2015b_32bit\toolbox\compiler\Resources\default_icon.ico to C:\BitBucket\EDTAnalysisTool\AnalysisTool_Main\for_testing\AnalysisTool_Main.exe.
Attempting to embed the CTF archive into the application C:\BitBucket\EDTAnalysisTool\AnalysisTool_Main\for_testing\AnalysisTool_Main.exe.
Finished embedding CTF archive. Deleting the external CTF archive.
Creating the bundle...
Failed to embed installer splash screen C:\dtdtools\tools\matlab\v2015b_32bit\toolbox\compiler\Resources\default_splash.png.
Update resource failed: 110
Attempting to embed default installer splash screen, C:\dtdtools\tools\matlab\v2015b_32bit\toolbox\compiler\Resources\default_splash.png.
Failed to embed installer splash screen C:\dtdtools\tools\matlab\v2015b_32bit\toolbox\compiler\Resources\default_splash.png.
Update resource failed: 110
Failed to create the full installer.
No installer package created.
Hi Jerome,
The root cause of this error is that the during the process while MALTAB is creating the installer, which is an exe file, the installer file got locked by another program (anti-virus software, windows defender, etc). So MATLAB couldn't access the file and update it with new resources any more. In your example, it is the splash screen image resource. The problem is sporadic. As it depends on whether the file is locked by another program during the packing process.
If you have already turned off anti-virus software, it might be windows defender. Is your output folder on a network drive? If so, please change it to local machine. As we have found the file is more likely to be locked when it is output to a network drive.
Another workaround is you can generate your application with mcc command and deliver MATLAB runtime separately.
You can use the mcc command generated as the first line in the log file.
Everything is local and the splash file is not locked, i've also modified permissions so that any user can have full control. I do not think that it is an anti-virus problem.
I'm already able to generate a .exe using mcc. However, this does not allow me to create an installer which will handle the installation of the MCR along with the installation of the application.
I would think it's the goal of the application compiler to provide tooling to create such installers. I don't want to re-design something that has already been done (and that we are paying for...).
I didn't mean splash file is locked.
I meant the installer file, by defalt named as MyAppInstaller_web.exe is locked by another program. So when MATLAB was trying to add new resources, which is splash image in your example case, to MyAppInstaller_web.exe, it would fail.
Windows defender is usually on most of the time. Other applications that can potentially lock the file are:antivirus and searchprotocolhost.exe.
SearchProtocolHost.exe is an executable software module from Microsoft. You may see this process running continuously in the background on your task manager processes list. This process provides content indexing, property caching, and search results for files, e-mail, and other content. If you think the issue is caused by searchProtocolHost.exe, run services.msc and disable the Windows Search service.
If you want to diagnose if the file is really being locked and find out which program is locking the file, you could record process monitor log to debug the issue.
Steps on using Process Monitor here:
  1. Download Process Monitor from the following link: https://docs.microsoft.com/en-us/sysinternals/downloads/procmon
  2. Unzip the ProcessMonitor.ZIP archive to a location of your choice.
  3. Open up MATLAB.
  4. Close all other applications.
  5. Click on Procmon.EXE in the unzipped location.
  6. On the top left, go to File -> Uncheck "Capture Events" (see CaptureEvents.PNG)
  7. Go to Edit -> Clear Display
  8. Go to Filter -> Reset Filter
The next three steps are time-sensitive as ideally we would like Process Monitor to capture as narrow of a time window around the Application Compiler issue as possible. Please read through the steps before proceeding:
  1. Go back to File -> Capture Events and turn it back on/enable capture.
  2. Go back to MATLAB and retry the Application Compiler workflow that resulted in the error message
  3. Once you reach the point in the workflow right after where the error message appears, go back to Process Monitor -> File -> Uncheck "Capture Events"
  4. Click on the Save icon (looks like a floppy disk) on the top right. Use the following parameters: Events to save -> All events, Format -> Native Process Monitor Format, Path -> (your choice).
After capturing the log file, you could share it with me. I would be happy to take a look for you.
Or, if you are familar with process monitor log, you can filter the result to "Sharing Violation". And check if there is any result in the list shown like below yourself.
Capture.PNG
In my example, the file MyAppInstaller_web.exe was locked by MsSense.exe, which is part of Windows Defender.
For the workaround method, MATLAB Runtime Installer will handle MCR installation properly. And you can just send a copy of your exe to the end user. But if you want a installer that can install both MCR and your application, this work around couldn't achieve it.
Hello Helen,
I've attempted your suggestion to find out what is locking the file. It seems to be a sharing violation indeed...!
Below you will find the "SHARING VIOLATION" as you've suggested:
Debugging_Packaging.PNG
And attached is the zipped log files (filtered).
Knowing that I don't have full control over my computer, so there are a few solutions out of the way (disabling windows defender is impossible, for example). What could be a solution that makes it possible to package these executables?
Hi Jerome,
Sorry for the late response. I didn't receive any system notification for your response and I just saw your post today...
I would say distribute your application and MCR separately is the best option I could think of as a workaround.
If you still want an installer that installs everything, then configure your antivirus software(Parity.exe) and windows defender to stop scanning file created by MATLAB, which is MyAppInstaller.exe in this case, is the only option. You may need to work with your IT department on it.

Sign in to comment.

More Answers (2)

In case someone stumbles on this problem again in the future:
I had the same symptoms when trying to compile. I found out that in my case it was because my project was in a Dropbox folder. Dropbox was blocking the process somehow. I just paused sync for a few minutes, tried to compile again and it worked.
@Helen Zhu was right: This is a symptom of the installer being locked by another program

1 Comment

Thank you for posting, this was exaclty what was causing the compiler to fail.

Sign in to comment.

I also faced this same issue on my Windows 11 and was able to temporarily disable Real-time Protection on my computer and it worked. To do this:
Press Windows Key > search "Virus and Threat Protection" > under Virus and Threat Protection Setting select "Manage settings" > Turn off real-time protection

Categories

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!