Opened 10 years ago

Last modified 10 years ago

#4717 reopened defect

Error trying to open object palette in the journal

Reported by: godiard Owned by:
Priority: Normal Milestone: Unspecified
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


Some times, when you want open the object palette in the journal using a long touch, is not displayed.

In shell.log you see this error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sugar3/graphics/", line 1483, in __long_pressed_event_cb
  File "/usr/lib/python2.7/site-packages/sugar3/graphics/", line 984, in notify_right_click
  File "/usr/lib/python2.7/site-packages/sugar3/graphics/", line 972, in _ensure_palette_exists
    palette = self.parent.create_palette()
  File "/usr/lib/python2.7/site-packages/jarabe/journal/", line 736, in create_palette
    metadata = tree_model.get_metadata(self.props.palette_invoker.path)
  File "/usr/lib/python2.7/site-packages/jarabe/journal/", line 117, in get_metadata
    return model.get(self[path][ListModel.COLUMN_UID])
  File "/usr/lib/python2.7/site-packages/gi/overrides/", line 782, in __getitem__
    aiter = self._getiter(key)
  File "/usr/lib/python2.7/site-packages/gi/overrides/", line 776, in _getiter
    aiter = self.get_iter(key)
  File "/usr/lib/python2.7/site-packages/gi/overrides/", line 798, in get_iter
    path = TreePath(path)
  File "/usr/lib/python2.7/site-packages/gi/overrides/", line 1209, in __new__
    if len(path) == 0:
TypeError: object of type 'NoneType' has no len()

Change History (5)

comment:1 Changed 10 years ago by godiard

Looking at the code, I have found a possible source of this problem.

palette_invoker is a CellRendererInvoker. This invoker have a method motion_notify_event_cb attached to the treeview,
then when the mouse is moved outside of the cell, the palette can be hide.
In that case, set the path to None.
Then if you move the mouse, and after that, do a long touch over a cell,
the path is None and trigger this issue.

comment:2 Changed 10 years ago by Gonzalo Odiard

  • Resolution set to fixed
  • Status changed from new to closed

Keep updated CellRendererInvoker self.path updated - Fixes #4717

Since CellRendererInvoker can set the path at None if a mouse event
is out of the area of the renderer, can break the use of touch,
if happen after the mouse movement. This patch set the path,
in the point_in_cell_renderer test, for the positive case,
solving the issue.

Signed-off-by: Gonzalo Odiard <godiard@…>

Changeset: 353e05a08657c862ce78912aed0ce0d07ba44cb8

comment:3 Changed 10 years ago by Martin Abente Lahaye

Revert "Keep updated CellRendererInvoker self.path updated - Fixes #4717"

This reverts commit 353e05a08657c862ce78912aed0ce0d07ba44cb8.

Changeset: 6c64a7d02022f389844c2d7168fbf92cc4c6171a

comment:4 Changed 10 years ago by manuq

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 10 years ago by walter

  • Priority changed from Unspecified by Maintainer to Normal
Note: See TracTickets for help on using tickets.