Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#1408 closed defect (fixed)

Journal should behave gracefully on entries with unexpected (but syntactically valid) metadata

Reported by: garycmartin Owned by: tomeu
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: journal Version: Git as of bugdate
Severity: Critical Keywords:
Cc: sascha_silbe Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The Journal should behave gracefully on entries with unexpected (but syntactically valid) metadata, currently it shows a random colour icon that colour strobs as you move your mouse over it and a 0% grey download progress bar. See attached screenshot and ticket #1407 for a current example.

Perhaps a broken icon, a palette option allowing erase and using the data-store entry directory hash as a fallback for the title title would would help both debugging/support feedback, and allow users to remove the broken entry via the UI, if that's what they want.

Attachments (7)

journal_behaving_funkily_on_entries_with_unexpected_metadata.png (106.3 KB) - added by garycmartin 12 years ago.
journal_getting_confused_scrolling_back_up_through_broken _entries.png (77.4 KB) - added by garycmartin 12 years ago.
shell_snippet.log (130.1 KB) - added by garycmartin 12 years ago.
This is just a small snippet of the log as trac will not let me upload (says the file is spam)
sugar-1408.patch (6.0 KB) - added by alsroot 12 years ago.
3_broken_DS_entries_on_one_page.png (131.0 KB) - added by garycmartin 12 years ago.
scrolling_up_through_broken_DS_entries_triggers_grey_blank_item_redraws.png (107.9 KB) - added by garycmartin 12 years ago.
palette_shows_but_no_options_are_of_any_use.png (43.5 KB) - added by garycmartin 12 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 12 years ago by garycmartin

Scrolling about the Journal with such entries can be problematic (there are perhaps a handful broken entries in my test Journal at this time). Scrolling down through entries seems ok, but scrolling back up I often get Sugar locking up and displaying many entries as broken entries (see attached screen shot). It seems as if scrolling back up seems to hit some internal issue that then shows many broken entries. Quitting Sugar and then starting again shows that the data-store was not damaged, just that Journal had got its self into a confused state. See attached screen shot, and shell.log – seems to be full of these tracebacks (look towards the end of the log):

Traceback (most recent call last):
  File "/home/garycmartin/sugar-jhbuild/install/lib/python2.6/site-packages/jarabe/journal/listmodel.py", line 117, in on_get_value
    return self._cached_row[column]
IndexError: list index out of range

Changed 12 years ago by garycmartin

This is just a small snippet of the log as trac will not let me upload (says the file is spam)

comment:2 Changed 12 years ago by garycmartin

  • Severity changed from Major to Critical

Changed 12 years ago by alsroot

comment:3 Changed 12 years ago by alsroot

  • Keywords r? added

See also related #1435 issue.

comment:4 Changed 12 years ago by alsroot

  • Owner changed from alsroot to tomeu
  • Status changed from new to assigned

comment:5 Changed 12 years ago by sascha_silbe

  • Cc sascha_silbe added

comment:6 follow-up: Changed 12 years ago by alsroot

Gary, could you test this patch in your broken(and not) environment,
patch looks invasive and there are doubts about including it to 0.86

comment:7 in reply to: ↑ 6 ; follow-up: Changed 12 years ago by garycmartin

Replying to alsroot:

Gary, could you test this patch in your broken(and not) environment,
patch looks invasive and there are doubts about including it to 0.86

Sure. My quick tests so far are not so good :-( Here's the list:

1) Broken data-store item icons are still showing in the canvas area with random colours, though the colour in the palette is grey (I see this may be being resolved in a different ticket).

2) When scrolling up in the Journal I still commonly hit screen full's of grey 0% progress bar, no title, no icon entries as per screen shot (attaching another example). If scrolling up quickly Sugar can pause for a while before displaying the grey 0% progress bar entries, though moving the mouse cursor over the entries appears to redraw them correctly (i.e these 0% entries are not broken data-store entries, just Journal getting confused after it scrolls up past a broken data-store entry). Note there is no issue scrolling down, only up.

3) The broken DS entries are now titled "Untitled" but the date is listed as 40 years, 9 months ago (01/01/70). The Journal is listing them in order correctly so I assume the Journal is getting a valid date from somewhere for the entry order, perhaps "Unknown" should be the date text if it's not possible to rescue a real date?

4) The palette menu is now accessible, so the erased menu item can be selected, unfortunately selecting erase has no effect (and no tracebacks I can find) from either the palette menu or from the details view.

5) The palette allows Start, Start with..., Copy, Send to..., and View Details. None of which have any effect except View Details which just shows an empty octet-stream 01/01/70 set of details. Perhaps all these palette options (except a working erase) should be inactive? FWIW "Start with..." does correctly say "no activity to start entry" so perhaps "Start" at least could be disabled via the same mechanism (see screen shot)?

Changed 12 years ago by garycmartin

Changed 12 years ago by garycmartin

comment:8 in reply to: ↑ 7 Changed 12 years ago by alsroot

Replying to garycmartin:

Replying to alsroot:

Gary, could you test this patch in your broken(and not) environment,
patch looks invasive and there are doubts about including it to 0.86

Sure. My quick tests so far are not so good :-( Here's the list:

1) Broken data-store item icons are still showing in the canvas area with random colours, though the colour in the palette is grey (I see this may be being resolved in a different ticket).

this random issue was moved to #1435

2) When scrolling up in the Journal I still commonly hit screen full's of grey 0% progress bar, no title, no icon entries as per screen shot (attaching another example). If scrolling up quickly Sugar can pause for a while before displaying the grey 0% progress bar entries, though moving the mouse cursor over the entries appears to redraw them correctly (i.e these 0% entries are not broken data-store entries, just Journal getting confused after it scrolls up past a broken data-store entry). Note there is no issue scrolling down, only up.

3) The broken DS entries are now titled "Untitled" but the date is listed as 40 years, 9 months ago (01/01/70). The Journal is listing them in order correctly so I assume the Journal is getting a valid date from somewhere for the entry order, perhaps "Unknown" should be the date text if it's not possible to rescue a real date?

4) The palette menu is now accessible, so the erased menu item can be selected, unfortunately selecting erase has no effect (and no tracebacks I can find) from either the palette menu or from the details view.

5) The palette allows Start, Start with..., Copy, Send to..., and View Details. None of which have any effect except View Details which just shows an empty octet-stream 01/01/70 set of details. Perhaps all these palette options (except a working erase) should be inactive? FWIW "Start with..." does correctly say "no activity to start entry" so perhaps "Start" at least could be disabled via the same mechanism (see screen shot)?

I guess thats not a good idea after all,
to suppress not valid(that don't have minimal set of properties) ds entries. Not sure if it could be some kind of filtering on ds side as well. So, maybe having ds recover feature?

comment:9 Changed 12 years ago by alsroot

  • Keywords r? removed

comment:10 Changed 11 years ago by sascha_silbe

Related bugs: #2208 #1590

comment:11 Changed 10 years ago by sascha_silbe

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

As of 79c85ed the Journal list view should handle invalid metadata gracefully. A fix for #1590 and #2208 has been landed as well.

comment:12 Changed 10 years ago by sascha_silbe

3b0e761 contains the sugar-toolkit part of the fix.

Note: See TracTickets for help on using tickets.