tomboy-notes / tomboy

This is the legacy development for Tomboy.
http://projects.gnome.org/tomboy
GNU Lesser General Public License v2.1
126 stars 25 forks source link

Tomboy won't start after update #51

Closed xdevnullx closed 7 years ago

xdevnullx commented 7 years ago

I'm using OpenSuse Tumbleweed with gnome 3.24. Did an update today and tomboy won't start. I've tried a couple of different start options. I get this error:

`localhost:~> tomboy --start-here

Unhandled Exception: System.Exception: Unable to open the system message bus. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MethodAccessException: Method org.freedesktop.DBus.IBusProxy:.ctor ()' is inaccessible from methodDBus.BusObject:.ctor ()'

at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_throw_method_access (intptr,intptr) at org.freedesktop.DBus.IBusProxy..ctor () [0x00000] in <3ae1aca7551849038560b840177fe3d3>:0 at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in :0 --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in :0 at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in :0 at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in :0 at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in :0 at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in :0 at System.Activator.CreateInstance (System.Type type) [0x00000] in :0 at DBus.BusObject.GetObject (DBus.Connection conn, System.String bus_name, DBus.ObjectPath object_path, System.Type declType) [0x0000d] in :0 at DBus.Connection.GetObject (System.Type type, System.String bus_name, DBus.ObjectPath path) [0x00018] in :0 at DBus.Connection.GetObject[T] (System.String bus_name, DBus.ObjectPath path) [0x00001] in :0 at DBus.Bus..ctor (System.String address) [0x0000f] in :0 at DBus.Bus.Open (System.String address) [0x0002b] in :0 at DBus.Bus.get_System () [0x00035] in :0 --- End of inner exception stack trace --- at DBus.Bus.get_System () [0x00052] in :0 at DBus.BusG.Init () [0x00010] in <77085a3dc5f44644859067a8e615d3d2>:0 at Tomboy.RemoteControlProxy.get_FirstInstance () [0x00011] in <41577299f12845e889e223b5379c708c>:0 at Tomboy.Tomboy.Main (System.String[] args) [0x00042] in <41577299f12845e889e223b5379c708c>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Unable to open the system message bus. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MethodAccessException: Method org.freedesktop.DBus.IBusProxy:.ctor ()' is inaccessible from methodDBus.BusObject:.ctor ()'

at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_throw_method_access (intptr,intptr) at org.freedesktop.DBus.IBusProxy..ctor () [0x00000] in <3ae1aca7551849038560b840177fe3d3>:0 at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in :0 --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in :0 at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in :0 at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in :0 at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in :0 at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in :0 at System.Activator.CreateInstance (System.Type type) [0x00000] in :0 at DBus.BusObject.GetObject (DBus.Connection conn, System.String bus_name, DBus.ObjectPath object_path, System.Type declType) [0x0000d] in :0 at DBus.Connection.GetObject (System.Type type, System.String bus_name, DBus.ObjectPath path) [0x00018] in :0 at DBus.Connection.GetObject[T] (System.String bus_name, DBus.ObjectPath path) [0x00001] in :0 at DBus.Bus..ctor (System.String address) [0x0000f] in :0 at DBus.Bus.Open (System.String address) [0x0002b] in :0 at DBus.Bus.get_System () [0x00035] in :0 --- End of inner exception stack trace --- at DBus.Bus.get_System () [0x00052] in :0 at DBus.BusG.Init () [0x00010] in <77085a3dc5f44644859067a8e615d3d2>:0 at Tomboy.RemoteControlProxy.get_FirstInstance () [0x00011] in <41577299f12845e889e223b5379c708c>:0 at Tomboy.Tomboy.Main (System.String[] args) [0x00042] in <41577299f12845e889e223b5379c708c>:0`

alex-ter commented 7 years ago

Just by the looks of it seems to be some incompatible change in either Mono or maybe DBus C# bindings. Do you by any chance have a list of packages updated?

xdevnullx commented 7 years ago

I'm attaching a file. It's was a big update. zypper.6.5.2017.txt

xdevnullx commented 7 years ago

BTW, the current mono I see is 5.0.1-1.1. There were a lot of changes because they moved to GCC 7. Should I try to roll back to an earlier version of mono?

alex-ter commented 7 years ago

Yes, that's also an option. Sorry I haven't had time to look into this yet.

dfaour commented 7 years ago

Just want to confirm that I am also experiencing the same error as xdevnullx on openSUSE Tumbleweed after a recent update. I too am on mono 5.0.1-1.1.

xdevnullx commented 7 years ago

Have you considered making a snap package or flatpack?

alex-ter commented 7 years ago

Nope, the original project philosophy was to distribute only sources for Linux, to have distro maintainers do their proper magic to build. Nowadays, given much less resources (and I struggle to find time for the last several weeks), getting into self-packaging looks even less probable.

If someone however would want to pick this idea and start packaging Tomboy in a distro-agnostic way, that would be quite nice.

alex-ter commented 7 years ago

Looking into this now. Most probably that's caused by the Mono major version update and potential incompatibility, but we'll see.

alex-ter commented 7 years ago

\<sidenote> And @xdevnullx, actually after reading some more about flatpak, I'm interested! :) Thanks for mentioning this, I thought once about using something like Docker for packaging, but that looked just like an overkill. Flatpak looks much more appropriate and I didn't know about it.

We'll see how this works out time-wise, but it seems to be a nice solution for providing an up-to-date Tomboy build for Linux users and skipping (making their life easier? :)) distro maintainers.

I've created #55 for tracking this idea. \</sidenote>

xdevnullx commented 7 years ago

Splendid. I hope it works out well.

-- Brennen bg@june94.com

On Tue, Jul 11, 2017, at 11:24, Alex Tereschenko wrote:

And @xdevnullx[1], actually after reading some more about flatpak, I'm interested! :) Thanks for mentioning this, I thought once about using something like Docker for packaging, but that looked just like an overkill. Flatpak looks much more appropriate and I didn't know about it.> We'll see how this works out time-wise, but it looks to be a nice solution for providing an up-to-date Tomboy build for Linux users and skipping (makeing their life easier? :)) distro maintainers.>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[2], or mute the thread[3]. >

Links:

  1. https://github.com/xdevnullx
  2. https://github.com/tomboy-notes/tomboy/issues/51#issuecomment-314530664
  3. https://github.com/notifications/unsubscribe-auth/ATshdfDiN-MxZzIAyomdBs7pg-Ydq9enks5sM73FgaJpZM4NwpQY
alex-ter commented 7 years ago

So back to the original issue - looks like this is a dbus-sharp problem, which affects several other programs, see investigation here: https://bugzilla.xamarin.com/show_bug.cgi?id=53154. And started with Mono 4.8, so major version update is not relevant.

alex-ter commented 7 years ago

Some further research and looks like newer dbus-sharp version fixes this. It turns out Tumbleweed has two versions of dbus-sharp package available - 0.7.0 (as dbus-sharp) and 0.8.1 (as dbus-sharp2, due to API major version change). The latter one works fine with the latest Mono, the former one causes this error and AFAICS Tomboy is being built against the older one.

I've just tried to build it manually against dbus-sharp2 on an up-to-date Tumbleweed VM - it starts just fine after that. In fact, Ubuntu 16.04+ has the same Mono/dbus-sharp version set and it's just that they've updated the Tomboy spec file in their build system to require the "2.0" version of dbus-sharp at some point.

So @xdevnullx, the solution here would be to ask openSUSE maintainers to update their RPM build file and use dbus-sharp2 (and dbus-sharp-glib2) as dependencies, instead of current dbus-sharp and dbus-sharp-glib. Let me also try to @-mention @DimStar77, who seems to be the package maintainer in openSUSE Factory, hopefully he could take a look right away or advise on the best course of action.

DimStar77 commented 7 years ago

Thanks for the mention - fix is submitted: https://build.opensuse.org/request/show/510928

alex-ter commented 7 years ago

Oh, that's wonderful, thanks, @DimStar77!

xdevnullx commented 7 years ago

Thanks @DimStar77 and @alex-ter for your work on this. When I see it pop into the Tumbleweed repos I'll report back.

huwie-blue commented 7 years ago

I can confirm that Tomboy version 1.15.8 is now in Tumbleweed and works again. Many thanks to you all!

xdevnullx commented 7 years ago

I can confirm that it is working again as well.

alex-ter commented 7 years ago

Great, thanks for getting back to confirm!

alexbk66 commented 5 years ago

Problem is in Mono.Zeroconf.Providers.AvahiDBus https://github.com/mono/Mono.Zeroconf I fixed the problem by making the class public public class BusObject, because the constructor was public, but class itself wasn't:

namespace NDesk.DBus
{
    public class BusObject
    {
        protected Connection conn;
        string bus_name;
        ObjectPath object_path;

        //protected BusObject ()
        public BusObject ()
        {
        }