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

[Windows] Glutin loads an unrelated libEGL.dll from the other app #1292

Closed
syrel opened this issue Apr 15, 2020 · 0 comments · Fixed by #1293
Closed

[Windows] Glutin loads an unrelated libEGL.dll from the other app #1292

syrel opened this issue Apr 15, 2020 · 0 comments · Fixed by #1293

Comments

@syrel
Copy link

syrel commented Apr 15, 2020

Hi 😃

A glutin based app was crashing for one of the users on Windows 10.
While debugging it, we noticed that there were unrelated library loads:

C:\Program Files\OtherUserApp\bin\pc-win64\libEGL.dll
C:\Program Files\OtherUserApp\bin\pc-win64\libGLESv2.dll

The flow which causes this load is:
build_headless (glutin_sys) -> new_headless -> EGL lazy static -> LoadLibrary

In new_headless, if no windowed sharing was specified, it tries to load libEGL.dll from the load path, which in user's case was in PATH from another program, and it led to a crash later on.

The library is defined here:

let paths = vec!["libEGL.dll", "atioglxx.dll"];

Windows guides suggest that when performing a dynamic loading we should search dynamic libraries within the app (relative) and/or rely on absolute paths for safety (https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order).

Would it be possible to update library path in egl/mod.rs to relative within the glutin app?

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants