You are not logged in.
Just reinstalled zathura-pdf-mupdf-git from AUR and it still has memory leaks -- for example, I get
warning: pixmap memory exceeds soft limit 234M + 38M > 256M
+ pdf/pdf_image.c:168: pdf_load_image_imp(): out of memory
| pdf/pdf_image.c:349: pdf_load_image(): cannot load image (28 0 R)
| pdf/pdf_interpret.c:1432: pdf_run_Do(): cannot load image (28 0 R)
\ pdf/pdf_interpret.c:2029: pdf_run_keyword(): cannot draw xobject/image
after around page 7 of this pdf.
Offline
I tried to code some rudimentary bash completion for zathura (please note that this is my first stab at bash completion in general).
_zathura()
{
local cur prev words cword split extensions
_init_completion || return
case "$prev" in
-c|--config-dir|-d|--data-dir|-p|--plugins-dir)
_filedir -d
return
;;
-l|--debug)
COMPREPLY=( $( compgen -W 'debug info warning error' -- "$cur" ) )
return
;;
-e|--reparent)
# needs window xid completion
return
;;
--fork)
# argument required but no completions available
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W '--help --reparent --config-dir --data-dir --plugins-dir --fork --debug' -- "$cur" ) )
return
;;
*)
extensions=''
for plugin in /usr/lib/zathura/*.so; do
case ${plugin##*/} in
pdf.so)
extensions="$extensions|pdf"
;;
ps.so)
extensions="$extensions|ps|eps|epsi|epsf"
;;
djvu.so)
extensions="$extensions|djvu|djv"
;;
epub.so)
extensions="$extensions|epub"
;;
cb.so)
extensions="$extensions|cb7|cbr|cbz|cbt|rar|zip|7z|tar"
;;
*)
;;
esac
done
_filedir "${extensions#|}"
return
esac
} &&
complete -F _zathura zathura
It looks in "/usr/lib/zathura" for which plugins you have and generates completions for filenames ending with the respective plugin name.
To use it you need to have the bash-completion installed. Just put the above code in "~/.bash_completion" or in "/etc/bash_completion.d/zathura".
Edit: I have modified the code to use the extensions specified by the mimetypes declared by the plugins when they are loaded (minus .gtar and .gem). I have set up a bitbucket repo, too.
Edit2: I made some variables local and added option completion. I'm not sure if it's possible to provide completion for window xids, though. Moreover, I'd like to look for the plugins in the supplied directory if -p or --plugins-dir options are given. Do you know of any simple way to check if any of those has been provided?
Last edited by donbex (2012-04-16 22:05:45)
Offline
@donbex: Thanks for your efforts. It just makes its way in the repo.
Offline
ctxfi-user wrote:Thanks for this software.
Two annoying things:
- zathura 0.1.2-1 & zathura-pdf-poppler 0.1.1-1 works on x86_64 (shows pdf documents) but not on i686 (shows nothing, only black)I discovered the same issue (i686)
I have exactly the same problem .(i686)
Last edited by Mr_Kartoffelsalat (2012-04-17 19:36:13)
Offline
Hello,
ubuntubang wrote:ctxfi-user wrote:Thanks for this software.
Two annoying things:
- zathura 0.1.2-1 & zathura-pdf-poppler 0.1.1-1 works on x86_64 (shows pdf documents) but not on i686 (shows nothing, only black)I discovered the same issue (i686)
I have exactly the same problem .(i686)
Apparently the package has not been rebuild. You can either do that on your own or download the package here. This should work; you may want to fill in a bug report in the archlinux bug tracker.
Best regards
Offline
Thank you so much !! Everything works fine again.
cheers
Offline
https://bugs.archlinux.org/task/29519
Rebuilded packages are in the repos now.
Last edited by ctxfi-user (2012-04-18 12:33:33)
Offline
hi all. Anybody can confirm that copying text does not work in pdf documents?
If I select a piece of text the bottom bar says "Copy selected text to clipboard: <my selected text>". But nothing is really put into the clipboard.
Offline
See post #183.
Offline
Crashing (when actually opening a pdf via poppler plugin) since the latest git commits with:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff572e8a4 in ____strtod_l_internal () from /lib/libc.so.6
(gdb) bt
#0 0x00007ffff572e8a4 in ____strtod_l_internal () from /lib/libc.so.6
#1 0x00000000004175c0 in ?? ()
#2 0x0000000000418219 in zathura_db_get_fileinfo ()
#3 0x000000000040c49e in document_open ()
#4 0x000000000040ca3e in ?? ()
#5 0x00007ffff6d415e6 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#6 0x00007ffff5f89fb5 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#7 0x00007ffff5f8a827 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#8 0x00007ffff7153017 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#9 0x000000000040ceb1 in main ()
edit: Fixed, thanks.
Last edited by misc (2012-04-21 15:43:19)
Offline
Crashing (when actually opening a pdf via poppler plugin) since the latest git commits with:
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff572e8a4 in ____strtod_l_internal () from /lib/libc.so.6 (gdb) bt #0 0x00007ffff572e8a4 in ____strtod_l_internal () from /lib/libc.so.6 #1 0x00000000004175c0 in ?? () #2 0x0000000000418219 in zathura_db_get_fileinfo () #3 0x000000000040c49e in document_open () #4 0x000000000040ca3e in ?? () #5 0x00007ffff6d415e6 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #6 0x00007ffff5f89fb5 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #7 0x00007ffff5f8a827 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #8 0x00007ffff7153017 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x000000000040ceb1 in main ()
Please pull the latest changes, should be fixed now.
Offline
It took me a second to realize that to map Ctrl+Shift+. to set the '>' symbol for zooming in you'd have to do 'map <C->> zoom in', not 'map <C-S-.> zoom in'.
But anyways, Zathura is sexy.
joe@trusktr.io - joe at true skater dot io.
Offline
Dear mlq,
Along with others, I'd like to thank you for a truly remarkable program. Compliments aside, I have two comments:
1) I experience performance issues on large documents when I scroll large numbers of pages at once. More precisely, if I scroll through say 100 pages, cpu usage spikes up and the pages continue to say Loading... and it takes it about 30 seconds to catch up (I've emailed through the forum a link to a file which suffers this issue). I should note that this is in stark contrast to Evince (evince-gtk compiled from AUR) which instantly loads pages as I scroll through in a similar manner (e.g. using the mouse wheel).
2) For me the adjust-open option "width" gives somewhat irregular behavior on some documents which have different-sized cover pages. Instead of matching the width of the largest (or most common) width, it decides the width based on only the first page. Again this is contrast to the behavior of evince,djview and xpdf (which isn't necessarily better, but it's what I've come to expect). I've also included in the forum email a file with this property.
Thanks,
Ryan
Offline
Hello,
1) I experience performance issues on large documents when I scroll large numbers of pages at once. More precisely, if I scroll through say 100 pages, cpu usage spikes up and the pages continue to say Loading... and it takes it about 30 seconds to catch up (I've emailed through the forum a link to a file which suffers this issue). I should note that this is in stark contrast to Evince (evince-gtk compiled from AUR) which instantly loads pages as I scroll through in a similar manner (e.g. using the mouse wheel).
Can you test the develop version for this issue? Now pages that are viewed right now should be rendered before others.
2) For me the adjust-open option "width" gives somewhat irregular behavior on some documents which have different-sized cover pages. Instead of matching the width of the largest (or most common) width, it decides the width based on only the first page. Again this is contrast to the behavior of evince,djview and xpdf (which isn't necessarily better, but it's what I've come to expect). I've also included in the forum email a file with this property.
This is a known issue. We are working on it.
Best regards
Offline
Dear mlq,
Can you test the develop version for this issue? Now pages that are viewed right now should be rendered before others.
I built the development version (zathura-git with zathura-djvu-git) through AUR and if anything it had more trouble with the djvu document, spiking the CPU usage after only a few pages of quick scrolling with the mouse.
This is a known issue. We are working on it.
Ah, sorry I did not pay more attention.
Thanks,
Ryan
Offline
Hello,
I built the development version (zathura-git with zathura-djvu-git) through AUR and if anything it had more trouble with the djvu document, spiking the CPU usage after only a few pages of quick scrolling with the mouse.
I actually don't see a problem here. After you scroll you are exposing the pages that should be rendered so they are added into a pool of render threads which process that queue. So if you are scrolling those widgets are added and consequently rendered which takes some CPU time; therefore the CPU usage will 'spike' and after some time (after the queue has been processed) it should idle.
Best regards
Offline
Dear mlq,
Hello,
I actually don't see a problem here. After you scroll you are exposing the pages that should be rendered so they are added into a pool of render threads which process that queue. So if you are scrolling those widgets are added and consequently rendered which takes some CPU time; therefore the CPU usage will 'spike' and after some time (after the queue has been processed) it should idle.
Best regards
It's not so much that it's a problem, as much as it's a bit unsettling that it doesn't occur in other programs that also use djvulibre. In evince if I scroll through 100 pages, they load immediately (there is absolutely no discernible latency waiting for the pages to load) and the CPU spikes to about 8%. A similar action in Zathura will have me wait a comparatively "unusable" amount of time (as long as minutes on some documents that I actually let finish loading the pages) and spike my CPU to about 32% usage the entire time.
Again, I doubt this is a common usage for anyone, but it highlights a potential issue with the implementation of djvulibre in rendering the page. If you'd like me to leave it alone, you needn't say anymore. However if I can provide any more data I'd be quite happy to help remove this behavior from Zathura.
Thanks,
Ryan
Offline
hi all, after recent updates (poppler??) zathura shows only a black srceen instead of the content of pdf files (i686).
$ zathura myfile.pdf
error: could not load plugin /usr/lib/zathura/pdf.so (/usr/lib/libpoppler-glib.so.8: undefined symbol: cairo_mesh_pattern_begin_patch)
info: Using plain database backend.
error: unknown file type
edit: if I downgrade to poppler (0.20.0-1 => 0.18.4-2) and poppler-glib (0.20.0-1 => 0.18.4-2) it works fine.
Last edited by ubuntubang (2012-05-26 13:27:48)
Offline
hi all, after recent updates (poppler??) zathura shows only a black srceen instead of the content of pdf files (i686).
$ zathura myfile.pdf error: could not load plugin /usr/lib/zathura/pdf.so (/usr/lib/libpoppler-glib.so.8: undefined symbol: cairo_mesh_pattern_begin_patch) info: Using plain database backend. error: unknown file type
edit: if I downgrade to poppler (0.20.0-1 => 0.18.4-2) and poppler-glib (0.20.0-1 => 0.18.4-2) it works fine.
The plugins have to be rebuild with the newer version of poppler.
Best regards
Offline
seems to be this can only be reproduced if using cairo-ubuntu from the AUR
no problem with Extra/cairo
Offline
seems to be this can only be reproduced if using cairo-ubuntu from the AUR
no problem with Extra/cairo
yup, I have the same error. So you have to downgrade the plugin to make it work ? Is there any other solution ?
When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles
Offline
Hello,
ubuntubang wrote:seems to be this can only be reproduced if using cairo-ubuntu from the AUR
no problem with Extra/cairoyup, I have the same error. So you have to downgrade the plugin to make it work ? Is there any other solution ?
I just build cairo-ubuntu (and its dependencies) and rebuild zathura as well as zathura-pdf-poppler and I am not able to reproduce your issues. Just rebuild your plugin.
Best regards
Offline
Hello,
nXqd wrote:ubuntubang wrote:seems to be this can only be reproduced if using cairo-ubuntu from the AUR
no problem with Extra/cairoyup, I have the same error. So you have to downgrade the plugin to make it work ? Is there any other solution ?
I just build cairo-ubuntu (and its dependencies) and rebuild zathura as well as zathura-pdf-poppler and I am not able to reproduce your issues. Just rebuild your plugin.
Best regards
Thanks for your help. I will retry this when I'm home
When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles
Offline
@mlq
Could you also update the doc of girara?
i plan to build something with girara, but only zathura uses this library, and there is not a lot code examples out there.
"After you do enough distro research, you will choose Arch."
Offline
@mlq
Could you also update the doc of girara?
i plan to build something with girara, but only zathura uses this library, and there is not a lot code examples out there.
When we have enough free time, we will for sure. Right now there is a small example online and besides the source code of zathura you could take a look at the source code of jumanji. In addition the code is well documented and you can find a generated doxygen documentation on our website. If you have any questions feel free to join the IRC or write to the mailing list.
Best regards
Offline