msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.25k stars 1.21k forks source link

Meld crashes #2653

Closed ArekPiekarz closed 6 years ago

ArekPiekarz commented 7 years ago

Summary: Comparing in Meld doesn't work, because it cannot find g_getenv.

Additional info: Package version mingw64/mingw-w64-x86_64-meld3 3.16.4-1

Steps to reproduce:

  1. Launch meld from terminal.
  2. Click "File comparison" in the middle.
  3. Click "Blank comparison" below.

Expected result: Meld should show two empty columns to insert text to compare.

Actual result: Nothing happens in the GUI while it the terminal the errors below are printed.

(Note that some parts are in Polish, I tried changing the language to English by exporting LC_ALL and LANG environment variables set both to en_US.UTF-8 or C, without success. Translation: "Nie mo▒na odnale▒▒ okre▒lonego modu▒u" means "Cannot find given module" "Nie można odnaleźć określonej procedury." means "Cannot find given procedure.")

The error log:

$ meld Couldn't bind the translation domain. Some translations won't work. [Error 126] Nie mo▒na odnale▒▒ okre▒lonego modu▒u Traceback (most recent call last): File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/sourceview.py", line 155, in init self.on_setting_changed(meldsettings, 'style-scheme') File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/sourceview.py", line 181, in on_setting_changed "meld:current-line-highlight", "background") File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 193, in colour_lookup_with_fallback base_style = get_base_style_scheme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 158, in get_base_style_scheme env_theme = GLib.getenv('GTK_THEME') GLib.Error: g-invoke-error-quark: Could not locate g_getenv: 'g_getenv': Nie można odnaleźć określonej procedury. (1) Traceback (most recent call last): File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/sourceview.py", line 155, in init self.on_setting_changed(meldsettings, 'style-scheme') File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/sourceview.py", line 181, in on_setting_changed "meld:current-line-highlight", "background") File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 193, in colour_lookup_with_fallback base_style = get_base_style_scheme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 158, in get_base_style_scheme env_theme = GLib.getenv('GTK_THEME') GLib.Error: g-invoke-error-quark: Could not locate g_getenv: 'g_getenv': Nie można odnaleźć określonej procedury. (1) Traceback (most recent call last): File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/sourceview.py", line 155, in init self.on_setting_changed(meldsettings, 'style-scheme') File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/sourceview.py", line 181, in on_setting_changed "meld:current-line-highlight", "background") File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 193, in colour_lookup_with_fallback base_style = get_base_style_scheme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 158, in get_base_style_scheme env_theme = GLib.getenv('GTK_THEME') GLib.Error: g-invoke-error-quark: Could not locate g_getenv: 'g_getenv': Nie można odnaleźć określonej procedury. (1) Traceback (most recent call last): File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/diffmap.py", line 46, in init self.on_setting_changed(meldsettings, 'style-scheme') File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/diffmap.py", line 78, in on_setting_changed self.fill_colors, self.line_colors = get_common_theme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 213, in get_common_theme "insert": lookup("meld:insert", "background"), File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 193, in colour_lookup_with_fallback base_style = get_base_style_scheme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 158, in get_base_style_scheme env_theme = GLib.getenv('GTK_THEME') GLib.Error: g-invoke-error-quark: Could not locate g_getenv: 'g_getenv': Nie można odnaleźć określonej procedury. (1) Traceback (most recent call last): File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/diffmap.py", line 46, in init self.on_setting_changed(meldsettings, 'style-scheme') File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/diffmap.py", line 78, in on_setting_changed self.fill_colors, self.line_colors = get_common_theme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 213, in get_common_theme "insert": lookup("meld:insert", "background"), File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 193, in colour_lookup_with_fallback base_style = get_base_style_scheme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 158, in get_base_style_scheme env_theme = GLib.getenv('GTK_THEME') GLib

Additionally when Meld closes, it prints these errors:

.Error: g-invoke-error-quark: Could not locate g_getenv: 'g_getenv': Nie można odnaleźć określonej procedury. (1) Traceback (most recent call last): File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/newdifftab.py", line 128, in on_button_new_blank_clicked tab = self.diff_methodsself.diff_type File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/meldwindow.py", line 691, in append_filediff doc = filediff.FileDiff(len(files)) File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/filediff.py", line 227, in init self.set_num_panes(num_panes) File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/filediff.py", line 1789, in set_num_panes w.associate(self, self.textview[i], self.textview[i + 1]) File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/linkmap.py", line 45, in associate self.on_setting_changed(meldsettings, 'style-scheme') File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/linkmap.py", line 49, in on_setting_changed self.fill_colors, self.line_colors = get_common_theme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 213, in get_common_theme "insert": lookup("meld:insert", "background"), File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 193, in colour_lookup_with_fallback base_style = get_base_style_scheme() File "D:/app/msys64/mingw64/lib/python2.7/site-packages/meld/misc.py", line 158, in get_base_style_scheme env_theme = GLib.getenv('GTK_THEME') GLib.Error: g-invoke-error-quark: Could not locate g_getenv: 'g_getenv': Nie można odnaleźć określonej procedury. (1)

lazka commented 7 years ago

It's a glib 64bit only issue and is fixed in upstream master. Should be in glib 2.54.

The i686 version should work (or at least not fail in this way..)

https://bugzilla.gnome.org/show_bug.cgi?id=780634

ArekPiekarz commented 7 years ago

@lazka Thanks for info, the i686 version crashes when the same steps as above are executed, error log:

$ /mingw32/bin/meld Couldn't bind the translation domain. Some translations won't work. [Error 126] Nie mo▒na odnale▒▒ okre▒lonego modu▒u Couldn't find colour scheme details for meld:current-line-highlight-background; this is a bad install

mati865 commented 7 years ago

Both 32 bit and 64 bit versions of meld work for me despite the error, output from 64 bit:

MINGW64 ~
$ meld
Couldn't bind the translation domain. Some translations won't work.
[Error 126] Nie mo▒na odnale▒▒ okre▒lonego modu▒u

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(python2.exe:1744): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

Probably there is some dependency missing.

lazka commented 7 years ago

I can reproduce the problem when starting meld, selecting "Version control view" and clicking the "Compare" button.

mati865 commented 7 years ago

Okay, reproduced with updated packages.

mati865 commented 7 years ago

I don't see what is wrong:

$ for file in /mingw64/bin/*.dll; do if [[ $(nm "$file" | grep 'g_getenv') == *g_getenv"* ]]; then printf "$file\n"; nm "$file" | grep 'g_getenv'; fi; done
...
/mingw64/bin/libatk-1.0-0.dll
0000000062962728 I __imp_g_getenv_utf8
/mingw64/bin/libclutter-1.0-0.dll
0000000067b1bf70 I __imp_g_getenv_utf8
/mingw64/bin/libcogl-20.dll
000000006919de6c I __imp_g_getenv_utf8
/mingw64/bin/libenchant.dll
000000006bc4f758 I __imp_g_getenv_utf8
/mingw64/bin/libgdk_pixbuf-2.0-0.dll
000000006536ce6c I __imp_g_getenv_utf8
/mingw64/bin/libgdk-3-0.dll
0000000070f79b10 I __imp_g_getenv_utf8
/mingw64/bin/libgee-0.8-2.dll
000000006c2757d8 I __imp_g_getenv_utf8
/mingw64/bin/libgio-2.0-0.dll
000000006d6d1df8 I __imp_g_getenv_utf8
/mingw64/bin/libgirepository-1.0-1.dll
0000000065ef7c5c I __imp_g_getenv_utf8
/mingw64/bin/libgitg-1.0-0.dll
0000000062708e40 I __imp_g_getenv_utf8
/mingw64/bin/libglade-2.0-0.dll
000000006b0d90e4 I __imp_g_getenv_utf8
/mingw64/bin/libgladeui-2-6.dll
0000000070427924 I __imp_g_getenv_utf8
/mingw64/bin/libglibmm-2.4-1.dll
000000006651a8d8 I __imp_g_getenv_utf8
/mingw64/bin/libgmodule-2.0-0.dll
000000006dd0a2f0 I __imp_g_getenv_utf8
/mingw64/bin/libgobject-2.0-0.dll
0000000063a8b824 I __imp_g_getenv_utf8
/mingw64/bin/libgstcheck-1.0-0.dll
0000000063b69270 I __imp_g_getenv_utf8
/mingw64/bin/libgstgl-1.0-0.dll
00000000620d32c8 I __imp_g_getenv_utf8
/mingw64/bin/libgstnet-1.0-0.dll
000000006fa99c18 I __imp_g_getenv_utf8
/mingw64/bin/libgstpbutils-1.0-0.dll
000000006b9b01ac I __imp_g_getenv_utf8
/mingw64/bin/libgstplayer-1.0-0.dll
0000000066d1aaac I __imp_g_getenv_utf8
/mingw64/bin/libgstreamer-1.0-0.dll
00000000615559c0 I __imp_g_getenv_utf8
/mingw64/bin/libgsttag-1.0-0.dll
000000006c0c0f94 I __imp_g_getenv_utf8
/mingw64/bin/libgtk-3-0.dll
0000000066a4348c I __imp_g_getenv_utf8
/mingw64/bin/libgtkreftestprivate-0.dll
00000000613ca6ec I __imp_g_getenv_utf8
/mingw64/bin/libgtkspell-0.dll
00000000701cc728 I __imp_g_getenv_utf8
/mingw64/bin/libgtkspell3-2-0.dll
0000000070d4d880 I __imp_g_getenv_utf8
/mingw64/bin/libgtkspell3-3-0.dll
000000006b68d860 I __imp_g_getenv_utf8
/mingw64/bin/libgtk-win32-2.0-0.dll
0000000061b246e0 I __imp_g_getenv_utf8
/mingw64/bin/libjson-glib-1.0-0.dll
00000000654a5c70 I __imp_g_getenv_utf8
/mingw64/bin/libpango-1.0-0.dll
00000000655bd86c I __imp_g_getenv_utf8
/mingw64/bin/libpeas-1.0-0.dll
0000000067f14ae4 I __imp_g_getenv_utf8
/mingw64/bin/libpidgin.dll
000000006b1a5ac0 I __imp_g_getenv_utf8
/mingw64/bin/libpurple.dll
0000000064df6668 I __imp_g_getenv_utf8
D:\msys64\mingw64\bin\nm.exe: D:/msys64/mingw64/bin/libpython2.7.dll: no symbol
D:\msys64\mingw64\bin\nm.exe: D:/msys64/mingw64/bin/libpython3.6m.dll: no symbos
/mingw64/bin/librsvg-2-2.dll
0000000068e77290 I __imp_g_getenv_utf8
/mingw64/bin/libsecret-1-0.dll
00000000675892d8 I __imp_g_getenv_utf8
/mingw64/bin/libwebkitgtk-3.0-0.dll
000000006a3c1bb8 I __imp_g_getenv_utf8
/mingw64/bin/libymsg.dll
0000000064f7b81c I __imp_g_getenv_utf8
$ for file in /mingw64/lib/*.dll.a; do if [[ $(nm "$file" | grep 'g_getenv') == *"g_getenv"* ]]; then printf "$file\n"; nm "$file" | grep 'g_getenv'; fi; done
/mingw64/lib/libglib-2.0.dll.a
0000000000000000 I __imp_g_getenv_utf8
0000000000000000 T g_getenv_utf8
lazka commented 7 years ago

I don't think the last error is related to getenv. Next glib will also expose g_getenv without the utf8 suffix so it matches with the GIR data and can be looked up by bindings, so that this works: python2 -c "from gi.repository import GLib;GLib.getenv('foo')"

tylorr commented 7 years ago

I just installed the 64bit version of Meld and am getting the same errors as the original poster, is there any progress on this issue or a possible work around?

fabiangreffrath commented 6 years ago

This fixes the issue for me:

 cp /mingw32/share/meld/styles/meld-base.xml /mingw32/share/meld/styles/meld-dark.xml /mingw32/share/gtksourceview-3.0/styles
mikofski commented 6 years ago

@fabiangreffrath yes, that did the trick! Except for me I'm in mingw64 so

cp /mingw64/share/meld/styles/meld-base.xml /mingw64/share/gtksourceview-3.0/styles
cp /mingw64/share/meld/styles/meld-dark.xml /mingw64/share/gtksourceview-3.0/styles

I'm still getting a Python 3 traceback on line 315

Traceback (most recent call last):
  File "C:/Users/mikm/AppData/Local/msys64/mingw64/bin/meld", line 315, in structured_log_adapter
    message = GLib.log_writer_format_fields(level, fields, True)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 105: invalid start byte

Also if I use meld . in a git repo, no luck, even with git install using pacman. But of course these are different issues!

Thanks!

galkinvv commented 6 years ago

About last traceback in structured_log_adapter - it appears on meld running over pygobject-win32 too and is mostly harmless (except that log messages are loosed). I'm using meld with those messages for several months. This exception raises in log writing callback and execution continues normally.

Also after installing both mingw-w64-x86_64-meld3 and git via pacman I found /mingw64/bin/meld . in a simple git repository has a big problems - (repository view opens sometime s empty and double clicking on file fails)

But if git for windows is installed in windows PATH (like C:\Program Files\Git\cmd\git.exe ) and meld is executed from cmd like D:\apps\msys2\mingw64\bin\python3.exe D:\apps\msys2\mingw64\bin\meld . repository view works fine

lazka commented 6 years ago

I think #3882 by @galkinvv fixed the style related errors and the above workarounds are no longer needed.

the gio criticals and the logging errors are still there though.

lazka commented 6 years ago

Since @galkinvv is now active upstream, I think we can close this. Thanks everyone!

ComputingFroggy commented 3 years ago

I am still affected by this bug running meld through git bash ! When I run meld on windows shell, I do not get any error messages.

Biswa96 commented 3 years ago

What error are you seeing?

ComputingFroggy commented 3 years ago

many lines like that one: _2021-03-17 23:56:33,748 CRITICAL Gtk: (org.gnome.meld:7288): GLib-GIO-CRITICAL **: 23:56:33.748: g_content_type_isa: assertion 'type != NULL' failed