koreader / kindlepdfviewer

(DEPRECATED, please use KOReader instead) A PDF (plus DJVU, ePub, TXT, CHM, FB2, HTML...) viewer made for e-ink framebuffer devices, using muPDF, djvulibre, crengine
GNU General Public License v3.0
499 stars 98 forks source link

search and highlight feature crashes kpdfviewer #245

Open eLiNK2gl opened 12 years ago

eLiNK2gl commented 12 years ago

while using search and highlight feature (press '.') on one of my files, kpdfviewer crashes repeatedly after several runs with the following error description from the crash.log 'Segmentation fault'.

Another crash (pressing 'home' whlile the search and highlight mode was aparently still active. Meaning before the message how many hits have been found is shown) 'kpdfview: fitz/base_context.c:23: fz_free_context: Assertion `ctx->error->top == -1' failed. Aborted' (not necessarily related to the search and highlight feature. Have not managed to reproduce it so far.)

If you need the book, please contact me at MR.

eLiNK2gl commented 12 years ago

crashes also under https://github.com/downloads/tigran123/kindlepdfviewer/kindlepdfviewer-95be71c.zip But it took me longer.

dpavlin commented 12 years ago

I'm quite sure that it's a problem with highlight code on which search in pdf depends.

Since it's in mupdf cod-epath, I wonder if upgrading mupdf to latest version would fix it.

dpavlin commented 12 years ago

I can see same message

kpdfview: fitz/base_context.c:23: fz_free_context: Assertion `ctx->error->top == -1' failed.

when I exit reader, but I can't trigger it using emulator (or x86 native compile). I will try it on real device later today.

eLiNK2gl commented 12 years ago

caught both errors again. under '6a1de042f4'.

dpavlin commented 12 years ago

I still cannot reproduce this, not even on DXG. I tried searching newey 20 times or so and my search wrapped around few times (for context, I'm referring to same document with which @eLiNK2gl has problems).

But, I'm suspecting that you are running out of memory or have memory fragmentation issues. On which device are you running it? Does rebooting it increase number of searchers which are required to break it?

eLiNK2gl commented 12 years ago

@dpavlin, I've got KDXG here. I thought running out of memory would result in the restart of the Kindle framework (?), which is not the case here.

Sometimes I go searching through the book twice and experience no crashes. Sometimes, it suffices to do 3-4 searches. This morning the kpdfviewer hung up completely while using the search function and I had the feeling before that it occasionaly freezes for a couple of seconds.

Had to reboot the Kindle and have got the same 'Segmentation fault' after the fifth run.

P.S.: tested under '397d3aa037'