tilix icon indicating copy to clipboard operation
tilix copied to clipboard

[Bookmarks] Bookmarks don't get saved

Open phw opened this issue 9 years ago • 32 comments

For me bookmarks don't get saved at all. If I add bookmarks they are visible, I can also use them. But once I completely close Terminix and open it again it is all gone. I also can't see anything bookmark related in gconf.

phw avatar Feb 15 '17 09:02 phw

Ok, this is a bit strange. It works if I compile Teriminix from Git with dub and run it locally from the Git directory. But I have also installed terminix-git from the AUR system wide (just updated it, so it is usig same git revision as my local test).

Behavior is the following (always assuming Terminix is completely closed before opening it):

  • Running Terminix locally from inside the git repository (fresh build with dub) works. I can create bookmarks, and they are preserved when closing and restarting terminix
  • Running the globally installed terminix from terminix-git does load the saved bookmarks, but all bookmarks I create from inside this build are lost when restarting terminix

There are of course differences in how Terminix is build (dub vs autotools), probably related to this.

@dsboger Any idea what could be happening?

phw avatar Feb 15 '17 09:02 phw

New results:

The terminix-git version compiled with ldmd crashes with a core dump when closing if I have also edited bookmarks in this session. Compiled with traces enabled, here is a trace of me starting terminix, opening session, adding a bookmark folder, closing settings and then closing the terminal:

https://gist.github.com/phw/e241a2d6effe7fd9668fb21debfd45f9

I also tried to compile with ldmd -debug instead of -release, but I cannot even run that build, it crashes directly with:

Fatal Error while loading '/usr/lib/libphobos2-ldc.so.70':
	The module 'std.regex.internal.parser' is already defined in 'terminix'.

phw avatar Feb 15 '17 09:02 phw

The issue with LDC and the std.regex.internal.parser error should be addressed by this line in dub.json:

"dflags-ldc": ["-disable-linker-strip-dead"]

I think terminix-git uses the autotools which should be doing the same thing, however if you want to try compiling with dub with ldc do this:

dub --build=debug --config=trace --compiler=ldc2

gnunn1 avatar Feb 15 '17 14:02 gnunn1

Note that bookmarks are saved to ~/.config/terminix/bookmarks.json

gnunn1 avatar Feb 15 '17 23:02 gnunn1

I also realized I wasn't creating the path if it doesn't exist, I've checked in a change to do that so maybe this will fix it.

gnunn1 avatar Feb 15 '17 23:02 gnunn1

No, it is not the path, since the path and file exist and also get loaded.

I tested again with dub and building with ldc2, terminix crashes in this case when serializing the bookmarks. I ran it with gdb and backtrace, see output at https://gist.github.com/phw/b07e130073dac3def9dff13f4af4ee6e

phw avatar Feb 16 '17 08:02 phw

I'm having the same issue with the terminix-git from AUR. No bookmarks.json flie is created, but the ~/.config/terminix folder is. I'll try a build with dmd to see if anything changes.

dsboger-zz avatar Feb 16 '17 14:02 dsboger-zz

I rebuilt gtkd and terminix-git with dmd and bookmark saving works. Maybe it is a bug in the standard libraries of ldc or the compiler itself.

dsboger-zz avatar Feb 16 '17 14:02 dsboger-zz

@phw That stack trace looks like some sort of recursion is going on unless you really have folders nested that deep. I suspect LDC is doing something funky, I'll investigate.

gnunn1 avatar Feb 16 '17 14:02 gnunn1

Nope, no deep nesting, actually a single folder with entries below. But the gdb backtrack would go on and on if I select to show more. So definitely looks like some endless recursion happening.

phw avatar Feb 16 '17 16:02 phw

@phw I'm not able to reproduce with ldc2, it seems to be working fine for me with bookmarks saving as expected. Are you using dub to build with ldc2 as per the command line I posted? here's my LDC2 version:

LDC - the LLVM D compiler (1.1.0):
  based on DMD v2.071.2 and LLVM 3.9.1
  built with LDC - the LLVM D compiler (1.1.0)
  Default target: x86_64-unknown-linux-gnu
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64

gnunn1 avatar Feb 16 '17 21:02 gnunn1

Yes, tried with both autotools via the terminix-git AUR package and via dub. If I compile it with ldc2 I get that crash when saving bookmarks. Using DMD gives a working build.

I can check tomorrow what version of ldc this is I have installed, but it should be whatever Arch currently has available.

phw avatar Feb 17 '17 00:02 phw

I have a newer version of LDC installed then Arch, I can reproduce the issue with the older version (1.0.0) instead of my version (1.1.0).

gnunn1 avatar Feb 17 '17 02:02 gnunn1

I've worked around it with an ugly hack, code was failing on each bookmark calling super.serialize(parent). Copying this code from the super method and placing it inline fixes the issue. I'll have to try to remember to go back and revert this once LDC 1.1 is prevalent.

gnunn1 avatar Feb 17 '17 02:02 gnunn1

Hi guys, I installed tilix in ubuntu 17.04 But I've problems to save bbokmark

I create a bookmark but when I kill tilix or exit from sessions, bookmarks are no more present in tilix

Can you help me please? Thanks

luigimassa avatar Aug 23 '17 08:08 luigimassa

@luigimassa Bookmarks are saved in ~/.config/tilix/bookmarks.json, do you see a file there? Also, when you say kill tilix I assume you mean it close it normally and not something like kill 9?

gnunn1 avatar Aug 23 '17 12:08 gnunn1

Hi thanks to answer me.

The file ~/.config/tilix/bookmarks.json don't exist. I tried to kill tilix to try serch the bug, but tilinx don't generate the file also when I close normally the session of ubuntu or when I shutdown the pc thanks in advance

luigimassa avatar Aug 23 '17 16:08 luigimassa

If you run tilix in gnome-terminal, i.e. tilix without any other instances of tilix running, create a bookmark and then exit are any errors or warnings output to the console?

gnunn1 avatar Aug 23 '17 20:08 gnunn1

Also, can you confirm that the folder ~/.config/tilix/ exists?

gnunn1 avatar Aug 23 '17 20:08 gnunn1

Hi, I tried your suggestions and I found the problem.

  • delete your file ~/.config/tilix/bookmarks.json
  • kill tilix
  • open tilix in quake mode
  • add a bookmarks
  • exite from quake mode
  • kill tilix
  • open tilix in quake mode => there aren't bookmarks and file bookmarks.json wasn't created

Now

  • open tilix not in quake mode
  • add bookmark
  • close tilix
  • kill tilix
  • open tilix in quake mode
  • add bookmark
  • exit from quake mode
  • kill tilix
  • open tilix in quake mode, you see all bookmarks.

luigimassa avatar Aug 24 '17 06:08 luigimassa