After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784337 - win32 relocatability behaves unexpectedly when the application path contains a "bin" folder
win32 relocatability behaves unexpectedly when the application path contains ...
Status: RESOLVED DUPLICATE of bug 739835
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-29 13:58 UTC by Zack Snyder
Modified: 2017-09-16 13:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Zack Snyder 2017-06-29 13:58:59 UTC
Gstreamer doesnt work correctly when the application path contains a folder named: "bin".

It doesn't matter where the bin folder is in the application path e.g.: "C:\my_path\is\here\bin\app.exe" or "C:\bin\my_path\is\here\app.exe"
When there is a "bin" folder the application will not work anymore.

You could set the "GST_PLUGIN_PATH", which is of course a workaround only.
And doesn't work in further code calls:
When I did later a call to `gst_discoverer_discover_uri`, the application blocked for unknown reason (when I removed my app from the "bin" subfolder everything worked again)

GStreamer should always search first, relative to the gstreamer DLL location
For example:
Module path: "C:\my_path\is\here\bin\libgstreamer-1.0-0.dll"
First try this plugin path: "C:\my_path\is\here\bin\lib\gstreamer-1.0\"

The gstreamer applications like gst-discoverer-1.0.exe and gst-launch-1.0.exe should be portable applications, but in fact they aren't because of this limitation...

This is an absolute intuitive behavior, which needs to be fixed.

PS: I don't know whether this is a windows only bug.
Comment 1 Sebastian Dröge (slomo) 2017-06-29 14:13:08 UTC
This is Windows-only and behaviour caused by g_win32_get_package_installation_directory_of_module(). It considers the installation directory the one that is the parent directory of the DLL after skipping all "bin" and "lib" directories.

Adding just ../lib/gstreamer-1.0 relative to the parent directory as another, additional search path if it is different from the above and the above is not found could be done. It is important to keep backwards compatibility.


Also this is not really a "major" bug but a feature request. It is all working as documented and you are using a custom directory structure, so first of all you'll have to work around that and probably also run into similar problems with other libraries (e.g. GIO not finding the TLS module).
Comment 2 Eduard Braun 2017-09-16 13:04:28 UTC
This broken behavior was actually introduced in bug 733934.
Discussion on reverting to the documented (and desired) behavior is in bug 739835.

While there are use cases where the current (undocumented) behavior might be desirable it breaks the documented behavior which is expected by a lot of software and should therefore be restored.

As this case highlights even "DLLs that are of the dynamically loaded module or plugin variety are often located in more private locations deeper down in the tree" (to cite the documentation) seem to fail because of the unexpected behavior of g_win32_get_package_installation_directory_of_module that was introduced in the linked bug (which was supposed to fix specifically this case).
Comment 3 Sebastian Dröge (slomo) 2017-09-16 13:32:40 UTC

*** This bug has been marked as a duplicate of bug 739835 ***