Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Koreader continuously crashing #285

Closed
ghost opened this issue Sep 23, 2013 · 19 comments · Fixed by #288
Closed

[Bug] Koreader continuously crashing #285

ghost opened this issue Sep 23, 2013 · 19 comments · Fixed by #288
Labels

Comments

@ghost
Copy link

ghost commented Sep 23, 2013

On Kindle Paperwhite 5.3.4, koreader-nightly-20130913 was very stable and crashed rarely. With the last update it crashes continuously in all sort of operation (reflowing sometimes, resizing text some others, page changes, etc), especially with heavy pdf documents. With "crashes" i mean restarting the framework very often and be unusable most of the time. I can't reproduce all these situations, but I want only report this general fact so maybe you could considering to review the last versions' changes only. Thank you for your work!

@hwhw
Copy link
Member

hwhw commented Sep 23, 2013

I think we need to check what is happening regarding memory usage. It
might have become worse with more current versions - maybe introduced by
third-party code, maybe due to some inefficiencies with our own memory
handling.

All these bug reports however only give me the feeling it might be
memory related. Another possibility is memory corruption.

I hope I find free time to check during this week and especially the
coming weekend.

@ghost
Copy link
Author

ghost commented Sep 23, 2013

I have the same feeling too! In fact, it doesn't crash always when doing the same thing. Last note: most of the test I've done are in "Reflow Mode", because I use it really much, especially with techincal - huge pdf. The nightly build "koreader-nightly-20130913" appeared to be one the few releases quite stable on my device, regarding these operations. Also, if I restart the system (not the framework only), I get rid of errors at least in the first operations that I make (reflow, for example). Thank you very much for your investigations and work!

@NiLuJe
Copy link
Member

NiLuJe commented Sep 23, 2013

Just to be clear: when you mean 'restarting the framework', you do mean a restart (ie. the boy+tree w/ progress bar screen pops up), and not just what would amount to a CTD on Windows (ie. it throws you back to the framework right away)?

IIRC, on older devices, the framework restarting was a sign of something eating too much memory.
In my experience, on the K5, it's usually harder to make that happen (unless you really break the cap), and you can much more easily bring the device to its knees w/ kswapd swapping pages like crazy.

If someone experiencing this can, try to periodically look at the system's vitals over SSH ;).

@chrox
Copy link
Member

chrox commented Sep 26, 2013

I checked the heap usage of the pdf reflowing with valgrind command, valgrind --tool=memcheck --leak-check=full --show-reachable=yes ./luajit ./koreader-base ./reader.lua -d ../../test. And heap summary after reflowing 30 pages is shown below:

==22064== HEAP SUMMARY:
==22064==     in use at exit: 33,274,860 bytes in 5,317 blocks
==22064==   total heap usage: 657,986 allocs, 652,669 frees, 1,730,727,366 bytes allocated
==22064== 45,814 bytes in 39 blocks are still reachable in loss record 1,007 of 1,013
==22064== 
==22064==    at 0x4C2AA2F: calloc (vg_replace_malloc.c:593)
==22064==    by 0x400B58D: _dl_new_object (dl-object.c:77)
==22064==    by 0x4006815: _dl_map_object_from_fd (dl-load.c:1051)
==22064==    by 0x40086A9: _dl_map_object (dl-load.c:2568)
==22064==    by 0x400CFF1: openaux (dl-deps.c:65)
==22064==    by 0x400F185: _dl_catch_error (dl-error.c:178)
==22064==    by 0x400D6CD: _dl_map_object_deps (dl-deps.c:258)
==22064==    by 0x40138B8: dl_open_worker (dl-open.c:262)
==22064==    by 0x400F185: _dl_catch_error (dl-error.c:178)
==22064==    by 0x4013329: _dl_open (dl-open.c:639)
==22064==    by 0x5130F25: dlopen_doit (dlopen.c:67)
==22064==    by 0x400F185: _dl_catch_error (dl-error.c:178)
==22064== 
==22064== 102,270 bytes in 2 blocks are still reachable in loss record 1,008 of 1,013
==22064==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==22064==    by 0x65DBF2B: ft_alloc (ftsystem.c:102)
==22064==    by 0x65E95AF: ft_mem_qalloc (ftutil.c:76)
==22064==    by 0x65E9537: ft_mem_alloc (ftutil.c:55)
==22064==    by 0x6645362: af_face_globals_new (afglobal.c:183)
==22064==    by 0x664F258: af_loader_reset (afloader.c:63)
==22064==    by 0x66505E2: af_loader_load_glyph (afloader.c:529)
==22064==    by 0x6650A04: af_autofitter_load_glyph (afmodule.c:234)
==22064==    by 0x65DEEB8: FT_Load_Glyph (ftobjs.c:712)
==22064==    by 0x65DF1FC: FT_Load_Char (ftobjs.c:850)
==22064==    by 0x404B9B1: ???
==22064==    by 0x104025377: ???
==22064== 
==22064== 240,000 bytes in 1 blocks are still reachable in loss record 1,009 of 1,013
==22064==    at 0x4C2AA2F: calloc (vg_replace_malloc.c:593)
==22064==    by 0x8D1D33E: openFrameBuffer (einkfb.c:312)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x44C5D9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x44C5D9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x44C5D9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x44C5D9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x446884: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064== 
==22064== 240,000 bytes in 1 blocks are still reachable in loss record 1,010 of 1,013
==22064==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==22064==    by 0x5D0A283: newBlitBufferNative (blitbuffer.c:68)
==22064==    by 0x5D0A361: newBlitBuffer (blitbuffer.c:84)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x44C5D9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x446884: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x40BD4F: lua_pcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4046D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4051D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064== 
==22064== 357,945 bytes in 7 blocks are still reachable in loss record 1,011 of 1,013
==22064==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==22064==    by 0x65DBF2B: ft_alloc (ftsystem.c:102)
==22064==    by 0x65E95AF: ft_mem_qalloc (ftutil.c:76)
==22064==    by 0x65E9537: ft_mem_alloc (ftutil.c:55)
==22064==    by 0x6645362: af_face_globals_new (afglobal.c:183)
==22064==    by 0x664F258: af_loader_reset (afloader.c:63)
==22064==    by 0x66505E2: af_loader_load_glyph (afloader.c:529)
==22064==    by 0x6650A04: af_autofitter_load_glyph (afmodule.c:234)
==22064==    by 0x65DEEB8: FT_Load_Glyph (ftobjs.c:712)
==22064==    by 0x65DF1FC: FT_Load_Char (ftobjs.c:850)
==22064==    by 0x41E1FC: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4403F9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064== 
==22064== 11,845,080 bytes in 20 blocks are still reachable in loss record 1,012 of 1,013
==22064==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==22064==    by 0x5D0A283: newBlitBufferNative (blitbuffer.c:68)
==22064==    by 0x5D0A361: newBlitBuffer (blitbuffer.c:84)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x446884: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x40BD4F: lua_pcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4046D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4051D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x40BDD1: lua_cpcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x403FC3: main (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064== 
==22064== 19,888,200 bytes in 16 blocks are still reachable in loss record 1,013 of 1,013
==22064==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==22064==    by 0x71B62AB: willus_mem_alloc (mem.c:107)
==22064==    by 0x71B61AE: willus_mem_alloc_warn (mem.c:54)
==22064==    by 0x71962AB: bmp_alloc (bmp.c:1271)
==22064==    by 0x716520F: k2pdfopt_reflow_bmp (koptreflow.c:75)
==22064==    by 0xD7ED289: reflowPage (pdf.c:874)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x446884: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x40BD4F: lua_pcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4046D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064==    by 0x4051D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==22064== 
==22064== LEAK SUMMARY:
==22064==    definitely lost: 8,286 bytes in 416 blocks
==22064==    indirectly lost: 352 bytes in 8 blocks
==22064==      possibly lost: 0 bytes in 0 blocks
==22064==    still reachable: 33,266,222 bytes in 4,893 blocks
==22064==         suppressed: 0 bytes in 0 blocks

In the 33,266,222 bytes still reachable memory, 11,845,080 bytes are used in blitbuffer cache items (CacheItem in koptinterface) and 19,888,200 bytes are used in reflowing cache items(ContextCacheItem in koptinterface). The total heap size used by koreader is supposed to be restricted by DGLOBAL_CACHE_SIZE, that's 10 MB by default. But it happens ContextCacheItems forgot to calculate their cache sizes before being inserted into the cache queue and make the total cache size well beyond the DGLOBAL_CACHE_SIZE limit. Usually kindle devices especially those with 5 firmware don't have a spare of 30 MB memory to hold the cache of koreader, but fortunately it 'crashes' the Java framework other than the koreader process.

So to fix this problem we have to tell the cache manager the exact size of ContextCacheItem so that we won't cache too much. I will send a PR to fix this as soon as possible.

chrox added a commit to chrox/koreader that referenced this issue Sep 26, 2013
@chrox
Copy link
Member

chrox commented Sep 26, 2013

Now heap usage is more reasonable with #288:

==24621== HEAP SUMMARY:
==24621==     in use at exit: 10,420,703 bytes in 4,256 blocks
==24621==   total heap usage: 284,541 allocs, 280,285 frees, 637,291,449 bytes allocated
==24621==
...
==24621== 240,000 bytes in 1 blocks are still reachable in loss record 890 of 893
==24621==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==24621==    by 0x5D0A283: newBlitBufferNative (blitbuffer.c:68)
==24621==    by 0x5D0A361: newBlitBuffer (blitbuffer.c:84)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x44C5D9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x446884: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x40BD4F: lua_pcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x4046D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x4051D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621== 
==24621== 409,080 bytes in 8 blocks are still reachable in loss record 891 of 893
==24621==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==24621==    by 0x65DBF2B: ft_alloc (ftsystem.c:102)
==24621==    by 0x65E95AF: ft_mem_qalloc (ftutil.c:76)
==24621==    by 0x65E9537: ft_mem_alloc (ftutil.c:55)
==24621==    by 0x6645362: af_face_globals_new (afglobal.c:183)
==24621==    by 0x664F258: af_loader_reset (afloader.c:63)
==24621==    by 0x66505E2: af_loader_load_glyph (afloader.c:529)
==24621==    by 0x6650A04: af_autofitter_load_glyph (afmodule.c:234)
==24621==    by 0x65DEEB8: FT_Load_Glyph (ftobjs.c:712)
==24621==    by 0x65DF1FC: FT_Load_Char (ftobjs.c:850)
==24621==    by 0x41E1FC: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x4403F9: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621== 
==24621== 2,623,080 bytes in 6 blocks are still reachable in loss record 892 of 893
==24621==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==24621==    by 0x5D0A283: newBlitBufferNative (blitbuffer.c:68)
==24621==    by 0x5D0A361: newBlitBuffer (blitbuffer.c:84)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x446884: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x40BD4F: lua_pcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x4046D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x4051D5: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x41C07A: ??? (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x40BDD1: lua_cpcall (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621==    by 0x403FC3: main (in /home/chrox/dev/koreader/koreader-x86_64-linux-gnu/koreader/luajit)
==24621== 
==24621== 6,319,800 bytes in 5 blocks are still reachable in loss record 893 of 893
==24621==    at 0x4C2C73C: malloc (vg_replace_malloc.c:270)
==24621==    by 0x71B62AB: willus_mem_alloc (mem.c:107)
==24621==    by 0x71B61AE: willus_mem_alloc_warn (mem.c:54)
==24621==    by 0x71962AB: bmp_alloc (bmp.c:1271)
==24621==    by 0x716520F: k2pdfopt_reflow_bmp (koptreflow.c:75)
==24621==    by 0x8229E99: start_thread (pthread_create.c:308)
==24621==    by 0x563DCBC: clone (clone.S:112)
==24621== 
==24621== LEAK SUMMARY:
==24621==    definitely lost: 22,866 bytes in 1,145 blocks
==24621==    indirectly lost: 352 bytes in 8 blocks
==24621==      possibly lost: 0 bytes in 0 blocks
==24621==    still reachable: 10,397,485 bytes in 3,103 blocks
==24621==         suppressed: 0 bytes in 0 blocks

@ghost
Copy link
Author

ghost commented Sep 27, 2013

I've tryed the last nightly and it's even worse. Program closes or restart the framework continously ("tree with chargin bar"). When I'm using kindle keyboard with old version of KPV I've none of this issues, even if the device is older and the pdf are the same
I underline that I'm on kindle Paperwhite, not Touch... maybe with that is different...

Are yuor fixes already in the last nightly? If not it could be for this that I don't see improvements...

@chrox
Copy link
Member

chrox commented Sep 27, 2013

I still cannot reproduce the bug you mentioned above. But I suggest you restart your kindle device via the "Settings-Restart your kindle" approach and check if there is an indexer stuck in the background which may eat up almost all free memory.

@ghost
Copy link
Author

ghost commented Sep 27, 2013

I've restarted lots of times, always the same. All the books are indexed, so it's not the indexer...

Now, I'm testing the nightly
koreader-kindle-arm-none-linux-gnueabi-v2013.03-463-g843d697.zip
of Aug 19, 2013

This is old but sensibly faster then all the last revision, in every operation, also in displaying menus etc. For example, going back to the navigation menu is istantaneous. It is like using a totally different software, on Kindle Paperwhite at least

It seems that at every release koreader become slower and heavier, don't know if depends on new functionalities...

@hwhw
Copy link
Member

hwhw commented Sep 27, 2013

Maybe we need to introduce a way to monitor memory usage and write
analytical data to a file... Also, I'm not sure what the state of things
is if the framework gets OOM-killed and restarted. There might be
remains left (of the framework or Koreader) that additionally eat up
memory.

@ghost
Copy link
Author

ghost commented Sep 27, 2013

Thank you for your efforts, guys...

P.S. I don't think it depends so much on remains because also after restarting the whole system it crashes immediatly at the same way

@ghost
Copy link
Author

ghost commented Sep 27, 2013

Another thing: in reflow mode, with a big scanned book, if I open it, then go to the next page, and go to the previous page twice in a little time, it always crashes the framework (with every nightly build). If instead I wait some time and let it load before switching pages, it only hangs a moment then load the critical page without crashing the framework. Go back and forth fast in big reflowed documents should be the best way to reproduce this bug on Kindle PW (especially, going back to unrendered pages fast). The weirdest thing is that the same books are rendered perfectly and super-fast with KPV on old Kindle 3, and no crashes at all o.O

Talking about the framework, I really prefer when koreader crashes itself. When the framework crashes, I must wait until it reload, than quitting koreader (because during and after frame restart is bugged) and restart koreader

@NiLuJe
Copy link
Member

NiLuJe commented Sep 28, 2013

Might be worth checking if it behaves better with the framework down (stop lab126_gui)...

But to answer hwhw: in my experience, really bad. You're much more likely to bring the system to its knees with kswapd trying to swap pages like crazy before the OOM actually deigns doing something drastic about it.


I'd really like to see which state the system is in before you experience your crashes, if you can get an SSH shell up & running in parallel to see what top & its procfs friends (namely meminfo/vmstat/zoneinfo) say, that'd be great :).

Barring that, a redistributable file that breaks reliably so we could try to reproduce it?

@chrox
Copy link
Member

chrox commented Sep 28, 2013

I doubt that the Kindle Paperwhite/Touch has any single bit of random
access memory more than the old Kindle keyboard has. And the firmware 5
definitely eat more memory than the firmware 3 does. So you should never be
surprised at these results.
On Sep 27, 2013 6:21 PM, "BugNot" notifications@github.com wrote:

I've tryed the last nightly and it's even worse. Program closes or restart
the framework continously ("tree with chargin bar"). When I'm using kindle
keyboard with old version of KPV I've none of this issues, even if the
device is older and the pdf are the same


Reply to this email directly or view it on GitHubhttps://github.com//issues/285#issuecomment-25235667
.

@ghost
Copy link
Author

ghost commented Sep 28, 2013

@NiLuJe sorry but i'm not so expert to use ssh etc.... About the restributable file, I've only copyright protected ones :( Like feynman lectures vol 2. But you can search for huge (30+ megabyte) scanned pdf on scribd... after turning ON the reflow mode, closing the document, reopening it and change fast pages back (mainly) and forth you should get the same crashes easily on PW.
About "checking if it behaves better with the framework down", is it possible? I mean, possible to run koreader with framework down? I think it would solve all the memory problems! Maybe instead of restarting the framework, you could try to replace it with a turn off command (if there's a way to turn it on later, after exting koreader).

@chrox You are totally right, they both have 256 megabyte of ram... firmware 5 grrr!

If you need further tests that don't involve ssh and other techincal skills, just ask me! I can also try a framework-down version if you provide me the files or strings to replace for make koreader run in this mode.

@ghost
Copy link
Author

ghost commented Sep 28, 2013

The comment below is under review, because I'm not sure that the framework always stops this way (it did the first time but now not with a new koreader version o.O)

(NEW) UPDATE: I've tried to make it run in a framework down mode, calling the software with --framework_stop and substituting in koreader.sh "/etc/init.d/framework stop" with "/mnt/base-mmc/etc/init.d/framework stop". Now it seems to not crash anymore!!! I've created a KUAL entry for this mode and I'll always use it when i have to open big files or reflow them

Fixes for koreader.sh:

#check if we are supposed to shut down the Amazon framework
if test "$1" == "--framework_stop"; then
shift 1
/mnt/base-mmc/etc/init.d/framework stop
fi

#always try to continue cvm
killall -cont cvm || /mnt/base-mmc/etc/init.d/framework start

New kual entry:
,{"name": "Start without framework", "priority": 3, "action": "/mnt/us/koreader/koreader.sh", "params": "--framework_stop /mnt/us/documents"}

@ghost
Copy link
Author

ghost commented Sep 28, 2013

I give up, don't know how did I manage to make it work frameworkless, but it has been great the few times i get the program run without the it (still can't understand how I did, maybe bugs or luck). I've tried also the "stop framework" only command, but it blocks all the code that comes later and makes the device unusable

@ghost
Copy link
Author

ghost commented Sep 29, 2013

I succeded to make it work without framework. Now no more crash, and great performance!

@NiLuJe
Copy link
Member

NiLuJe commented Sep 29, 2013

Ah, the identity of the mysterious OP is revealed ;).

Cf PR #294 for the 'no framework' workaround ;).

That still leaves the fact that something's possibly too grabby with memory somewhere, but at least it gives users an alternative.

@ghost
Copy link
Author

ghost commented Sep 29, 2013

Thank you for committing!

houqp pushed a commit to houqp/koreader that referenced this issue Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants