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

Fails to launch > 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 `DBus.BusObject:.ctor ()' is inaccessible from method `org.freedesktop.DBus.IBusProxy:.ctor ()' #105

Open shiznix opened 5 years ago

shiznix commented 5 years ago

Tomboy still fails to launch as previously mentioned in issues #44 #51 and #87 These issues were all closed with the only resolution being that it started working again after an unknown system update.

Because it didn't magically fix itself for my system I've had to do some digging to find the culprit.

The error occurs because Tomboy building against old dbus-sharp-1.0 and dbus-sharp-glib-1.0, only works if the system is using mono-4.4 (possibly also 4.6?) and lower versions. If the system has mono-4.8 or higher, then Tomboy must be built using dbus-sharp-2.0 and dbus-sharp-glib-2.0.

Currently, Tomboy will default to use dbus-sharp-1.0 even if both 1.0 and 2.0 versions are present.

Am using the following patch to workaround by explicitly using dbus-sharp-2.0 and dbus-sharp-glib-2.0:

diff -urN tomboy-1.15.9/configure.ac tomboy-1.15.9-patched/configure.ac --- tomboy-1.15.9/configure.ac 2017-06-03 22:50:05.000000000 +0930 +++ tomboy-1.15.9-patched/configure.ac 2018-12-09 22:04:15.661561631 +1030 @@ -173,9 +173,7 @@ # # Check for dbus-sharp # -PKG_CHECK_MODULES([DBUS], [dbus-sharp-1.0 >= 0.4 dbus-sharp-glib-1.0 >= 0.3],, [ - PKG_CHECK_MODULES([DBUS], [dbus-sharp-2.0 >= 0.4 dbus-sharp-glib-2.0 >= 0.3]) -]) +PKG_CHECK_MODULES([DBUS], [dbus-sharp-2.0 >= 0.4 dbus-sharp-glib-2.0 >= 0.3]) AC_SUBST(DBUS_LIBS)

#

Once this is fixed, Tomboy will still fail to launch but that is due to Mono's bug at https://github.com/mono/mono/issues/6752

Thanks :)

davidbannon commented 5 years ago

I don't think its likely anyone is going to take on bringing Tomboy up to date. Maybe you need to consider tomboy-ng ? While you can build it yourself quite easily, its also available as a ready to run binary, its a lot smaller than a Tomboy install and, perhaps, as stable if not more so. Davo

shiznix commented 5 years ago

Thanks Davo. I had a look at tomboy-ng but when it failed to build I read https://wiki.gnome.org/Apps/Tomboy/tomboy-ng that states tomboy-ng is not ready, has bugs and shouldn't be used "if your notes are precious to you".

Which in turn gave to thinking that Tomboy is being maintained as the stable notes package until tomboy-ng becomes ready.

davidbannon commented 5 years ago

OK shiznix, things change over time ! A lot of work has been done on tomboy-ng and I "believe" that its now at least as stable as Tomboy. But we can only really find out if other people, on other systems, use it. I test and test but there is no substitute for having other people try it out.

Lets be clear, ALL software has bugs ! The question is do they do any harm, are you likely to experience them ? In the case of tomboy-ng, I'd suggest the risk is quite small.

Note that tomboy-ng has built in backup and restore capabilities (called snapshots), if you use it, you will be pretty safe in the very unlikely event of finding something I have missed.

I am quite surprised you had problems building tomboy-ng. Please report details so I can fix things for you. If people don't report problems, I don't know they have experienced problems. But honestly, you don't need to build it yourself, just down load a ready to run binary ! I'll have a look at the instructions, they are probably as out of date as the ones about tomboy-ng being unsafe !

And finally (sorry I'm taking so long), the reason tomboy-ng exists is because Tomboy has become too hard to maintain. In fact, no one is maintaining it any more. I could speculate its because the GTK people are no longer as interested in getting GTK running on Windows and Mac. And because the Open Source community (perhaps unfairly) are not very happy with Mono. Not just because of its links to Microsoft but more (I suspect) because of its size.

shiznix commented 5 years ago

I'm happy to try tomboy-ng.

I use a source based distro so using pre-compiled binaries is not really preferred. Tomboy-ng is a small project so it should be quite easy to build, however I get the following:

tomboy-ng-0.20/tomboy-ng # lazbuild --verbose --lazarusdir=/usr/share/lazarus --cpu="x86_64" --build-mode=Release --os="linux" Tomboy_NG.lpi Parameter: os=linux Parameter: cpu=x86_64 Parameter: build-mode=Release Parameter: lazarusdir=/usr/share/lazarus Hint: (lazarus) primary config path: /etc/lazarus SetupCompilerFilename: Searching compiler ... SearchCompilerCandidates Value=fpc File=/usr/bin/fpc Hint: [TFPCTargetConfigCache.NeedsUpdate] TargetOS="" TargetCPU="" Options="" compiler file changed "/usr/bin/fpc" FileAge=1545006773 StoredAge=0 Hint: [TFPCTargetConfigCache.NeedsUpdate] /usr/bin/fpc TargetOS= TargetCPU= CompilerOptions= ExtraOptions= PATH=/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/games/bin Hint: (lazarus) [RunTool] /usr/bin/fpc "-iWTOTP" Hint: (lazarus) [RunTool] /usr/bin/fpc "-va" "compilertest.pas" Hint: [TFPCTargetConfigCache.Update] has changed SetupCompilerFilename: using /usr/bin/fpc Hint: (lazarus) storing Lazarus directory "/usr/share/lazarus/" Compiler path "/usr/bin/fpc" in "/etc/lazarus/environmentoptions.xml" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False Error: (lazbuild) Broken dependency: KControlsLaz

Unsure how to move forward from here, Lazarus doesn't seem adopted enough by others yet to be able to find any solution using Google :/

davidbannon commented 5 years ago

looks like you have not installed kcontrols to me. You will need to either install kcontrols using the ide or include the path to the kcontrols package on your command line. I take the first approach so do not know the syntax for the second model.

davidbannon commented 5 years ago

please have a look at - http://wiki.freepascal.org/lazbuild Without testing what you are trying to do, I suggest --verbose-pkgsearch will tell you if lazbuild is or is not finding your kcontols src --add-package will let you specify a package to include in the build even if it has not been added to Lazarus' IDE.
Don't forget a patch needs to be applied to KControls and another one, possibly, to LCL.

If I get some free time, I may write a building from the command line IDE how-to. But right now everything assumes a user will work from within the IDE. That is the nature of the beast.

Davo

davidbannon commented 5 years ago

OK, pretty easy install from scratch. Below is a list of command, not a script ! I realise that shiznix already has most steps done already but whole thing here just so someone can see the directory structure. Note we assume here that fpc 3.0.4 is already installed, its probably easist installed using distro's package manager. In this example we use the fixes_2_0 branch of Lazarus, 1.8.4 similar (but needs a patch). Speaking of patches, kcontrols no longer needs a patch, seems TK has used my patch, just forgot to mention it :-)

Oh, and we need subversion installed to get lazarus, we could, of course, use the the distro version of Lazarus but it changes a bit more often than fpc and not all distros keep up ....

I cannot workout how to get a default named version of kcontrols, so we have to deal with with its tag name in the file and directories, a real pain.

mkdir mk_tb-ng
cd mk_tb-ng
mkdir fixes_2_0
svn checkout https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0
wget https://bitbucket.org/tomkrysl/kcontrols/get/326a6a8bd80d.zip
unzip 326a6a8bd80d.zip
wget https://github.com/tomboy-notes/tomboy-ng/archive/master.zip
unzip master.zip
cd fixes_2_0; make; cd ..
fixes_2_0/lazbuild --verbose --add-package="tomkrysl-kcontrols-326a6a8bd80d/packages/kcontrols/kcontrolslaz.lpk"
fixes_2_0/lazbuild --verbose --build-mode=Release  tomboy-ng-master/tomboy-ng/Tomboy_NG.lpi
ls -la tomboy-ng-master/tomboy-ng/tomboy-ng