crash when I open a file

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: crash when I open a file

Post by Crossleyuk »

Hi All,

Thanks a lot but nothing worked and I recieved no reports in Report View.

I realised that I had only installed CfdOF so I added cfd and CfdOF again. It said it had inslalled all but when I open FreeCAD now i get the following Report View response.

"During initialization the error 'module' object has no attribute 'getModulePath' occurred in C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\InitGui.py
Please look into the log file for further information"


Should I uninstall and start again? Will the reinstall reset all the ini files etc?
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: crash when I open a file

Post by Crossleyuk »

Shoot, sorry, just read your reply and saww the ElbowStage2 attachment. So I right mouse buttoned on that and started with FreeCAD. It opened fine with a large Report View response.

"During initialization the error 'module' object has no attribute 'getModulePath' occurred in C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\InitGui.py
Please look into the log file for further information
<unknown exception traceback><type 'exceptions.ImportError'>: No module named _CfdInitialVariables
<unknown exception traceback><type 'exceptions.AttributeError'>: 'module' object has no attribute 'CfdSolverFoam'
<unknown exception traceback><type 'exceptions.ImportError'>: No module named _CfdMesh
<unknown exception traceback><type 'exceptions.ImportError'>: No module named _ViewProviderCfdMesh
<unknown exception traceback><type 'exceptions.ImportError'>: No module named _ViewProviderCfdInitialseInternalFlowField
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'
Traceback (most recent call last):
File "C:\Users\mcros\AppData\Roaming\FreeCAD\Mod\Cfd\_ViewProviderCfdFluidBoundary.py", line 62, in getIcon
icon_path = os.path.join(CfdTools.getModulePath(), "Resources", "icons", "cfd-foam-boundary.svg")
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'getModulePath'"


I tried Open With on my own file but it failed the same way.

This means nothing to me but it's great to continue to learn and thanks again.
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: crash when I open a file

Post by Crossleyuk »

Great news. I had a thought and opened the CFD_Elbow2-1 from the attachment and then opened my own file that caused FreeCad to crash immediately. It opened so I saved it with a modified title but will not open again. When I try to open that file it crashes immediately.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: crash when I open a file

Post by Syres »

Crossleyuk wrote: Fri Jul 19, 2019 2:10 pm Hi All,

Thanks a lot but nothing worked and I recieved no reports in Report View.

I realised that I had only installed CfdOF so I added cfd and CfdOF again. It said it had inslalled all but when I open FreeCAD now i get the following Report View response.
You should never have Cfd and CfdOF workbenches installed at the same time as it causes a conflict, therefore please uninstall the Cfd Wb and leave the CfdOF Wb installed.

What you've proved is FreeCAD appears to be fine as long as you have just CfdOF Wb in the AddOns but there appears to be a problem with your file, is it confidential or too large to attach to a post as I might be able to break out the model from the Cfd analysis, otherwise it maybe politely asking Oliver to assist with it? Did you happen to notice whether the FCStd1 file have a significantly different time to the originally corrupted FCStd one, sorry I forgot to mention to note this down?
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: crash when I open a file

Post by Crossleyuk »

Thanks All!

I'm taking it easy and trying to take care. I'm learning a lot and hope this is of use to someone.

1) Uninstalled everything and rebooted.
2) Downloaded FreeCAD 0.18 and ran it before adding CfdOK - It would not run at all
3) Added CfdOK and ran it - It would not run at all
4) Uninstalled and installed 0.17 and ran it - It loaded fine but crashed when I opened any file
5) Added CfdOK and no change
6) Whent back to the previous forum post and loaded CFD_Elbow_Stage2 with FreeCAD.exe
7) This case opened but with loads of "importError" statements in Report view
8) Would not let me run the file the run arrow would not highlight and copuld not delete the mesh and remesh
9) With this case open I could open my own CFD case and I could run the case with a highlighted run icon - But it would not run
10) Tried loads of changes with no success

Sorry, I have no idea what I can say about this but I did note that there were loads of errors reported in Report view during the 0.17 install and I have provided a copy of them in case they are any assiostance.

Can't think of what to do now but will keep trying. Seriously hope this will help provide a solution. I absulutely appreciate what you are all doing to help me.

Many thanks once more.

Michael
Attachments
CfdOK Install Report View Dialogue Text.docx
(52.29 KiB) Downloaded 44 times
MJC - CFD_Elbow_Stage_2 Capture.PNG
MJC - CFD_Elbow_Stage_2 Capture.PNG (80.31 KiB) Viewed 1477 times
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: crash when I open a file

Post by Syres »

It would be really appreciated if you could carry out these steps but please don't do anything more as the situation appears to be getting worse not better:

1) With FreeCAD closed, rename C:\Users\username\AppData\Roaming\FreeCAD\Mod folder to oldMod2 and create a new Mod folder in C:\Users\username\AppData\Roaming\FreeCAD
2) Please follow Oliver's detailed instructions for downloading the previous (important) version of CfdOF (that's OF for OpenFOAM not OK!!) https://forum.freecadweb.org/viewtopic. ... 45#p321965 to the Mod folder in step 1. Therefore the folder Mod will only have CfdOF folder in it, nothing else to complicate the starting process.
3) Start FreeCAD, select the Edit menu > Preferences > General > Output window tab, ensure Record log messages, Record Warnings and Record error messages are all ticked. Click Apply but don't close the Preferences window yet
4) Click the Cfd preferences icon and ensure the OpenFOAM installation directory is still showing the correct location, change it if required. Click the Dependency Checker which should now give a more detailed output in the Report View and copy the output to a text file.
5) Click OK to close the Preferences Window
6) Open the CFD_ElbowStage2 file, please don't run the solver or remesh it (otherwise there will be an error), just report back whether the icons look correct, double-click any of the inlets/outlet and report if they open the settings dialog correctly.

Once you get to that stage hopefully without major incident then the OpenFOAM installation itself will need reviewing and I'll need some time to find a script to clean up all the registry before proceeding but I'll look at that in the morning.
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: crash when I open a file

Post by Crossleyuk »

Sorry about the OK/OF confusion but no success again I'm afraid.

I followed your and Oliver's instructions that I understand has replaced the new CfdOF with the old one. But unfortunately it has not helped, I still cannot open an old file.

However, I have another observation.

I decided to try something simmilar by starting a new new model case as follows:

1) Open FreeCAD
2) Select Part Design Wb
3) Select new empty document

And FreeCAD immediately crashes as it does when opening a old file. This happened with the new and now once again with the old CfdOF
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: crash when I open a file

Post by Syres »

As the Report View is now producing all messages and not just errors, could you please just start FreeCAD and copy the entire contents of the Report View. Paste them into your reply but please put them in Code tags like the following:

Code: Select all

Run Gui init script
Init: Running FreeCADGuiInit.py start script...
Init:   Searching modules...
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Sketcher... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\ReverseEngineering... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Show(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Image... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Surface... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\PartDesign... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\fasteners... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\SelectionTools... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Measure(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Ship... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Plot... done
Module: Part
Loading Part module... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Manipulator... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\MeshPart... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\OpenSCAD... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Fem... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Spreadsheet... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Start... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Points... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Draft... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Test... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Import... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\A2plus... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\TechDraw... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Tux... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CurvedShapesWorkbench... failed
----------------------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 120, in InitApplications
  File "<string>", line 45, in <module>
  File "<string>", line 11, in __init__
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CurvedShapesWorkbench\CurvedShapes.py", line 5, in <module>
    from importlib import reload
ImportError: cannot import name reload
----------------------------------------------------------------------------------------------------
During initialization the error cannot import name reload occurred in C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CurvedShapesWorkbench\InitGui.py
Please look into the log file for further information
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Complete... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Web... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\FCGear(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Material... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Raytracing... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Glass... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Mesh... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Curves... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\sheetmetal... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Path... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Part... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Silk... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Arch... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Launcher... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Robot... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\AddonManager... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Idf(InitGui.py not found)... ignore
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Inspection... done
Init:      Initializing C:\Program Files\FreeCAD 0.17\Mod\Drawing... done
Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF... done
Init: Initializing freecad.gears
Init: Initializing freecad.gears... done
Init: Loading FreeCAD GUI
Init: Running FreeCADGuiInit.py start script... done
Init: Activating default workbench StartWorkbench
Loading GUI of Web module... done
Loading GUI of Start module... done
Loading Start module... done
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
not a freecad file: .SVG
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files
Init: Showing main window
Main window restored
Show main window
Toolbars restored
Cannot open file 'C:/Program Files/FreeCAD 0.17/bin/qss:images_dark-light/close_light.svg', because: The filename, directory name, or volume label syntax is incorrect.
Cannot open file 'C:/Program Files/FreeCAD 0.17/bin/qss:images_dark-light/close_light.svg', because: The filename, directory name, or volume label syntax is incorrect.
Cannot open file 'C:/Program Files/FreeCAD 0.17/bin/qss:images_dark-light/undock_light.svg', because: The filename, directory name, or volume label syntax is incorrect.
Cannot open file 'C:/Program Files/FreeCAD 0.17/bin/qss:images_dark-light/undock_light.svg', because: The filename, directory name, or volume label syntax is incorrect.
3Dconnexion device not attached.
Init: Entering event loop
Cannot open file 'C:/Program Files/FreeCAD 0.17/bin/qss:images_dark-light/down_arrow_light.svg', because: The filename, directory name, or volume label syntax is incorrect.
Cannot open file 'C:/Program Files/FreeCAD 0.17/bin/qss:images_dark-light/down_arrow_light.svg', because: The filename, directory name, or volume label syntax is incorrect.
Init: Processing command line files
I'll be honest I'm running out of ideas and it wouldn't surprise me that there's something that's not directly related to FreeCAD causing the problems.
User avatar
Crossleyuk
Posts: 165
Joined: Wed Jun 20, 2018 7:47 am
Location: United Kingdom
Contact:

Re: crash when I open a file

Post by Crossleyuk »

Thanks Syres, I'm going to take a closer look at this in my morning.

Just one question. in item 4) you suggest "clicking Cfd preferenced icon and ensure OpenFoam installation directory is still showing the correct location"

I'm confused, I see no reference to OpenFoam. Is it added with BLueCFD Core?

Sorry again for my confusion and I'll take a closer look with a clear head tomorrow repating your instructions from scratch.

Michael
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: crash when I open a file

Post by Syres »

The default directory location if you installed blueCFD-Core-2017 which includes OpenFOAM is C:\Program Files\blueCFD-Core-2017\OpenFOAM-5.x
Other versions have a similar structure just with different version numbers in the path, as you can see I use a non-standard install location.
Attachments
CfdOFPrefs.jpg
CfdOFPrefs.jpg (75.01 KiB) Viewed 1415 times
Post Reply