Zim

Zim crashes importing old notebook

Bug #645152 reported by Mildred on 2010-09-22
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
Undecided
Unassigned
zim (Fedora)
Won't Fix
Medium

Bug Description

In the python version

When I start zim -D, I get the following messages after the main process exited:

DEBUG: Q: Upgrade Notebook?
INFO: Accelerator changed for <Actions>/CalendarPlugin/show_calendar
INFO: Index update done
DEBUG: A: True
DEBUG: Opening ProgressBarDialog
INFO: Notebook update started
DEBUG: Wrote /home/mildred/Documents/Useful/zim/wiki/Addresses.txt
DEBUG: Wrote /home/mildred/Documents/Useful/zim/wiki/Addresses/Apple.txt
ERROR: Error in child main:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zim/daemon.py", line 541, in spawn
    self._main()
  File "/usr/lib/python2.7/site-packages/zim/daemon.py", line 585, in _main
    obj.main()
  File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line 497, in main
    self.check_notebook_needs_upgrade()
  File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line 788, in check_notebook_needs_upgrade
    self.notebook.upgrade_notebook(callback=lambda p: dialog.pulse(p.name))
  File "/usr/lib/python2.7/site-packages/zim/notebook.py", line 1298, in upgrade_notebook
    for page in self.walk():
  File "/usr/lib/python2.7/site-packages/zim/notebook.py", line 1263, in walk
    for p in self.index.walk(path):
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 834, in _walk
    for grandchild in self._walk(child, childpath):
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 834, in _walk
    for grandchild in self._walk(child, childpath):
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 826, in _walk
    cursor.execute('select * from pages where parent == ? order by lower(basename)', (path.id,))
InterfaceError: Error binding parameter 0 - probably unsupported type.
DEBUG: Child exited 12856 ('zim.gui.GtkInterface', 'file:///home/mildred/Documents/Useful/zim/wiki')
INFO: Last instance quit - exiting daemon
INFO: Stopped UnixSocketDaemon

Previously, I tried importing the notebook until it failed. I suppose there it a page it doesn't like.

I am wondering if that might be caused by the wiki hierarchy. I have many pages that don't contain any content but only sub-pages. That is the hierarchy is like:

Category.txt is missing
Category/Subpage.txt
Category/Sub-Category.txt
Category/Sub-Category/Subpage.txt

Perhaps when it finds Category/Subpage.txt, it can't find the parent because Category.txt doesn't exist.

Mildred (mildred) wrote :

Attached a notebook sample showing this problem.

$ tar jxvf wiki.tar.bz2
wiki
wiki/notebook.zim
wiki/Addresses.txt
wiki/Addresses
wiki/Addresses/Apple.txt
wiki/Addresses/B
wiki/Addresses/B/CA.txt
wiki/Addresses/S
wiki/Addresses/S/LB.txt
wiki/Addresses/O.txt
$ zim --no-daemon -D ./wiki

First my apologies for the slow response on this bug report. Afraid it ended up on the bottom of the pile.

I just tested your notebook with zim 0.48 and it imports without any issue. What version of zim are you using?

If you are on zim 0.48 and you still see this issue could you include what kind of locale / encoding you are using. Just English / UTF8 or something more exotic ?

Regards,

Jaap

Changed in zim:
status: New → Incomplete
Mildred (mildred) wrote :

I'm using zim 0.48 with Fedora 14.

Looking at the stack trace, perhaps this has to do with SQLite that might not have the same options on Fedora.

My locale settings:

LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=fr_FR.UTF-8
LC_TIME=en_DK.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES=C
LC_PAPER=fr_FR.UTF-8
LC_NAME="en_GB.UTF-8"
LC_ADDRESS=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

But I have the exact same error if I run zim with LC_ALL=C (and LANG=C as well)

Changed in zim:
status: Incomplete → In Progress

abrt version: 1.1.13
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/zim
component: Zim
executable: /usr/bin/zim
kernel: 2.6.35.6-48.fc14.x86_64
package: Zim-0.49-1.fc14
reason: index.py:827:_walk:InterfaceError: Error binding parameter 0 - probably unsupported type.
release: Fedora release 14 (Laughlin)
time: 1289861571
uid: 500

backtrace
-----
index.py:827:_walk:InterfaceError: Error binding parameter 0 - probably unsupported type.

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 285, in on_page_updated
    self.cleanup(link)
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 786, in cleanup
    self._delete(path)
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 718, in _delete
    paths.extend(list(self.walk(root)))
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 827, in _walk
    cursor.execute('select * from pages where parent == ? order by lower(basename)', (path.id,))
InterfaceError: Error binding parameter 0 - probably unsupported type.

Local variables in innermost frame:
cursor: <sqlite3.Cursor object at 0x1fbc3b0>
indexpath: (1, 24)
self: <Index object at 0x1fb0b40 (zim+index+Index at 0x2118c00)>
path: <IndexPath: Misc, random, stuph.>

How to reproduce
-----
1. Launched Zim
2. Zim popped up a dialog box, telling me that my notebook needed to be updated
3. I agreed to the update, which seemed to run
4. The abrt notice popped up while the update was running.

Created attachment 460692
File: backtrace

Which version is your previous Zim?

After your steps of reproduction, does Zim crash, or just issue an exception and continue to work?

(In reply to comment #2)
> Which version is your previous Zim?

Err... It's whatever was the final version in Fedora 12. (I jumped from F12 to F14 and gave F13 a clean miss.)

> After your steps of reproduction, does Zim crash, or just issue an exception
> and continue to work?

It complained, but kept on working. There were some entries in the Index pane that were grey colored duplicates of the entry above them. The normal entries led to the expected pages. The grey entries led to pages that had the correct headings (i.e., same as the normal pages), but were otherwise empty. After shutting Zim down and started it up again, everything looks normal. No more grey index enteries, and no exceptions. I'd try converting again, except that I didn't keep a backup copy of the notebook. Sorry 'bout that. :-( Other than that one glitch, Zim looks and works quite nicely.

Package: Zim-0.49-1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)

How to reproduce
-----
1. After zim update I ran it with --no-daemon option, a dialog with notebook format upgrade appeared
2. I chose "Yes"
3. zim crashed

Comment
-----
When I run zim without --no-daemon it closes after choosing "Yes" without any message or traceback.

(In reply to comment #4)
> Package: Zim-0.49-1.fc14
> Architecture: x86_64
> OS Release: Fedora release 14 (Laughlin)
>
>
> How to reproduce
> -----
> 1. After zim update I ran it with --no-daemon option, a dialog with notebook
> format upgrade appeared
> 2. I chose "Yes"
> 3. zim crashed
>
>
> Comment
> -----
> When I run zim without --no-daemon it closes after choosing "Yes" without any
> message or traceback.

Which version is your previous Zim?

This issue is identical with an upstream bug ( https://bugs.launchpad.net/zim/+bug/645152 ) with status 'In Progress'.

(In reply to comment #5)

> Which version is your previous Zim?

0.29 from Fedora 13

Might need to test myself with python 2.7, as of today my Ubuntu install is still on 2.6.6

Changed in zim:
status: In Progress → Incomplete
Robin Lee (cheeselee) wrote :

This should be an issue when updating from 0.29 or perl-zim.

*** Bug 667737 has been marked as a duplicate of this bug. ***

Download full text (3.2 KiB)

Fedora 14 is almost EOLed - moving to F16, still valid.
Zim-0.53-1.fc16.noarch

Current logs:

$ DEBUG: Loading /home/dkovalsk/.config/zim/preferences.conf
DEBUG: Gtk version is (2, 24, 8)
DEBUG: Pygtk version is (2, 24, 0)
WARNING: Could not find all icon sizes for the application icon
DEBUG: Loading /home/dkovalsk/.config/zim/style.conf
DEBUG: Registered plugin <InsertDiagramPlugin object at 0x28931e0 (zim+plugins+PluginClass at 0x2924680)> for image type "diagram"
DEBUG: Loaded plugin diagrameditor (<InsertDiagramPlugin object at 0x28931e0 (zim+plugins+PluginClass at 0x2924680)>)
DEBUG: Loaded plugin printtobrowser (<PrintToBrowserPlugin object at 0x28934b0 (zim+plugins+PluginClass at 0x2924960)>)
DEBUG: Accelmap: /home/dkovalsk/.config/zim/accelmap
DEBUG: Opening notebook: file:///home/dkovalsk/.zim/Notes
DEBUG: Loading /home/dkovalsk/.zim/Notes/notebook.zim
DEBUG: Cache dir: /home/dkovalsk/.zim/Notes/.zim
DEBUG: Index database file: /home/dkovalsk/.zim/Notes/.zim/index.db
WARNING: This notebook needs to be upgraded to the latest data format
DEBUG: Loading /home/dkovalsk/.zim/Notes/.zim/state.conf
INFO: Starting async index update
DEBUG: Action: set_pathbar_recent
INFO: Open page: <FileStorePage: QFix-2011-10-26> (<HistoryPath: QFix-2011-10-26>)
DEBUG: Running QuestionDialog
DEBUG: Q: Upgrade Notebook?
/usr/lib/python2.7/site-packages/zim/gui/widgets.py:2529: GtkWarning: gdk_window_invalidate_rect_full: assertion `GDK_IS_WINDOW (window)' failed
  gtk.MessageDialog.run(self)
INFO: Index update done
DEBUG: A: True
DEBUG: Opening ProgressBarDialog
INFO: Notebook update started
DEBUG: Wrote /home/dkovalsk/.zim/Notes/XXXX-Removed
DEBUG: Wrote /home/dkovalsk/.zim/Notes/XXXX-Removed
DEBUG: Wrote /home/dkovalsk/.zim/Notes/XXXX-Removed
DEBUG: Wrote /home/dkovalsk/.zim/Notes/XXXX-Removed
DEBUG: Wrote /home/dkovalsk/.zim/Notes/XXXX-Removed
DEBUG: Wrote /home/dkovalsk/.zim/Notes/XXXX-Removed
ERROR: Error in child main:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zim/daemon.py", line 550, in spawn
    self._main()
  File "/usr/lib/python2.7/site-packages/zim/daemon.py", line 594, in _main
    obj.main()
  File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line 599, in main
    self.check_notebook_needs_upgrade()
  File "/usr/lib/python2.7/site-packages/zim/gui/__init__.py", line 1162, in check_notebook_needs_upgrade
    self.notebook.upgrade_notebook(callback=lambda p: dialog.pulse(p.name))
  File "/usr/lib/python2.7/site-packages/zim/notebook.py", line 1949, in upgrade_notebook
    for page in self.walk():
  File "/usr/lib/python2.7/site-packages/zim/notebook.py", line 1893, in walk
    for p in self.index.walk(path):
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 1187, in _walk
    for grandchild in self._walk(child, childpath):
  File "/usr/lib/python2.7/site-packages/zim/index.py", line 1179, in _walk
    cursor.execute('select * from pages where parent == ? order by lower(basename)', (path.id,))
InterfaceError: Error binding parameter 0 - probably unsupported type.
DEBUG: Child exited 14252 (u'zim.gui.GtkInterface', u'file:///home/dkovalsk/.zim/Notes')
INFO: Last instance quit - exiting d...

Read more...

This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.

This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 16 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Changed in zim (Fedora):
importance: Unknown → Medium
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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