[ASIM-6857] Further improve error message when failing to load plugins - #189
Open
nicoddemus wants to merge 1 commit into
Open
[ASIM-6857] Further improve error message when failing to load plugins#189nicoddemus wants to merge 1 commit into
nicoddemus wants to merge 1 commit into
Conversation
nicoddemus
force-pushed
the
fb-ASIM-6857-improve-dll-error-message
branch
from
August 25, 2026 14:40
e619d3c to
fee3702
Compare
nicoddemus
marked this pull request as ready for review
August 25, 2026 14:55
BeneBr
approved these changes
Aug 27, 2026
When a plugin shared library fails to load, hookman now captures a
diagnostic explaining the DLL search environment at load time: the
effective PATH/LD_LIBRARY_PATH entries, the directories registered via
os.add_dll_directory, and any library bundled with the plugin that is
shadowed by a same-named file earlier in the search path. This is
exactly the information that took manual investigation to find in
ASIM-6769 ("Error 127 loading scaling.dll"): an anaconda3 directory
earlier on PATH shadowed the plugin's own bundled splog.dll.
- hookman.dll_diagnostics.LoadDiagnostics (frozen dataclass):
shadowed_libraries, registered_dll_directories, path_entries,
collection_error. str(diagnostics) renders a human-readable block;
callers that want to act on the diagnosis can inspect the fields
directly instead of parsing text back apart.
- LoadDiagnostics.collect(shared_lib_path) is a classmethod that
gathers this, never raising (any internal failure is captured in
collection_error so it can never mask the original load error).
- SharedLibraryLoadError.diagnostics / PluginLoadFailure.diagnostics
are LoadDiagnostics | None (None when no load was attempted).
- The generated C++ HookCaller::load_impls_from_library raises the same
information on Windows, and reports dlerror() plus LD_LIBRARY_PATH on
Linux; the diagnostics search itself reads LD_LIBRARY_PATH on POSIX
and PATH on Windows.
- New tests/test_dll_diagnostics.py covers the diagnostics module in
isolation; existing hookman_utils/hooks tests extended for the new
field.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nicoddemus
force-pushed
the
fb-ASIM-6857-improve-dll-error-message
branch
from
August 27, 2026 12:43
213aa57 to
5e2171c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to ASIM-6677 (#185): a plugin DLL load failure now carries a structured
diagnostic, which is used by the GUI to display it alongside the plugin panel.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com