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 753564 - Gst.init isn't called when checking for dependencies.
Gst.init isn't called when checking for dependencies.
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: Build and packaging
Git
Other Linux
: Normal normal
: Git
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-12 15:27 UTC by Christian Mutti
Modified: 2015-10-20 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Workaround for the Gst.init error on latest git enviroment. (439 bytes, patch)
2015-08-12 15:27 UTC, Christian Mutti
none Details | Review

Description Christian Mutti 2015-08-12 15:27:39 UTC
Created attachment 309164 [details] [review]
Workaround for the Gst.init error on latest git enviroment.

Whenever i try building from source I get an error saying: "Please call Gst.init(argv) before using GStreamer".

Traceback (most recent call last):
  • File "bin/pitivi", line 146 in <module>
    _check_requirements()
  • File "bin/pitivi", line 128 in _check_requirements
    if not check_requirements():
  • File "/home/cmutti/pitivi-git/pitivi/pitivi/check.py", line 219 in check_requirements
    dependency.check()
  • File "/home/cmutti/pitivi-git/pitivi/pitivi/check.py", line 81 in check
    formatted_version = self._format_version(self.component)
  • File "/home/cmutti/pitivi-git/pitivi/pitivi/check.py", line 171 in _format_version
    return list(module.version())
  • File "/home/cmutti/pitivi-git/gst-python/gi/overrides/Gst.py", line 346 in fake_method
    raise NotInitialized("Please call Gst.init(argv) before using GStreamer") gi.overrides.Gst.NotInitialized: Please call Gst.init(argv) before using GStreamer


I tracked the error to the last commit made to the git repository(commit 59f9eb0e7981a167bf2e26472769336ed0aafb14), where the _check_requirements() and _initialize_modules() orders are swapped. Changing to initialize the modules first result in pitivi working as intended.

Attaching a diff with the workaround I'm using, not sure if it's the best option.
Comment 1 Alex Băluț 2015-08-12 15:47:28 UTC
The https://git.gnome.org/browse/pitivi/commit/?id=59f9eb0e7981a167bf2e26472769336ed0aafb14 commit should not have been made, it should be reverted (at least the switching of _initialize_modules and _check_requirements). Currently if _initialize_modules fails it prints the error and raises it. We could store the exception it raises and raise it after we call _check_requirements (in case _check_requirements did not raise anything). I imagine the goal is to always run _check_requirements, to get a detailed message if some dependency is not up to date.
Comment 2 Thibault Saunier 2015-08-12 16:06:23 UTC
That commit makes sense we were trying to initialize module and then were checking if those were present on the system...

I do not understand why we do check and initialization in 2 passes actually?
Comment 3 Alex Băluț 2015-08-12 18:30:26 UTC
Because if the modules are not initialized in a specific order some bugs appear. It might not be the case anymore, ask Mathieu.
Comment 4 Thibault Saunier 2015-08-16 22:06:54 UTC
Just reverted the commit for now until we find the proper fix.

commit 5d2278e25c157d4e5e1982a0a2b3d70e7c4cef1b
Author: Thibault Saunier <tsaunier@gnome.org>
Date:   Mon Aug 17 00:05:04 2015 +0200

    Revert "bin: Check dependencies before initializing them"
    
    This reverts commit 59f9eb0e7981a167bf2e26472769336ed0aafb14.
    
    This commit leaded to:
    
      raise NotInitialized("Please call Gst.init(argv)
          before using GStreamer")
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753564
Comment 5 Thibault Saunier 2015-10-20 13:34:21 UTC
Fixed