coldphysics / experiment-control

This repository maintains a software used to control physical experiments related to very cold molecules and atoms.
GNU General Public License v2.0
6 stars 0 forks source link

Experiment control software crashed when pressing Start on Windows 11 #67

Open jan-de-haan opened 1 month ago

jan-de-haan commented 1 month ago

When clicking "Start" in the experiment control software, without even having loaded any sequence, the program crashes.

The issue is not reproducible on Windows 10, it only occurs on Windows 11.

With a debugger, we have found that the problem is due to small script snippets that are executed as parts of e.g. dynamic variables cannot be run with the built-in version of IronPython because the math builtin cannot be imported. Some other builtins also cannot be imported, we found this specifically for time and cmath. The standard library can be imported when adding it to the search path of the script execution engine, but imports again fail because of missing builtins.

We have tested the behavior of Iron Python in a standalone console app with C# 8.0, and there importing the math builtin does work.

jan-de-haan commented 1 month ago

We have also tried making a standalone WPF app with .NET framework version 4.8, the same that is used by the experiment control software. There, the issue is not reproducible (Windows 11).

jan-de-haan commented 1 month ago

We have so far in our testing efforts isolated the following possible sources of problems:

Thus the only difference we have found so far between a working and not working version is using Windows 11.

To test whether we actually have a general problem with Windows 11, we will try installing the experiment control software on another Windows 11 PC. If it does not work there as well, the reason for the Iron Python builtins not working must have something to do with the Windows version, though we so far see no obvious mechanism for how such a bug could come about. Somehow, the implementation of Python as a CLR language must behave differently on Windows 11.

jan-de-haan commented 1 month ago

One thing perhaps worth trying: The compatiblity mode with older Windows versions.