3.22.1 crashes on Windows

Hello,

Yesterday I upgraded to 3.22.1 on Windows (thru scoop).
Trying to run Meld showed nothing - no errors, no dialogs, no running app.

Later I unstalled it and re-installed it using the official installer - “Meld-3.22.1-mingw.msi”, with the same results.

The “meld.log” contains

2024-02-19 19:58:33,881 ERROR root: Unhandled exception
Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 124, in run
  File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 16, in run
  File "bin/meld", line 462, in <module>
  File "bin/meld", line 454, in main
  File "bin/meld", line 253, in check_requirements
  File "bin/meld", line 220, in check
  File "C:/msys64/MINGW64/lib/python3.11/importlib/__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "C:/msys64/MINGW64/lib/python3.11/site-packages/gi/importer.py", line 146, in create_module
  File "C:/msys64/MINGW64/lib/python3.11/importlib/__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "C:/msys64/MINGW64/lib/python3.11/site-packages/gi/importer.py", line 146, in create_module
  File "C:/msys64/MINGW64/lib/python3.11/importlib/__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "C:/msys64/MINGW64/lib/python3.11/site-packages/gi/importer.py", line 147, in create_module
  File "C:/msys64/MINGW64/lib/python3.11/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
  File "C:/msys64/MINGW64/lib/python3.11/importlib/__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 944, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:/msys64/MINGW64/lib/python3.11/site-packages/gi/overrides/Pango.py", line 41, in <module>
  File "C:/msys64/MINGW64/lib/python3.11/site-packages/gi/overrides/__init__.py", line 195, in override
AssertionError

Runnin “MeldConsole.exe” in the console directly in its folder gives a bit more understandable (for me) error:

** (process:5352): WARNING **: 19:58:33.877: Failed to load shared library 'libpango-1.0-0.dll' referenced by the typelib: 'libpango-1.0-0.dll': The specified module could not be found.
1 Like

Hi,

Can you please try this from a console:

set PYTHONLEGACYWINDOWSDLLLOADING=1
MeldConsole.exe

I suspect the error is related to a recent change in the Python stack in msys2. We may now have to put all the DLLs in the same directory as Meld*.exe

C:\Tools\Meld>set PYTHONLEGACYWINDOWSDLLLOADING=1

C:\Tools\Meld>MeldConsole.exe

** (process:11612): WARNING **: 19:26:03.672: Failed to load shared library 'libpango-1.0-0.dll' referenced by the typelib: 'libpango-1.0-0.dll': The specified module could not be found.

C:\Tools\Meld>echo %PYTHONLEGACYWINDOWSDLLLOADING%
1

C:\Tools\Meld>

No difference, unfortunately.

… We may now have to put all the DLLs in the same directory as Meld*.exe

Yeah, that works.

1 Like

If I’m reading the docs correctly, this looks like it might just be a matter of adding os.add_dll_directory(os.path.join(melddir, "lib")) to the frozen() method of our conf.py.in file, though I won’t get a chance to test that until later in the week. There’s also the gdk-pixbuf loader DLLs but I assume that they’re handled by gdk-pixbuf itself.

1 Like

There’s only a few dlls left, only a few, 36 actually. :smiley:

Installation of previous Meld version helped.

Took it here
https://download.gnome.org/binaries/win32/meld/3.21/

1 Like

I have the exact same problem.

@orenatol how did you find this meld.log?

I have spent a bit of time trying to figure out what changed in cx_Freeze and why this has broken, but gave up. This MR is a brute-force “fix” that appears to work for me. If others could test it and report back that would be fantastic.

Really, Meld needs a Windows maintainer and probably needs a revamp of the build system, most likely moving away from relying on cx_Freeze (even though it’s been fairly good to us) to something that is easier to integrate with Meson builds.

Thanks @Dkavaliou, that worked for me too.

Meld 3.22.2 is out now with a fix for this.

2 Likes