zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #04317
Error/crash when opening attachment folder and attachments in zim-0.66
Hi,
first of all, thanks for the new release!
I've noticed two issues regarding attachment handling on both Ubuntu
Budgie 17.04 and a recent Arch Linux XFCE install.
Issue 1
=======
Zim's attachment browser opens without error. However launching the OS's
file browser from the attachment browser open the file browser but
crashes Zim with a SIGSEGV. The same happens when trying to open an
attachment, e.g. via double-click in the attachment browser or via the
right-click menu.
The issue seems somehow related to how the exit of spawned processes is
handled.
If the spawned process does not fork (e.g. "gvim -f") the crash occurs
once the spawned process exits. If the spawned process forks upon start
(e.g. "gvim") the crash occurs immediately.
Please find the stacktrace and the debug log attached.
Issue 2 (seems to be related to the issue reported by Paulo)
============================================================
Trying to open an existing attachment folder via the menu "Tools -> Open
Attachments Folder" results in an Assertion Error:
----------------------------------------------------------------------
This is zim 0.66
Platform: posix
Locale: en_US UTF-8
FS encoding: UTF-8
Python: (2, 7, 13, 'final', 0)
Gtk: (2, 24, 31)
Pygtk: (2, 24, 0)
Zim revision is:
branch: zim-trunk
revision: 871 jaap.karssenberg@xxxxxxxxx-20170428103155-0xaqvtl2g53epq2y
date: 2017-04-28 12:31:55 +0200
======= Traceback =======
File "/usr/lib/python2.7/site-packages/zim/actions.py", line 149, in
do_activate
self.__get__(instance, instance.__class__)()
File "/usr/lib/python2.7/site-packages/zim/actions.py", line 132, in func
self.func(instance, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line
1351, in open_attachments_folder
self.open_dir(dir)
File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line
1206, in open_dir
self.open_file(dir)
File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line
1235, in open_file
assert isinstance(file, (File, Dir))
AssertionError:
----------------------------------------------------------------------
Looking over the code briefly this might be due to "file" being of type
"<class 'zim.notebook.layout.FilesAttachmentFolder'>"
Daniel
Gtk-Message: Failed to load module "canberra-gtk-module"
INFO: This is zim 0.66
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0)
DEBUG: Platform is posix
DEBUG: No bzr version-info found
DEBUG: Not running from a source dir
DEBUG: Set XDG_DATA_HOME to /home/test/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/budgie-desktop>, <Dir: /usr/local/share>, <Dir: /usr/share>, <Dir: /var/lib/snapd/desktop>]
DEBUG: Set XDG_CONFIG_HOME to /home/test/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg/xdg-budgie-desktop>, <Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/test/.cache
DEBUG: Registered object line
WARNING: Could not find all icon sizes for the application icon
DEBUG: Starting standalone process
DEBUG: Loading config from: <zim.notebook.info.VirtualFile object at 0x7f0672fcbed0>
DEBUG: Loading config from: /home/test/Notebooks/Notes/notebook.zim
DEBUG: Wrote /home/test/.config/zim/notebooks.list
INFO: Using default notebook: file:///home/test/Notebooks/Notes
DEBUG: Loading config from: /home/test/Notebooks/Notes/notebook.zim
DEBUG: Opening notebook: <zim.notebook.notebook.Notebook object at 0x7f0672e7bd90>
DEBUG: Loading config from: <ConfigFile: /home/test/.config/zim/preferences.conf>
DEBUG: Loading plugin: attachmentbrowser
DEBUG: Loading plugin: calendar
DEBUG: Loading plugin: insertsymbol
DEBUG: Loading plugin: printtobrowser
DEBUG: Gtk version is (2, 24, 31)
DEBUG: Pygtk version is (2, 24, 0)
DEBUG: Loading config from: <ConfigFile: /home/test/.config/zim/style.conf>
DEBUG: Loading config from: /home/test/.cache/zim/notebook-home_test_Notebooks_Notes/state.conf
DEBUG: Accelmap: /home/test/.config/zim/accelmap
INFO: Open page: Home (Home)
DEBUG: Add window: MainWindow
DEBUG: BackgroundCheck started
DEBUG: BackgroundCheck finished
DEBUG: open_file(/home/test/Notebooks/Notes/Home, None)
INFO: Spawning: ['xdg-open', '/home/test/Notebooks/Notes/Home'] (cwd: None)
DEBUG: Process started with PID: 7217
(nautilus:7224): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:7224): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
Segmentation fault (core dumped)
Attaching to program: /usr/bin/python, process 8833
[New LWP 8834]
[New LWP 8835]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
c
0x00007fc897f7d18d in poll () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) c
Continuing.
Thread 1 "zim" received signal SIGSEGV, Segmentation fault.
subtype_dealloc.lto_priv () at ../Objects/typeobject.c:975
975 ../Objects/typeobject.c: No such file or directory.
(gdb) bt
#0 subtype_dealloc.lto_priv () at ../Objects/typeobject.c:975
#1 0x000055f561d7b7d6 in cell_dealloc.lto_priv.186 (op=0x7fc88ae7f7c0)
at ../Objects/cellobject.c:50
#2 0x000055f561d34ab3 in tupledealloc.lto_priv ()
at ../Objects/tupleobject.c:222
#3 0x000055f561d59e1f in func_dealloc.lto_priv ()
at ../Objects/funcobject.c:458
#4 0x000055f561d7b7d6 in cell_dealloc.lto_priv.186 (op=0x7fc88ae77a98)
at ../Objects/cellobject.c:50
#5 0x000055f561d34ab3 in tupledealloc.lto_priv ()
at ../Objects/tupleobject.c:222
#6 0x000055f561d59e1f in func_dealloc.lto_priv ()
at ../Objects/funcobject.c:458
#7 0x00007fc8967feb72 in ?? ()
from /usr/lib/python2.7/dist-packages/glib/_glib.x86_64-linux-gnu.so
#8 0x00007fc89652acb8 in ?? ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007fc89652b71e in ?? ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007fc89652e2b8 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007fc89652e5e0 in ?? ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007fc89652e902 in g_main_loop_run ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fc891824507 in gtk_main ()
from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007fc891eec56f in ?? ()
from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so
#15 0x000055f561d494ff in call_function (oparg=<optimized out>,
pp_stack=0x7ffe90277ac0) at ../Python/ceval.c:4336
---Type <return> to continue, or q <return> to quit---
#16 PyEval_EvalFrameEx () at ../Python/ceval.c:2989
#17 0x000055f561d49b9f in fast_function (nk=<optimized out>,
na=<optimized out>, n=<optimized out>, pp_stack=0x7ffe90277c10,
func=<function at remote 0x7fc88b35bed8>) at ../Python/ceval.c:4437
#18 call_function (oparg=<optimized out>, pp_stack=0x7ffe90277c10)
at ../Python/ceval.c:4372
#19 PyEval_EvalFrameEx () at ../Python/ceval.c:2989
#20 0x000055f561d49b9f in fast_function (nk=<optimized out>,
na=<optimized out>, n=<optimized out>, pp_stack=0x7ffe90277d60,
func=<function at remote 0x7fc88b35be60>) at ../Python/ceval.c:4437
#21 call_function (oparg=<optimized out>, pp_stack=0x7ffe90277d60)
at ../Python/ceval.c:4372
#22 PyEval_EvalFrameEx () at ../Python/ceval.c:2989
#23 0x000055f561d424e5 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#24 0x000055f561d5ee0e in function_call.lto_priv ()
at ../Objects/funcobject.c:523
#25 0x000055f561d30493 in PyObject_Call () at ../Objects/abstract.c:2547
#26 0x000055f561d46fce in ext_do_call (nk=0, na=1,
flags=<optimized out>, pp_stack=0x7ffe90278018,
func=<function at remote 0x7fc88b35bde8>) at ../Python/ceval.c:4666
#27 PyEval_EvalFrameEx () at ../Python/ceval.c:3028
#28 0x000055f561d424e5 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#29 0x000055f561d5ee0e in function_call.lto_priv ()
at ../Objects/funcobject.c:523
#30 0x000055f561d30493 in PyObject_Call () at ../Objects/abstract.c:2547
#31 0x000055f561d46fce in ext_do_call (nk=0, na=0,
flags=<optimized out>, pp_stack=0x7ffe902782c8,
func=<function at remote 0x7fc88b35bb90>) at ../Python/ceval.c:4666
#32 PyEval_EvalFrameEx () at ../Python/ceval.c:3028
#33 0x000055f561d424e5 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#34 0x000055f561d42289 in PyEval_EvalCode (co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
globals=<optimized out>, locals=<optimized out>)
at ../Python/ceval.c:669
#35 0x000055f561d7213f in run_mod.lto_priv ()
at ../Python/pythonrun.c:1376
#36 0x000055f561d6d032 in PyRun_FileExFlags ()
at ../Python/pythonrun.c:1362
#37 0x000055f561d6cb7e in PyRun_SimpleFileExFlags ()
at ../Python/pythonrun.c:948
#38 0x000055f561d1da02 in Py_Main () at ../Modules/main.c:640
#39 0x00007fc897ea13f1 in __libc_start_main (main=0x55f561d1d330 <main>,
argc=3, argv=0x7ffe90278708, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7ffe902786f8) at ../csu/libc-start.c:291
#40 0x000055f561d1d22a in _start ()
(gdb) py-bt
Traceback (most recent call first):
File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 604, in _run_main_loop
gtk.main()
File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 576, in _run_cmd
self._run_main_loop(cmd)
File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 554, in run
self._run_cmd(cmd, args) # test seam
File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 745, in main
ZIM_APPLICATION.run(*argv[1:])
File "/usr/bin/zim", line 52, in <module>
exitcode = zim.main.main(*argv)