Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS segfault in get_default_conf_dirs #3771

Closed
totaam opened this issue Feb 21, 2023 · 3 comments
Closed

MacOS segfault in get_default_conf_dirs #3771

totaam opened this issue Feb 21, 2023 · 3 comments
Labels
bug Something isn't working macos packaging

Comments

@totaam
Copy link
Collaborator

totaam commented Feb 21, 2023

Could well be related to #3770.

When running from the bundled application, it segfaults.
When running from a jhbuild shell:

$ python3 -c "from xpra.platform.paths import get_default_conf_dirs;print(get_default_conf_dirs())"

** (process:53532): WARNING **: 21:53:03.180: Failed to load shared library 'libpango-1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/paths.py", line 83, in get_default_conf_dirs
    return envaslist_or_delegate("XPRA_DEFAULT_CONF_DIRS", do_get_default_conf_dirs)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/paths.py", line 29, in envaslist_or_delegate
    return impl(*args)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/darwin/paths.py", line 75, in do_get_default_conf_dirs
    return [os.path.join(get_resources_dir(), "etc", "xpra")]
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/paths.py", line 199, in get_resources_dir
    return env_or_delegate("XPRA_RESOURCES_DIR", do_get_resources_dir)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/paths.py", line 34, in env_or_delegate
    return impl(*args)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/darwin/paths.py", line 27, in do_get_resources_dir
    macapp = get_OSXApplication()
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/xpra/platform/darwin/__init__.py", line 39, in get_OSXApplication
    from gi.repository import GtkosxApplication #@UnresolvedImport
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 672, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 632, in _load_backward_compatible
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/Users/macos/gtk/inst/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 672, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 632, in _load_backward_compatible
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/Users/macos/gtk/inst/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 672, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 632, in _load_backward_compatible
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/importer.py", line 144, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/Users/macos/gtk/inst/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 672, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 632, in _load_backward_compatible
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/importer.py", line 145, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/Users/macos/gtk/inst/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/overrides/Pango.py", line 41, in <module>
    FontDescription = override(FontDescription)
  File "/Users/macos/gtk/inst/lib/python3.10/site-packages/gi/overrides/__init__.py", line 195, in override
    assert g_type != TYPE_NONE
AssertionError

assert g_type != TYPE_NONE, we meet again: Xpra-org/gtk-osx-build#21

@totaam totaam added bug Something isn't working packaging macos labels Feb 21, 2023
@totaam
Copy link
Collaborator Author

totaam commented Feb 22, 2023

Probably caused by jralls/gtk-osx-build@9008438 which contains:
Unfortunately there's no way to get the config object from the project to find out if we're building python3. We test the modules list here but that's not really reliable because python3 might be pulled in as a dependency by another module

https://github.com/jralls/gtk-osx-build/blob/db1c8631d2c2ac2f8097a4de6bf7c47add6dfb35/jhbuildrc-gtk-osx#L623-L626

So this should make it all better: Xpra-org/gtk-osx-build@2cc47e1

@totaam
Copy link
Collaborator Author

totaam commented Feb 23, 2023

Was probably cause by pyobjc, fixed by downgrading back to v8.2: a0a7e22

@totaam totaam closed this as completed Feb 23, 2023
@totaam
Copy link
Collaborator Author

totaam commented Jul 18, 2023

The more likely explanation is this mess: Xpra-org/gtk-osx-build#22 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos packaging
Projects
None yet
Development

No branches or pull requests

1 participant