Crash at startup on Windows 10 21H2

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
PierreF
Posts: 8
Joined: Sat Dec 18, 2021 3:49 pm

Crash at startup on Windows 10 21H2

Post by PierreF »

Hello all,

I am a user of freeCAD since two years for 3D printing as a hobbyist. I have discovered 3D design thanks to FreeCAD and that's fun.

I cannot use the latests weekly releases anymore as they crash before finishing startup.

However, the builds 25645 and 25997 still run properly. I can't say for previous builds as I have deleted them.
Releases starting from 26554 crash. I don't know for releases between 25997 and 26554.
Note that I don't compile FreeCAD and use directly the builds provided.


I have searched in the forum and tried updating my drivers and windows but without any effect.

I use Windows 10 21H2 Professional, with the internal IntelHD graphics card. No addtional graphics card.
My Freecad system informations (for release 25997, which is OK) are:
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.25997 (Git)
Build type: Release
Branch: master
Hash: 77b198048a63f1e9ca15eef64c8042d599a14cf3
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)

I cannot provide these informations for 26620, since it crashes before finishing startup. However I have attached the FreeCAD.log.

Is that a bug ? Any idea to find a solution or a workaround ?

Thanks for your help
Attachments
FreeCAD.log
(17.79 KiB) Downloaded 45 times
wmayer
Founder
Posts: 20113
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash at startup on Windows 10 21H2

Post by wmayer »

Hard to say what's wrong as the log file doesn't contain any suspicious information.
PierreF
Posts: 8
Joined: Sat Dec 18, 2021 3:49 pm

Re: Crash at startup on Windows 10 21H2

Post by PierreF »

Log: Init: Initializing C:\Programmes sans installation\FreeCAD_weekly-builds-26620-Win-Conda_vc14.x-x86_64\Mod\Show(Init.py not found)... ignore

Is this normal ?
chrisb
Veteran
Posts: 53285
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash at startup on Windows 10 21H2

Post by chrisb »

PierreF wrote: Sat Dec 18, 2021 5:29 pm Log: Init: Initializing C:\Programmes sans installation\FreeCAD_weekly-builds-26620-Win-Conda_vc14.x-x86_64\Mod\Show(Init.py not found)... ignore
I don't have the file Mod/Show/Init.py, but I have in the same folder __init__.py . Do you have that too?

Others use such paths, but can you change your folder name so that you avoid spaces in it?
Another source of problems could be your user name with the special character "ç". Can you create a new user with pure ascii characters and start it as that user?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
PierreF
Posts: 8
Joined: Sat Dec 18, 2021 3:49 pm

Re: Crash at startup on Windows 10 21H2

Post by PierreF »

Hi chrisb,

I also have a __init__.py file in the Mod/Show folder.
I removed the space in the directory name, with no effect.
I have created a new user using only basic ASCII characters. It SOLVED the problem.

So all my thanks to you and wmayer for your help.

Should I open a bug as it could be a regression ?
chrisb
Veteran
Posts: 53285
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash at startup on Windows 10 21H2

Post by chrisb »

I don't think it's a regression, but nevertheless probably a bug. Please open a bug report and link it to this discussion (and vice versa).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
PierreF
Posts: 8
Joined: Sat Dec 18, 2021 3:49 pm

Re: Crash at startup on Windows 10 21H2

Post by PierreF »

chrisb
Veteran
Posts: 53285
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash at startup on Windows 10 21H2

Post by chrisb »

PierreF wrote: Sat Dec 18, 2021 11:38 pm See bug report: https://tracker.freecadweb.org/view.php?id=4807
Thanks! Sorry I had missed the part in your first post that it used to run. So you are right, it is a regression.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20113
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash at startup on Windows 10 21H2

Post by wmayer »

PierreF wrote: Sat Dec 18, 2021 5:29 pm Log: Init: Initializing C:\Programmes sans installation\FreeCAD_weekly-builds-26620-Win-Conda_vc14.x-x86_64\Mod\Show(Init.py not found)... ignore

Is this normal ?
Yes, this is OK. A module isn't forced to provide an Init.py file.
Another source of problems could be your user name with the special character "ç". Can you create a new user with pure ascii characters and start it as that user?
I have created a new user using only basic ASCII characters. It SOLVED the problem.
That's bad. Actually FreeCAD should be able to handle path names with any character in it and isn't dependent to work with ASCII paths only.
wmayer
Founder
Posts: 20113
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crash at startup on Windows 10 21H2

Post by wmayer »

I was able to reproduce the issue by setting the environment variable FREECAD_USER_HOME=C:/Temp/Pierre-François.

What happens is that before starting the event loop a lock file is created and an IPC object on it. The creation of the IPC object fails and throws an exception so that the event loop is never started and the application is terminated.

The problem is the boost class boost::interprocess::file_lock because it only provides a constructor with a plain C string but not with a wide string that would be needed for Windows.

So, the question is not why it fails now it should rather be: how has it ever worked before?
Post Reply