DLL load failed while importing FEM

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

DLL load failed while importing FEM

Post by NewJoker »

Hi,

I encountered this "Workbench failure" error in 0.20.28611 on one of my computers so I switched to the most recent build (0.20.28671) but this problem still persists:

Code: Select all

DLL load failed while importing FEM
Here's my complete FreeCAD info:

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.28671 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Polish/Poland (pl_PL)
Installed mods: 
  * Curves 0.3.0
  * dodo
  * ExplodedAssembly
  * fasteners 0.3.39
It says that it's Windows 10 but it's actually Windows 11.

I think that I used FEM in various builds on this computer before but I'm not sure. What can be done to fix this error ?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: DLL load failed while importing FEM

Post by wmayer »

You have to download the tool Dependency Walker (DW). After unpacking the zip file you should have a depends.exe. Now start FreeCAD and enter this into its Python console:

Code: Select all

import os
os.system("Path_to_the_depends.exe")
Now the DW should be started (and blocks FreeCAD) and you have to load the file Fem.pyd and FemGui.pyd. In the tree view of the DW you should see which 3rd party dlls are missing or binary incompatible.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: DLL load failed while importing FEM

Post by NewJoker »

wmayer wrote: Thu Apr 14, 2022 9:09 am
All right, I did that and it showed me a very long list of missing files. How should I proceed ? And what actually causes such errors - is that a fault of the OS or something is missing from the FreeCAD's build package ?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: DLL load failed while importing FEM

Post by wmayer »

NewJoker wrote: Thu Apr 14, 2022 11:20 am
wmayer wrote: Thu Apr 14, 2022 9:09 am
All right, I did that and it showed me a very long list of missing files. How should I proceed ? And what actually causes such errors - is that a fault of the OS or something is missing from the FreeCAD's build package ?
You may get a long list with ms-something files. These are all internal dlls and can be ignored. What you should check are files with a yellow or a red-white symbol. The former is a missing file and the latter an incompatibility. If you are unsure post a screenshot.

At the end it depends on what exactly is wrong but it's more likely a packaging issue. Now you said that the same package works on other computers it could be an indication that a dll needs a certain version of a VS runtime dll.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: DLL load failed while importing FEM

Post by NewJoker »

wmayer wrote: Thu Apr 14, 2022 12:37 pm
Thankfully (?) almost all the files have MS in the name (API-MS or EXT-MS). Only these four are named differently:

Code: Select all

HVSIFILETRUST.DLL
IESHIMS.DLL
PDMUTILITIES.DLL
WPAXHOLDER.DLL
They can't be found, according to Dependency Walker.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: DLL load failed while importing FEM

Post by wmayer »

They can't be found, according to Dependency Walker.
None of them ring a bell.

What you can try next is to start FreeCAD from within DW. Somewhere in the menu there must be a function that allows you to select an executable and IIRC you start it with F7. DW then prints a very detailed report of what happens internally and should give you more information which dll fails to load and why.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: DLL load failed while importing FEM

Post by NewJoker »

wmayer wrote: Thu Apr 14, 2022 1:08 pm
When I did that, one red message was printed among the other lines with information:

Code: Select all

GetProcAddress(0x00007FF6439D0000 [QTWEBENGINEPROCESS.EXE], "GetHandleVerifier") called from "QT5WEBENGINECORE_CONDA.DLL" at address 0x00007FFA3B9FEE08 and returned NULL. Error: Nie mo_na odnale__ okre_lonej procedury (127).
Part of this error is in Polish and says "The specified procedure cannot be found".

On this occasion, I've noticed that some files in the list don't have that red "Error opening file" message but there is a red warning symbol next to them:

errors.png
errors.png (213.25 KiB) Viewed 3259 times

The rest is like before - either "MS" in the name or these 4 files that I mentioned in the previous reply.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: DLL load failed while importing FEM

Post by wmayer »

Part of this error is in Polish and says "The specified procedure cannot be found".
Is StartePage your default wb? I don't think that the web engine stuff is loaded when activating the FEM wb. In order to test the FEM stuff specifically you can start FreeCAD normally, change its default wb to e.g. Test framework and close it again. Then restart it with DW and try to load FEM.

Then you can post the whole output of DW.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: DLL load failed while importing FEM

Post by NewJoker »

wmayer wrote: Thu Apr 14, 2022 3:18 pm Is StartePage your default wb?
Yes, it was my default workbench. I did what you suggested but no new lines appeared in the Dependency Walker report when I switched to FEM workbench after FreeCAD started. Maybe I did something wrong.

Anyway, when I start FreeCAD in Dependency Walker with Test framework as the default wb, only MS files and WPAXHOLDER.DLL are shown as missing.
User avatar
jimmi
Posts: 1
Joined: Thu Oct 13, 2022 1:53 pm

Re: DLL load failed while importing FEM

Post by jimmi »

Not sure if i am at the right place here but my FEM fails to stars because of missing DLL...
Tell my what you need and where it is at and i will provide you the files (log etc...)

Code: Select all

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31340 (Git)
Build type: Release
Branch: master
Hash: 856af2a12287a2d7c0d5ab23646be43af26b14b1
Python 3.8.15, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * ArchTextures
  * Assembly2
  * Behave-Dark-Colors 0.1.1
  * CurvedShapes 0.2.59
  * Curves 0.6.5
  * Defeaturing 1.2.0
  * dodo 1.0.0
  * Dracula 0.0.2
  * ExplodedAssembly
  * ExtremeProDark 2.6.4
  * ExtremeProLight 1.4.3
  * Fasteners 0.4.27
  * fcgear 1.0.0
  * Geomatics
  * Graphviz
  * IconThemes 10.16.5
  * InventorLoader 1.3.0
  * kicadStepUpMod 10.16.5
  * lattice2 1.0.0
  * Manipulator 1.4.9
  * Plot 2022.4.17
  * ProDarkThemePreferencePack 1.0.0
  * Pyramids-and-Polyhedrons
  * Ship 2022.4.11
  * toSketch 1.0.1
Attachments
FEM failed at start because of missing DLL.PNG
FEM failed at start because of missing DLL.PNG (121.89 KiB) Viewed 2155 times
Post Reply