Re: Re:meld crashing vnc on starting



Thanks Vasily,


Yes, I was wrong about get_string, the method is defined and I didn't import necessary module while testing yesterday.


>>> from gi.repository import Gio
>>> settings = Gio.Settings.new('org.gnome.meld')
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
>>> settings.get_string('style-scheme')
'classic'

And the classic scheme is not there:

>>> GtkSource.StyleSchemeManager.get_default().get_scheme_ids()
[]
>>> type(GtkSource.StyleSchemeManager.get_default().get_scheme('classic'))
<type 'NoneType'>

And as you have mentioned about GtkSourceView, it seems I need to reinstall it.

Is it safe to uninstall from the source dir and run distclean and make clean install again? I remember GtkSourceView is the last package I have install while installing meld. Of course, later I installed meld tool itself.

And what could be the reason for the themes to be missing?

--
Thanks and Regards,
Jeevan Patnaik B | Project Engineer | HEE Platform | NSN-IT | Ph. No: +919000607181.

 




From: Vasily Galkin <galkin-vv yandex ru>
Sent: 16 June 2016 11:27 PM
To: Jeevan Behara Patnaik (GIS)
Cc: Amit Kumar Singh (GIS); Shashidhar Basavanahally Shivarama R (Product Engineering Service); meld-list gnome org
Subject: Re:meld crashing vnc on starting
 
** This mail has been sent from an external source **

Hi!
It looks like some problems with GtkSourceView theme installation - it hasn't "classic.xml" theme installed or can't find it.

You may try check something like following in the interactive python-on-NFS_share shell to verify the reason. This is output from working install:
Python 2.7.10+ (default, Oct 10 2015, 09:11:24)
[GCC 5.2.1 20151028] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GtkSource
__main__:1: PyGIWarning: GtkSource was imported without specifying a version first. Use gi.require_version('GtkSource', '3.0') before import to ensure that the right version gets loaded.
>>> GtkSource.StyleSchemeManager.get_default().get_scheme('classic')
<StyleScheme object at 0xf6b24cac (GtkSourceStyleScheme at 0x8804b48)>
>>> GtkSource.StyleSchemeManager.get_default().get_search_path()
['/home/galkinvv/.local/share/gtksourceview-3.0/styles', '/usr/local/share/gtksourceview-3.0/styles', '/usr/share/gtksourceview-3.0/styles']
>>> GtkSource.StyleSchemeManager.get_default().get_scheme_ids()
['classic', 'cobalt', 'kate', 'oblivion', 'solarized-dark', 'solarized-light', 'tango']
>>> from gi.repository import Gio
>>> settings = Gio.Settings.new('org.gnome.meld')
>>> settings.get_string('style-scheme')
'classic'

On my system with standard installation I have /usr/share/gtksourceview-3.0/styles/classic.xml file installed by libgtksourceview-3.0-common package (built from libgtksourceview).

Also see some python details in comments below.
> Hi Vasily,
>
> The tool is crashing when I open in servers with RealVNC. So, I have tested in servers with TigerVNC and surprisingly it's not crashing. However, the functionality doesn't work:
>
> When I try to open file comparison and select file, the meld is not crashing, but I can see the error in the background:
>
> ** (meld:25229): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
> Gtk-Message: Failed to load module "pk-gtk-module"
> Gtk-Message: Failed to load module "canberra-gtk-module"
> Gtk-Message: Failed to load module "pk-gtk-module"
> Gtk-Message: Failed to load module "canberra-gtk-module"
> GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
> Traceback (most recent call last):
> File "/NFS_share/meld/meld_3_16_0/lib/python2.7/site-packages/meld/sourceview.py", line 154, in __init__
> self.on_setting_changed(meldsettings, 'style-scheme')
> File "/NFS_share/meld/meld_3_16_0/lib/python2.7/site-packages/meld/sourceview.py", line 180, in on_setting_changed
> "meld:current-line-highlight", "background")
> File "/NFS_share/meld/meld_3_16_0/lib/python2.7/site-packages/meld/misc.py", line 189, in colour_lookup_with_fallback
> style = source_style.get_style(name)
> AttributeError: 'NoneType' object has no attribute 'get_style'
>
> As you can see, source_style seems to be a None object.
>
> def colour_lookup_with_fallback(name, attribute):
> from meld.settings import meldsettings
> source_style = meldsettings.style_scheme
>
> So meldsettings.style_scheme returns None.
>
> The following is the definition (removed unnecessary declarations here):
>
> meldsettings = MeldSettings()
>
> class MeldSettings(GObject.GObject):
> def __init__(self):
> GObject.GObject.__init__(self)
> self.style_scheme = self._style_scheme_from_gsettings()
>
> def _style_scheme_from_gsettings(self):
> manager = GtkSource.StyleSchemeManager.get_default()
> return manager.get_scheme(settings.get_string('style-scheme'))
>
> I am not much into Python. But as you can see meldsettings=MeldSettings() (there is no argument).
>
> But MeldSettings is expecting an argument GObject.GObject in the definition. How can it be?

This declaration means "class derived from GObject", there is no explicit object with GObject value. The "self" argument is

> Ok, let's say argument is not needed and I have done some debugging and found that get_string used in style_scheme_from_gsettings definition is not defined anywhere.
> May be it is due to the warning I am receiving in the beginning:
> ** (meld:25229): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
>
> I found that in a new python shell:
> import meld.settings generates the above error. Is it somehow linked to the get_string method?

settings is Gio.Settings instance and settings.get_string is method of Gio.Settings: https://lazka.github.io/pgi-docs/#Gio-2.0/classes/Settings.html#Gio.Settings.get_string
It is not related to
> ** (meld:25229): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
but can be related to
> GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]