- Status Closed
- Percent Complete
- Task Type Bugs
- Category Plugins
-
Assigned To
Uchida - Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#8445 - Text viewer crashes when jumping to end of file
Load the following file in the text viewer:
http://www.gutenberg.org/dirs/etext95/study10.txt
Set these settings:
wordwrap: on.
line mode: reflow.
wide view: yes.
scrollbar: off.
Click the “end of file” key (”right” in sansa e200).
An error appears: “Data abort at <address>”
Closed by Uchida
2010-03-17 12:19
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2010-03-17 12:19
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
patch commits.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Reproduced this bug on my 5.5G 30GB iPod video using all of the settings above.
Using SVN build r16096 and this file:
http://www.gutenberg.org/files/23042/23042.txt
Reproducible in sim too. The crash happens in common/unicode.c after iso_decode() is called from viewer.c:916 with a negative “count” parameter.
Reading the bug description I first thought this could be an easy bug to fix. But after looking into the code I think it is better to leave it to someone who is more familiar with the textviewer code to fix it and it is not only a Sansa e200 specific problem.
As Nils already mentioned the crash happens when iso_decode() is called with a negative count value. The problem is, THERE IS A MISMATCH BETWEEN PIXELWIDTH AND MEMORY POSITION.
While ‘col’ is in pixelwidth and ‘k’ is the index in the memory.
[code]
…
…
[/code]
When calling iso_decode() for the next screen ‘col’ has the value 176 (pixelwidth of the E200 screen).
The source ‘scratch_buffer + col’ will point to some undefined memory location and ‘k-col’ is negative (k=0..64).
I just wonder why the combination of line mode ‘join’ and ‘wide view’ doesn’t crash, while it uses a similar code, but I would say it’s also wrong there.
r17994
I create the patch file.
Could you confirm operation?
Applying this task’s patch file after you apply
FS#9855,FS#9892,FS#9893, orFS#9898fails.Please use
FS#9899(this task is closed) if you cannot mend the part in which the patch fails.Because the patch file of
FS#9899is old, I send a new patch.Please apply the patch in order of
FS#9855,FS#9892,FS#9893,FS#9898,FS#9902,FS#9853,FS#9546and this patch.If you do not apply these patch files, this patch need not be applied.
Sync the viewer_2.patch.
sync r21316
as far as i looked the source code and check the behavior, join mode and reflow mode seem to try to fit text to the screen size independent of view mode.
this means that scrolling left/right screen doesn’t make sence. correct me if i’m wrong.
so, forcing narrow view would avoid crash when line mode is set to join or reflow.
i created a patch to do it.
any thoughts?
I am sorry for very late the answer.
I think that it is a problem that invalidates the effect of WIDE mode.
I corrected that it did not abend like not changing the movement of original at WIDE mode.
I thought that it does not abend. But there are still a lot of problems in the display etc.
It is necessary to rewrite it completely, and I am doing the work now.