OpenLP on Linux crashes on startup when VLC not installed

Bug #1589675 reported by Raoul Snyman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Committed
Undecided
Tim Bentley

Bug Description

Similar to bug #966086

**OpenLP Bug Report**
Version: {'build': None, 'version': '2.4.1', 'full': '2.4.1'}

--- Details of the Exception. ---

this occurred as OpenLP was opened

 --- Exception Traceback ---
Traceback (most recent call last):
  File "/usr/bin/openlp", line 44, in <module>
    main()
  File "/usr/share/openlp/openlp/core/__init__.py", line 391, in main
    sys.exit(application.run(qt_args))
  File "/usr/share/openlp/openlp/core/__init__.py", line 142, in run
    Registry().execute('bootstrap_initialise')
  File "/usr/share/openlp/openlp/core/common/registry.py", line 137, in execute
    result = function(*args, **kwargs)
  File "/usr/share/openlp/openlp/core/lib/pluginmanager.py", line 60, in bootstrap_initialise
    self.hook_media_manager()
  File "/usr/share/openlp/openlp/core/lib/pluginmanager.py", line 122, in hook_media_manager
    plugin.create_media_manager_item()
  File "/usr/share/openlp/openlp/core/lib/plugin.py", line 204, in create_media_manager_item
    self.media_item = self.media_item_class(self.main_window.media_dock_manager.media_dock, self)
  File "/usr/share/openlp/openlp/plugins/media/lib/mediaitem.py", line 58, in __init__
    super(MediaMediaItem, self).__init__(parent, plugin)
  File "/usr/share/openlp/openlp/core/lib/mediamanageritem.py", line 82, in __init__
    self.setup_item()
  File "/usr/share/openlp/openlp/plugins/media/lib/mediaitem.py", line 90, in setup_item
    self.media_controller.setup_display(self.display_controller.preview_display, False)
  File "/usr/share/openlp/openlp/core/ui/media/mediacontroller.py", line 322, in setup_display
    player.setup(display)
  File "/usr/share/openlp/openlp/core/ui/media/vlcplayer.py", line 157, in setup
    display.vlc_instance = vlc.Instance(command_line_options)
  File "/usr/share/openlp/openlp/core/ui/media/vendor/vlc.py", line 1411, in __new__
    return libvlc_new(len(args), args)
  File "/usr/share/openlp/openlp/core/ui/media/vendor/vlc.py", line 3630, in libvlc_new
    ctypes.c_void_p, ctypes.c_int, ListPOINTER(ctypes.c_char_p))
  File "/usr/share/openlp/openlp/core/ui/media/vendor/vlc.py", line 246, in _Cfunction
    raise NameError('no function %r' % (name,))
NameError: no function 'libvlc_new'

--- System information ---
Platform: Linux-4.2.0-36-generic-i686-with-Ubuntu-15.10-wily
Desktop: GNOME

--- Library Versions ---
Python: 3.4.3+
Qt5: 5.4.2
PyQt5: 5.4.2
QtWebkit: 538.1
SQLAlchemy: 1.0.8
SQLAlchemy Migrate: -
BeautifulSoup: 4.3.2
lxml: 3.4.4
Chardet: 2.3.0
PyEnchant: 1.6.6
Mako: 1.0.2
pyICU: -
pyUNO bridge: 5.0
VLC: -

Related branches

Revision history for this message
Tomas Groth (tomasgroth) wrote :

This seems to be related to how ubuntu packages VLC... Some parts of VLC seems to be installed (by default?) that makes OpenLP think VLC is installed, when it really isn't.

Tim Bentley (trb143)
Changed in openlp:
status: New → Won't Fix
Revision history for this message
Tomas Groth (tomasgroth) wrote :

This is a packaging issue IMO, so it can be fixed!

Changed in openlp:
status: Won't Fix → Confirmed
Tim Bentley (trb143)
Changed in openlp:
status: Confirmed → Invalid
Tim Bentley (trb143)
Changed in openlp:
status: Invalid → Confirmed
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

I just tried to reproduce this on Ubuntu 17.10, and I can't. I tried installing just libvlc, and that only made things worse (the media plugin is now disabled and cannot be enabled). Will fiddle some more.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Right. I just reproduced this multiple times. VLC is not installed, nor is libvlc.

From the Python 3 console, I can import openlp.core.ui.media.vendor.vlc without a problem, but try to do anything and it fails. So we need to actually just try to do something (like get VLC's version) and use that to determine if VLC is installed or not.

Revision history for this message
Tim Bentley (trb143) wrote :

The get_vlc method detects missing VLC then gets ignored!

Tim Bentley (trb143)
Changed in openlp:
assignee: nobody → Tim Bentley (trb143)
status: Confirmed → In Progress
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.9.1
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.