Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ucrtbase.dll Error on Windows 11 in Parallels #485

Open
ed-p-may opened this issue Feb 8, 2022 · 31 comments
Open

ucrtbase.dll Error on Windows 11 in Parallels #485

ed-p-may opened this issue Feb 8, 2022 · 31 comments

Comments

@ed-p-may
Copy link

ed-p-may commented Feb 8, 2022

Issue


Trying to install OpenStudioApplication on Mac M1 running parallels and Windows 11, but receiving an error on attempted application startup?

Current Behavior

OS and OS application seem to install fine, but if I try and run OSApp I get the error and application requires force-quit to exit:

“Measure Manager has crashed, attempting to restart… unexpected ucrtbase.dll”

Screen Shot 2022-02-03 at 8 53 48 PM

What I have tried

  • Reinstalling
  • running srf/scannow
  • Following all the steps outlined in this article: Link
  • Copy/Pasting the OSApp ucrtbase.dll to C:\Windows\System32
  • Copy/Pasting the C:\Windows\System32 ucrtbase.dll to the OSApp directory
  • Copy/Pasting the OSApp ucrtbase.dll to C:\Windows\SysWOW64
  • Copy/Pasting the C:\Windows\SysWOW64 ucrtbase.dll to the OSApp directory
  • Registering the uctrbase.dll using regsvr32
    • Note: when I attempt to register the dll using the regsvr32, I get the error:
      "The module "ucrtbase.dll" was loaded but the entry-point DLLRegisterServer was not found. Make sure that "ucrtbase.dll" is a valid DLL or OCX file and then try again"

Screen Shot 2022-02-03 at 10 30 22 PM

Log:

I have run the app in DEBUG=1 mode, and generated the following log file, if that is helpful?:
osapp.log

Environment

  • Macbook 2021, Apple M1 Max
  • OS 12.2 (Monterey)
  • Parallels v17
  • Windows 11 Home, Version 10.0.22000, Build 22000
  • OpenStudioApp 3.3.0
  • OpenStudio 1.3

Solutions

  • Should I be installing something else before attempting to install OSApp?
  • Should I be 'registering' the dll differently somehow?
  • Does OS and OSApp not support Windows 11 yet?

Thank you very much in advance for any suggestions or recommendations. I am happy to provide more information if that is helpful. Thank you.
-Ed May, @PH-Tools

@ed-p-may ed-p-may added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Feb 8, 2022
@macumber
Copy link
Collaborator

macumber commented Feb 9, 2022

Thanks for the excellent debugging and issue report Ed.

OpenStudioApp 3.3.0 does work on Windows 11, that is what I am using now. I would recommend trying to revert the dlls in your system directories back to what they were, I have never heard of regsvr32 either so I don't think you have to do that. The only ucrtbase.dll I see in the OS or OSApp installations is under EnergyPlus, maybe we need to ship that for the OSApp? Have you tried copying C:\openstudioapplication-1.3.0\EnergyPlus\ucrtbase.dll to C:\openstudioapplication-1.3.0\bin?

Can you run the command C:/openstudioapplication-1.3.0/bin/openstudio.exe measure -s 50211 in a cmd prompt and see what the output is? Also the command where ucrtbase.dll?

Running parallels on an M1 chip is a configuration I have not tried. The OS Coalition does have access to an M1 VM but I don't think we have a license for parallels. How did you get the Windows 11 image, is there a free or trial version that you can use? I imagine there are a lot of rough edges on virtualization with the M1 chips still, there might be some hints online, maybe
https://www.parallels.com/blogs/windows-11-tpm/

@macumber macumber added component - Installer/Platform 📦 severity - Major Bug 💥 and removed Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Feb 9, 2022
@ed-p-may
Copy link
Author

ed-p-may commented Feb 9, 2022

Hi Dan @macumber

Thank you for the response and the suggestions.


  • You are right, the only ucrtbase.dll in the OSApp folder seems to be in the EnergyPlus folder.
  • I tried copy/pasting that file over to the .../bin/ folder as you suggested, and then running the App in 'Administrator' mode but unfortunately I still get the same 'Measure Error' as above.

Screen Shot 2022-02-09 at 9 24 10 AM


  • And yes understood on the VM issue. I am currently running the 'free trial' of parallels to see if this could work, since I wasn't sure if anything like this was supported at all yet.
  • At the moment, I am running the 'free trial' of Parallels (14 days I think?) which comes with Windows 11 as part of it's trial install. The Windows 11 is the 'Windows Insider' version for M1s so that might also be part of the issue? That is the one which ships with Parallels automatically.
  • But yes, so far I've been able to try this out using all free trials for Parallels and Windows so far.
  • That's a good idea to post on the Parallels forum though and perhaps there is a solution on that side for issues of this sort.

  • One other item of context, which may or may not be relevant. I am also unable to install EnergyPlus as a standalone install (installed through the E+ installed, not as part of the OSApp)
  • I get a different error when trying to install E+ 9.6: The code execution cannot proceed because MSVCP140.dll was not found.

Screen Shot 2022-02-03 at 9 14 55 PM

Perhaps all of this is actually an E+ issue, not an OSApp issue?

regardless - thanks so much for the response.
-Ed @PH-Tools

@macumber
Copy link
Collaborator

macumber commented Feb 9, 2022

Out of curiosity why do you want to run OSApp in parallels? Is there a problem running the Mac version of OSApp on your Mac? My understanding is that the Mac builds would work on an M1 machine, we may create a separate M1 build at some point.

@ed-p-may
Copy link
Author

ed-p-may commented Feb 9, 2022

Ah - good question:

  • Yes, OSApp and OS all run smoothly on the Mac OS side on the M1. That currently seems to work well - so kudos to the OS team for that for sure! So far smooth sailing there.
  • Our specific workflow is actually using the 'Honeybee' package within Rhino 3D modeler to do all our energy modeling. We love that package and have been using it for a while now.
  • So, the real use-case within our firm is to build OS-models through Honeybee (within Rhino) on the Windows OS side, then we run the models using OS-App and do QA/QA within OSApp, apply measures, etc...
  • Honeybee does run fine on the Mac OS side as well, just FYI.
  • The reason we are trying to run Honeybee and OSApp on windows actually has to do with a bunch of other (non OS, non-HB) plugins that still make use to the old IronPython .NET clr to report out a whole bunch of model data to Excel from the Honeybee and Rhino model - all related to compliance reporting and documentation for projects. These additional reporting / automation tools currently only run on windows. So while OSApp, HB and Rhino do run on Mac OS, these other plugins do not (yet) and so we're stuck on windows if we want to maintain our current workflow.

complicated, I know! And the answer might very well be: "Don't run OSApp on Windows 11, just rebuild these other plugins to run on Mac OS instead.", Which is possible, I think. But we were not sure what would work, and what would not work on these new systems.
sorry for the complicated answer. Kind of nutty I know. thanks!
-Ed

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

@PH-Tools Can you try to install the official energyplus EXE installer for EnergyPlus V22-1-0) on your machine, then retry running the App? direct link: https://github.com/NREL/EnergyPlus/releases/download/v22.1.0/EnergyPlus-22.1.0-ed759b17ee-Windows-x86_64.exe

You might ask "What the hell does that have to do with anything?" :) Well, the E+ IFW installer copies a bunch of dlls to the C:/Windows/SysWow64 and register them via regsvr32.exe, including that ucrt one, so I think it'll fix your issue... For reference, this is done in https://github.com/NREL/EnergyPlus/blob/develop/cmake/qtifw/install_win_copydll.qs


Edit: nevermind, ucrtbase.dll is actually supposed to be a plain windows DLL and there is no need to register it. I'm booting a clean windows 11 VM and will test.

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

I haven't been able to reproduce the issue on a clean windows 11 virtual machine (that I run on virtualbox with an Ubuntu 20.04 host).

Note that even if the measure manager worked, you actually wouldn't be able to run simulations in E+ since 9.6.0 is missing vcomp140.dll (for OpenMP), something I have (fixed recently in NREL/EnergyPlus#9310 and is only included in enegyplus V22-1-0 (though by just placing vcomp140.dll in the openstudioapplication-1.3.0/EnergyPlus folder it would work).
This is what you have reported above:

I get a different error when trying to install E+ 9.6: The code execution cannot proceed because MSVCP140.dll was not found.

Except apparnetly for some reason you installed the i386 (32 bit) version

The vcomp140.dll from the EnergyPlusV22-1-0 installer: vcomp140.zip

@ed-p-may
Copy link
Author

ed-p-may commented May 4, 2022

Hi @jmarrec Thanks for taking a look at this!

I tried installing E+ v22-1-0 as you suggested. I tried it two ways (To see if that mattered):

  1. Install E+ v22-1-0 first, then install OpenStudio-3.3.0 and OpenStudioApplication-1.3.1
  2. Install OpenStudio-3.3.0 and OpenStudioApplication-1.3.1 first, and then E+ v22-1-0 second

I made sure to copy/paste that vcomp140.dll into C:\openstudioappliocation-1.3.1\EnergyPlus... as well

They all install successfully (including E+ v9.6.0, so that is great), it seems:
Screen Shot 2022-05-04 at 9 07 53 AM

and I can run EPLaunch v9.6.0 or 22.1.00 without issue.

But unfortunately still when I try and run the OpenStudioApplication from the toolbar, I get the same error about 'ucrtbase.dll' as soon as it opens, and I have to ctrl-alt-delete to close.
Screen Shot 2022-05-04 at 9 07 30 AM

Thanks so much for the suggestion though. FWIW we have two machines in the office, both the new M1 Mac running the same Windows-11
Screen Shot 2022-05-04 at 9 14 20 AM

and both have this same issue.
If you have any other thoughts though I'd be happy to test it out!
best,
Ed @PH-Tools

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

I'm kinda out of ideas, let's hope your post at https://forum.parallels.com/threads/ucrtbase-dll-errors-running-application.356598/ pans out.

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

wait, your windows 11 VM is an arm64 one and not an x86_64 / arm64 isn't it? @PH-Tools

@ed-p-may
Copy link
Author

ed-p-may commented May 4, 2022

Hi @jmarrec

I'm not sure I know the difference between an arm64 and an x86_64/arm64 I'm afraid? But my environment is currently:

  • Macbook 2021, Apple M1 Max
  • OS 12.3.1 (Monterey)
  • Parallels v17.1.2
  • Windows 11 Home, Version 10.0.22000.613

Screen Shot 2022-05-04 at 1 51 09 PM

Screen Shot 2022-05-04 at 1 51 59 PM

Screen Shot 2022-05-04 at 1 54 05 PM

I'm not sure if that makes sense? Happy to provide more details if that is helpful.

thanks!
@PH-Tools

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

I'm 99% sure what you have is windows on arm: https://kb.parallels.com/125375

Can you try this in cmd.exe:

wmic os get osarchitecture
echo %PROCESSOR_ARCHITECTURE%

Short story: everything in that stack (E+, OS CLI and OpenStudioApplication) has been compiled on on a x86_64 (also called amd64) platform. The system DLLs the CLI tools expect are for that architecture. If you are running Windows on arm, then the architecture is different and would explain the issue you're seeing.

The difference between architectures are the set of instructions these will run.

Can you also try running this?

C:\EnergyPlusV22-1-0\energyplus.exe --version

I'm afraid there will be a need to recompile everything, or at least the energyplus and openstudio CLI.

@jmarrec
Copy link
Collaborator

jmarrec commented May 4, 2022

@ed-p-may
Copy link
Author

ed-p-may commented May 4, 2022

Hi @jmarrec

Ah - that makes sense, thanks. And yes you bet - here is what I get:

Screen Shot 2022-05-04 at 2 25 06 PM


Screen Shot 2022-05-04 at 3 06 48 PM

So yes: looks like it is? I suppose that would be the issue then?

@macumber
Copy link
Collaborator

macumber commented May 5, 2022

Oh wow, I did not even know that was a possibility. I think Windows on ARM is going to become more of a thing: https://www.zdnet.com/article/first-windows-11-on-arm-laptops-arrive-with-microsofts-pluton-chip-heres-why-it-matters/. Probably need to put a Windows ARM build on the roadmap

@jmarrec
Copy link
Collaborator

jmarrec commented May 5, 2022

The issue is that there are no runners available for it... if we need to buy an m1 mac to run windows on it, I'll be damned :)
So short term I'd say this is too niche (even m1 macos are kinda niche at this point honestly), but longer term that's going to be a thing

@jmarrec
Copy link
Collaborator

jmarrec commented May 5, 2022

The only reason I thought of it is because I do have an m1 mac and I have briefly toyed with the trial version of parallels desktop

@macumber
Copy link
Collaborator

macumber commented May 5, 2022

@jmarrec
Copy link
Collaborator

jmarrec commented May 5, 2022

Expect massive pain in the beginning especially with regards to conan packages... and we would need to get clang working on windows first. Fun stuff :)!

@ed-p-may
Copy link
Author

ed-p-may commented May 5, 2022

Thanks @jmarrec @macumber - appreciate your weighing in! Good to that at least it wasn't something that I was doing terribly wrong.

Understood on the Window on ARM support side. Yes - only a small group right now I'd imagine (it mainly has to do with other plugins that work alongside OSApp but are windows-only)? The one thing I might suggest is just that having some note on the webpage / documentation that ARM Windows installation is not supported? That would be plenty for folks at the moment I think?

Regardless: thanks again for taking a look at this! Really appreciate it.
@PH-Tools

@Nathhier
Copy link

Nathhier commented Jul 8, 2023

Hello, I am facing the same issue
Screenshot 2023-07-08 at 11 16 26
and have tried most things which @PH-Tools also listed "running srf/scannow
Following all the steps outlined in this article: Link
Copy/Pasting the OSApp ucrtbase.dll to C:\Windows\System32
Copy/Pasting the C:\Windows\System32 ucrtbase.dll to the OSApp directory
Copy/Pasting the OSApp ucrtbase.dll to C:\Windows\SysWOW64
Copy/Pasting the C:\Windows\SysWOW64 ucrtbase.dll to the OSApp directory
Registering the uctrbase.dll using regsvr32
Note: when I attempt to register the dll using the regsvr32, I get the error:
"The module "ucrtbase.dll" was loaded but the entry-point DLLRegisterServer was not found. Make sure that "ucrtbase.dll" is a valid DLL or OCX file and then try again"

I also downloaded "ARM64 |https://aka.ms/vs/17/release/vc_redist.arm64.exe" hoping that it might solve the Windows on ARM 64 issue. But it didn't. Probably this is not even the way to go about it. I am a novice with all of it.
Screenshot 2023-07-08 at 11 37 36

Was there a solution which I couldn't understand?

My divide specifications are:
Screenshot 2023-07-08 at 11 17 02

@macumber
Copy link
Collaborator

macumber commented Jul 8, 2023

Hi @Nathhier I think that unfortunately we are not able to support running Windows ARM under Parallels on Mac M1 processors right now. Are you able to run the Mac M1 release https://github.com/openstudiocoalition/OpenStudioApplication/releases/download/v1.6.0/OpenStudioApplication-1.6.0+53c249a897-macOS12.1-arm64.dmg directly under your Mac?

@jmarrec
Copy link
Collaborator

jmarrec commented Jul 21, 2023

The issue is on the OpenStudio.exe, probably due to the embedded ruby, not the OpenStudioApp.

Running Windows 11 21H2 on arm:

$ openstudio.exe --help
unexpected ucrtbase.dll

I also tried to install the RubyInstaller https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.2-1/rubyinstaller-devkit-3.2.2-1-x64.exe

$ ruby --version
unexpected ucrtbase.dll

@MOLd57
Copy link

MOLd57 commented Oct 27, 2023

out of curiosity, was there ever any resolution to this thread. I just ran into the same exact situation on my mac running parallels. my main reason for wanting to run this on my windows side is that thats where im running my Revit / Rhino.inside/ ladybug and honeybee tools.

image

@Nathhier
Copy link

Hi @MOLd57
Unfortunately not (at least not for me). I am now using Rhino/Grasshopper only on Mac

@ed-p-may
Copy link
Author

@MOLd57

Not to my knowledge. I have not tried to do this install in some time though. My use-case was similar, but I had to give up as I could not find any solution that worked for me. Sorry.
@PH-Tools

@macumber
Copy link
Collaborator

macumber commented Feb 4, 2024

I just tried running OpenStudioApplication on a Windows ARM64 dev machine and ran into this same issue. I believe this might be related to oneclick/rubyinstaller2#308

@kinimodM
Copy link

Hi there,

it's been a while, I wanted to ask if a solution/workaround has already been found for the problem for Mac m2, with parallels 19 windows ? I have installed the latest versions of Ladybug/radiance/Openstudio and still get the error message "unexpected ucrtbase.dll".

Thanks a lot!

@macumber
Copy link
Collaborator

Hi @Reflaxface, I don't have any updates right now. We have purchased an ARM Windows development machine and hope to start work on a package for ARM Windows. My hope is that would work for your case (Windows running in Parallels on ARM processor).

@kinimodM
Copy link

kinimodM commented Mar 26, 2024

Hey @macumber,

alright, thanks a lot for letting me know! Would be awesome, though!

@macumber
Copy link
Collaborator

@Reflaxface @ed-p-may I just saw this oneclick/rubyinstaller2#308 (comment) post by a Windows developer that an issue with Ruby on Windows ARM has just been released in 2024-03 Cumulative Update Preview for Windows 11 Version 23H2 for arm64-based Systems (KB5035942). I updated my Windows ARM dev machine to the latest release and now OpenStudio Application is working on that machine. Would either of you be able to try updating your Windows installs in Parallels to this latest version of Windows 11 and try OpenStudio Application out again? While you are at it, we are testing a 1.7.1-rc1 installer that has some bug fixes relative to 1.7.0. The issue for providing feedback on the 1.7.1-rc1 release is #706 and the installers are available at https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.7.1-rc1

@ed-p-may
Copy link
Author

Hi @macumber , @Reflaxface

I had occasion to test this out this morning, and from my test it still does not work for me. The error is slightly different now, but it appears to still be a ucrtbase.dll reference:
Screenshot 2024-11-13 at 9 12 17 AM

unexpected ucrtbase.dll
MeasureManager ReadyAccepting requests on: http://localhost:49969/
Attempting to load measure 'C:/Users/em/BCL/a25386cd-60e4-46bc-8b11-c755f379d916/5b4d387a-f537-4693-a9eb-6192957b6c1b'
Successfully loaded measure 'C:/Users/em/BCL/a25386cd-60e4-46bc-8b11-c755f379d916/5b4d387a-f537-4693-a9eb-6192957b6c1b'
Attempting to load model 'C:/Users/em/AppData/Local/Temp/osmodel-e86d-b92d-240c-c7dc-1731507319-0/temp_measure_manager.osm'
Successfully loaded model 'C:/Users/em/AppData/Local/Temp/osmodel-e86d-b92d-240c-c7dc-1731507319-0/temp_measure_manager.osm'
[openstudio.model.YearDescription] <1> 'UseWeatherFile' is selected in YearDescription, but there are no weather file set for the model.
[openstudio.model.YearDescription] <1> 'UseWeatherFile' is selected in YearDescription, but there are no weather file set for the model.
[utilities.idf.WorkspaceObject] <0> Object of type 'Schedule:Constant' and named 'Always On Discrete', points to an object named OnOff from field 1, but that object cannot be located.
[utilities.idf.WorkspaceObject] <0> Object of type 'Schedule:Constant' and named 'Always Off Discrete', points to an object named OnOff 1 from field 1, but that object cannot be located.
[utilities.idf.WorkspaceObject] <0> Object of type 'Schedule:Constant' and named 'Always On Continuous', points to an object named Fractional from field 1, but that object cannot be located.

Enviroment:

  • Mac M1
  • Sequoia v15.0.1
  • Windows 11 (21H2)
  • Parallels v20.1.1 (55740)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants