Zim

Crash on SNAPSHOT-r842 ubuntu16.04.1

Bug #1681200 reported by NeLaS
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Zim
Fix Committed
Undecided
Unassigned

Bug Description

Hi! I just tried this snapshot, reporting what happened.

After installing the snapshot, I restarted Zim. It opened normally and indexed (much faster!). I explored the new tasklist sidebar and date notation, until I noticed some extra tasks on the list. Clicking on them opened an empty calendar page "Week #NUMBER (1)" (I use Weeks for the Journal plugin), which do not exist. The existing calendar pages "Week #NUMBER" actually had these extra tasks. They were marked as done in the checkbox, all had !!! and some had due dates others not.

Since the tasks are linked to an empty page, I cannot clear them from the list. It looks like an indexing issue, but I'm not sure what could trigger it.

I tried removing the Zim's cache directory, but after restarting Zim crashes. I can't get it to start. Here is a zim -D output:

$ zim -D
INFO: This is zim 0.65
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=12, 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/nelas/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/gnome>, <Dir: /usr/local/share>, <Dir: /usr/share>, <Dir: /var/lib/snapd/desktop>]
DEBUG: Set XDG_CONFIG_HOME to /home/nelas/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg/xdg-gnome>, <Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/nelas/.cache
DEBUG: Got error in dispatch: Error while connecting
DEBUG: Registered object line
WARNING: Could not find all icon sizes for the application icon
DEBUG: Starting primary process
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/zim/main/ipc.py", line 101, in _listener_thread_main
    l = Listener(SERVER_ADDRESS, SERVER_ADDRESS_FAMILY)
  File "/usr/lib/python2.7/multiprocessing/connection.py", line 132, in __init__
    self._listener = SocketListener(address, family, backlog)
  File "/usr/lib/python2.7/multiprocessing/connection.py", line 256, in __init__
    self._socket.bind(address)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

ERROR: Exception in main()
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 741, in main
    ZIM_APPLICATION.run(*argv[1:])
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 550, in run
    self._run_cmd(cmd, args) # test seam
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 572, in _run_cmd
    self._run_main_loop(cmd)
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 593, in _run_main_loop
    _ipc_start_listening(self.run)
  File "/usr/lib/python2.7/dist-packages/zim/main/ipc.py", line 97, in start_listening
    raise AssertionError, 'Listener did not start'
AssertionError: Listener did not start
DEBUG: Running ErrorDialog

The dialog that pops up says:

This is zim 0.65
Platform: posix
Locale: en_US UTF-8
FS encoding: UTF-8
Python: (2, 7, 12, 'final', 0)
Gtk: (2, 24, 30)
Pygtk: (2, 24, 0)
No bzr version-info found

======= Traceback =======
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 741, in main
    ZIM_APPLICATION.run(*argv[1:])
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 550, in run
    self._run_cmd(cmd, args) # test seam
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 572, in _run_cmd
    self._run_main_loop(cmd)
  File "/usr/lib/python2.7/dist-packages/zim/main/__init__.py", line 593, in _run_main_loop
    _ipc_start_listening(self.run)
  File "/usr/lib/python2.7/dist-packages/zim/main/ipc.py", line 97, in start_listening
    raise AssertionError, 'Listener did not start'
AssertionError: Listener did not start

If you need more info to debug, I'm happy to provide!

NeLaS (organelas)
description: updated
description: updated
Revision history for this message
NeLaS (organelas) wrote :

Hi, just to inform that after a full system restart, Zim is not crashing at startup anymore.

I also investigated a bit more and noticed that the files for these extra calendar pages already existed. After their removal, the phantom tasks disappeared. So, it's likely just a duplicate page/tasks issue and not related to the new indexing.

Cheers and sorry for the trouble

Revision history for this message
NeLaS (organelas) wrote :

Another update. After system restart Zim works, but as soon as it crashes, it cannot start any longer (same error as above).

If I start with the command `zim --standalone` it works normally.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Will look into making startup more robust.

Do you have a scenario that makes it crash as you mention in comment #2 ?

Revision history for this message
Siana Blackwood (sianablackwood) wrote :

I'm experiencing this same bug in r847 (also had it in r842) on Xubuntu 14.04.5. The scenario that seems to trigger it for me is that if I click on a link that opens a file in another program (usually PDFs in Evince, spreadsheets in LibreOffice), Zim will crash while I'm looking at the other file. So, I think it might be something to do with Zim being pushed into the background.

Once it crashes, Zim will no longer open normally and just gives the same dialog popup about 'Listener did not start'. I can open with 'zim --standalone' as suggested, but Zim will still crash when I open a linked file and work in it.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1681200] Re: Crash on SNAPSHOT-r842 ubuntu16.04.1

Could you run zim with the -D option and check the output in the terminal
when it crashes?

On Wed, Apr 19, 2017, 05:15 Siana Blackwood <email address hidden>
wrote:

> I'm experiencing this same bug in r847 (also had it in r842) on Xubuntu
> 14.04.5. The scenario that seems to trigger it for me is that if I click
> on a link that opens a file in another program (usually PDFs in Evince,
> spreadsheets in LibreOffice), Zim will crash while I'm looking at the
> other file. So, I think it might be something to do with Zim being
> pushed into the background.
>
> Once it crashes, Zim will no longer open normally and just gives the
> same dialog popup about 'Listener did not start'. I can open with 'zim
> --standalone' as suggested, but Zim will still crash when I open a
> linked file and work in it.
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1681200
>
> Title:
> Crash on SNAPSHOT-r842 ubuntu16.04.1
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1681200/+subscriptions
>

Revision history for this message
NeLaS (organelas) wrote :

Hi Jaap,

Here is the output of zim -D after a fresh computer start:

$ zim -D
INFO: This is zim 0.65
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=12, 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/nelas/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/gnome>, <Dir: /usr/local/share>, <Dir: /usr/share>, <Dir: /var/lib/snapd/desktop>]
DEBUG: Set XDG_CONFIG_HOME to /home/nelas/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg/xdg-gnome>, <Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/nelas/.cache
DEBUG: Got error in dispatch: Error while connecting
DEBUG: Registered object line
WARNING: Could not find all icon sizes for the application icon
DEBUG: Starting primary process
DEBUG: Loading config from: <zim.notebook.info.VirtualFile object at 0x7f495dfcce10>
DEBUG: Loading config from: /home/nelas/Notes/notebook.zim
DEBUG: Wrote /home/nelas/.config/zim/notebooks.list
INFO: Using default notebook: file:///home/nelas/Notes
DEBUG: Loading config from: /home/nelas/Notes/notebook.zim
DEBUG: Opening notebook: <zim.notebook.notebook.Notebook object at 0x7f495dd5c910>
DEBUG: Loading config from: <ConfigFile: /home/nelas/.config/zim/preferences.conf>
DEBUG: Loading plugin: arithmetic
DEBUG: Loading plugin: attachmentbrowser
DEBUG: Loading plugin: autocompletion
DEBUG: Loading plugin: backlinkpane
DEBUG: Loading plugin: bookmarksbar
DEBUG: Loading plugin: calendar
DEBUG: Loading plugin: diagrameditor
DEBUG: Loading plugin: distractionfree
DEBUG: Loading plugin: inlinecalculator
DEBUG: Loading plugin: insertsymbol
DEBUG: Loading plugin: linkmap
DEBUG: Loading plugin: printtobrowser
DEBUG: Loading plugin: sourceview
DEBUG: Registered object code
DEBUG: Loading plugin: spell
DEBUG: Loading plugin: tableeditor
DEBUG: Registered object table
DEBUG: Loading plugin: tableofcontents
DEBUG: Loading plugin: tags
DEBUG: Loading plugin: tasklist
DEBUG: Loading plugin: versioncontrol
DEBUG: Loading plugin: zeitgeist-logger
INFO: No VCS detected
DEBUG: Gtk version is (2, 24, 30)
DEBUG: Pygtk version is (2, 24, 0)
DEBUG: Loading config from: <ConfigFile: /home/nelas/.config/zim/style.conf>
DEBUG: Loading config from: /home/nelas/.cache/zim/notebook-home_nelas_Notes/state.conf
DEBUG: Registered plugin <zim.plugins.base.imagegenerator.DiagramMainWindowExtension object at 0x7f4957813610> for image type "diagram"
DEBUG: Accelmap: /home/nelas/.config/zim/accelmap
INFO: Open page: Afazeres (Afazeres)
DEBUG: Opened page: Afazeres
DEBUG: BackgroundCheck started
DEBUG: Add window: MainWindow
DEBUG: Link clicked: page: Projects:Spiral seq
Segmentation fault (core dumped)

It crashed after I clicked on a page link.

If I try to restart with zim -D again, I get the same error as I pasted on the bug description.

The ubuntu crash report came up (see attached). This line might help:

    zim crashed with SIGSEGV in sqlite3_column_text()

Additionally, I have been using zim in --standalone for a week and it did not crash once. I also tried clicking on different links (internal, external, filesystem) but nothing triggered the crash.

Revision history for this message
Siana Blackwood (sianablackwood) wrote :

'Zim -D' output of a crash, attempted restart and error dialog attached:

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Haven't been able to pinpoint the initial crashes, but did patch the application startup to be more robust after a crash. This means the "--standalone" option should no longer be needed when restarting.

Rev 857

Regards,

Jaap

Changed in zim:
status: New → Confirmed
Revision history for this message
NeLaS (organelas) wrote :

Just did a few tests with the new revision and haven't experienced any crashes. Thanks!

Revision history for this message
2l00Z (acommi) wrote :

revno: 863

1. Still can't re-open closed notebook from Tray

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zim/plugins/trayicon.py", line 218, in <lambda>
    item.connect('activate', lambda o, u: self.do_activate_notebook(u), info.uri)
  File "/usr/lib/python2.7/site-packages/zim/plugins/trayicon.py", line 223, in do_activate_notebook
    ZIM_APPLICATION.run('--gui', uri)
  File "/usr/lib/python2.7/site-packages/zim/main/__init__.py", line 554, in run
    self._run_cmd(cmd, args) # test seam
  File "/usr/lib/python2.7/site-packages/zim/main/__init__.py", line 564, in _run_cmd
    w = cmd.run()
  File "/usr/lib/python2.7/site-packages/zim/main/__init__.py", line 233, in run
    **self.get_options('geometry', 'fullscreen'))
  File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line 428, in present
    self._mainwindow.present()
  File "/usr/lib/python2.7/site-packages/zim/gui/widgets.py", line 2895, in present
    gtkwindowclass.present()
TypeError: descriptor 'present' of 'gtk.Window' object needs an argument

2. Crash when a link to file opened from Attachment Browser

INFO: Spawning: ['kate', '/home/andy/dox/zim/zim/bugs/notebooks.list'] (cwd: None)
qt5ct: using qt5ct plugin

Revision history for this message
2l00Z (acommi) wrote :

revno: 868
Now can re-open closed notebook - OK.
BUT:
Zim is very unstable during start, takes a lot of CUP. I can't do anything till CUP will be down - otherwise Zim crashes.
Still have crashes when a file opened with another app from the Attachment Browser.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :
Revision history for this message
2l00Z (acommi) wrote :

Hi, Jaap

I think the problems started back in version 0.65 somewhere between r840 and r847.
So we have to compare with these snapshots.
After I upgraded from r840 to r847 Zim began to behave extremely unstably - to show all above mentioned issues.

To them I can add one more, noted recently:
Zim incorrectly finish its work if I turn off the computer without explicitly exiting the application: the socket file (/tmp/zim-%user/primary-0.66 -...) is not deleted. Next time Zim experiences difficulties at the start and creates a new socket file.

openSUSE Leap 42.2, KDE, Zim r871.

Changed in zim:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.