You are not logged in.

#226 2012-04-14 22:20:55

jmartl109
Member
Registered: 2011-03-17
Posts: 25

Re: zathura - a document viewer

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

#227 2012-04-14 23:40:59

donbex
Member
Registered: 2010-12-23
Posts: 53

Re: zathura - a document viewer

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

#228 2012-04-17 06:51:05

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: zathura - a document viewer

@donbex: Thanks for your efforts. It just makes its way in the repo.

Offline

#229 2012-04-17 19:26:26

Mr_Kartoffelsalat
Member
Registered: 2012-04-17
Posts: 29

Re: zathura - a document viewer

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)

Last edited by Mr_Kartoffelsalat (2012-04-17 19:36:13)

Offline

#230 2012-04-17 20:51:44

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

Hello,

Mr_Kartoffelsalat wrote:
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

#231 2012-04-17 22:02:53

Mr_Kartoffelsalat
Member
Registered: 2012-04-17
Posts: 29

Re: zathura - a document viewer

Thank you so much !! Everything works fine again.
cheers

Offline

#232 2012-04-18 08:58:06

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: zathura - a document viewer

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

#233 2012-04-21 06:59:57

ubuntubang
Member
Registered: 2012-03-28
Posts: 17

Re: zathura - a document viewer

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

#234 2012-04-21 07:16:19

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: zathura - a document viewer

See post #183.

Offline

#235 2012-04-21 14:57:52

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

Re: zathura - a document viewer

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

#236 2012-04-21 15:10:04

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

misc wrote:

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

#237 2012-04-26 05:25:42

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: zathura - a document viewer

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

#238 2012-05-15 02:57:40

measure
Member
Registered: 2009-07-17
Posts: 62

Re: zathura - a document viewer

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

#239 2012-05-15 05:54:18

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

Hello,

measure wrote:

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.

measure wrote:

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

#240 2012-05-15 11:36:08

measure
Member
Registered: 2009-07-17
Posts: 62

Re: zathura - a document viewer

Dear mlq,

mlq wrote:

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.

mlq wrote:

This is a known issue. We are working on it.

Ah, sorry I did not pay more attention.


Thanks,
Ryan

Offline

#241 2012-05-15 19:01:36

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

Hello,

measure wrote:

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

#242 2012-05-15 23:33:48

measure
Member
Registered: 2009-07-17
Posts: 62

Re: zathura - a document viewer

Dear mlq,

mlq wrote:

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

#243 2012-05-26 12:15:36

ubuntubang
Member
Registered: 2012-03-28
Posts: 17

Re: zathura - a document viewer

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

#244 2012-05-27 08:15:40

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

ubuntubang wrote:

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

#245 2012-05-27 20:33:34

ubuntubang
Member
Registered: 2012-03-28
Posts: 17

Re: zathura - a document viewer

seems to be this can only be reproduced if using cairo-ubuntu from the AUR
no problem with Extra/cairo

Offline

#246 2012-06-04 04:06:05

nXqd
Member
Registered: 2010-07-01
Posts: 173

Re: zathura - a document viewer

ubuntubang wrote:

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

#247 2012-06-04 05:46:29

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

Hello,

nXqd wrote:
ubuntubang wrote:

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 ?

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

#248 2012-06-04 06:55:52

nXqd
Member
Registered: 2010-07-01
Posts: 173

Re: zathura - a document viewer

mlq wrote:

Hello,

nXqd wrote:
ubuntubang wrote:

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 ?

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

#249 2012-06-04 07:38:42

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: zathura - a document viewer

@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

#250 2012-06-07 07:41:17

mlq
Member
Registered: 2011-03-15
Posts: 171
Website

Re: zathura - a document viewer

taylorchu wrote:

@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

Board footer

Powered by FluxBB