write all error to crash.log
@ -346,8 +346,8 @@ function ReaderUI:showReader(file)
end)
local ok, err = coroutine.resume(co)
if err ~= nil or ok == false then
print '[!] doShowReader coroutine crashed:'
print(debug.traceback(co, err, 1))
io.stderr:write('[!] doShowReader coroutine crashed:\n')
io.stderr:write(debug.traceback(co, err, 1))
UIManager:quit()
end
@ -40,7 +40,8 @@ function HorizontalGroup:paintTo(bb, x, y)
elseif self.align == "bottom" then
widget:paintTo(bb, x + self._offsets[i].x, y + size.h - self._offsets[i].y)
else
print("[!] invalid alignment for HorizontalGroup", self.align)
io.stderr:write("[!] invalid alignment for HorizontalGroup: ",
self.align)
@ -242,7 +242,7 @@ logmsg "Starting KOReader . . ."
if [ "${FROM_KUAL}" == "yes" ] ; then
eips_print_bottom_centered "Starting KOReader . . ." 1
fi
./reader.lua "$@" 2> crash.log
./reader.lua "$@" > crash.log 2>&1
# clean up our own process tree in case the reader crashed (if needed, to avoid flooding KUAL's log)
if pidof reader.lua > /dev/null 2>&1 ; then
@ -86,7 +86,7 @@ if awk '$4~/(^|,)ro($|,)/' /proc/mounts | grep ' /mnt/sd ' ; then
mount -o remount,rw /mnt/sd
./reader.lua "${args}" 2> crash.log
./reader.lua "${args}" > crash.log 2>&1
if [ "${FROM_NICKEL}" == "true" ] ; then
# start kobo software because it was running before koreader
@ -33,7 +33,7 @@ else
args="$@"
./reader.lua "$args" 2> crash.log
./reader.lua "$args" > crash.log 2>&1
killall -TERM reader.lua