Introduce a PDF Viewer, and its behaviour like Vim

320 views
Skip to first unread message

Alf

unread,
Nov 11, 2008, 7:02:31 AM11/11/08
to vim...@googlegroups.com

Dmitry V. Krivenok

unread,
Nov 11, 2008, 10:12:25 AM11/11/08
to vim...@googlegroups.com

Hello!

Really good idea!
I just downloaded and built your app.
I got these errors:

krivenok@olimpico_work 18:03:04 /tmp/apvlv-0.0.3 $ ./src/apvlv
Error: Couldn't open file '/usr/local/share/doc/apvlv/Startup.pdf'

(apvlv:13616): GLib-CRITICAL **: g_path_is_absolute: assertion
`file_name != NULL' failed
Segmentation fault
krivenok@olimpico_work 18:03:25 /tmp/apvlv-0.0.3 $

I didn't install your app via "make install", so there isn't
/usr/local/share/doc/apvlv/Startup.pdf
file in my system.

Anyway, segfault is really bad thing :)

The following gdb output may be helpful:

krivenok@olimpico_work 18:07:42 /tmp/apvlv-0.0.3 $ gdb ./src/apvlv
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r
Starting program: /tmp/apvlv-0.0.3/src/apvlv
Error: Couldn't open file '/usr/local/share/doc/apvlv/Startup.pdf'

(apvlv:13643): GLib-CRITICAL **: g_path_is_absolute: assertion
`file_name != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
apvlv::absolutepath (path=0x0) at ApvlvUtil.cpp:58
58 if (*path == '~')
(gdb) bt
#0 apvlv::absolutepath (path=0x0) at ApvlvUtil.cpp:58
#1 0x0804d4aa in apvlv::ApvlvView::hasloaded (this=0xbfcbe0c4,
filename=0x0) at ApvlvView.cpp:182
#2 0x08055050 in ~ApvlvWindow (this=0x8081558) at ApvlvWindow.cpp:98
#3 0x0804d311 in ~ApvlvView (this=0xbfcbe0c4) at ApvlvView.cpp:107
#4 0x0804b9d8 in main (argc=Cannot access memory at address 0x0
) at main.cpp:90
(gdb) q
The program is running. Exit anyway? (y or n) y
krivenok@olimpico_work 18:10:22 /tmp/apvlv-0.0.3 $

bill lam

unread,
Nov 11, 2008, 10:31:45 AM11/11/08
to vim...@googlegroups.com
It also aborted with buffer overflow error message.

I use ubuntu64 if it mattes, It default to use gcc-4.3 which is more
strict and will force a buffer overflow and abort.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩277 柳中庸 征人怨
歲歲金河復玉關 朝朝馬策與刀環 三春白雪歸青塚 萬里黃河繞黑山

A. S. Budden

unread,
Nov 12, 2008, 8:57:57 AM11/12/08
to vim...@googlegroups.com
2008/11/11 Alf <naih...@gmail.com>:

Looks excellent from what I can tell from the web page. Any plans to
make this cross-platform? I spend half my time in front of Linux and
half in front of Windows, so, where possible, I try to avoid using
anything that is platform-specific as it just confuses me...

Al

Alf

unread,
Nov 19, 2008, 8:57:20 PM11/19/08
to vim_use
has windows version now.

On Nov 12, 9:57 pm, "A. S. Budden" <abud...@gmail.com> wrote:
> 2008/11/11 Alf <naihe2...@gmail.com>:
>
>
>
> > Apvlv is written by me.
>
> > It's a Vim-like pdf viewer.
>
> > Like Vim, Apvlv makes people reading their PDF files just like using Vim.
>
> > So, Apvlv bindings lots of Vim command and its behaviour is like Vim. For
> > example, < Ctrl-f > to forward page, < Ctrl-b > to previous page,
> > 'k','j','h','l' to scrolling a page up, down, left or right, and so on.
>
> > And, Apvlv can understand that how many times you want to run the command.
>
> > The only thing you need to do is typing the number before the command. For
> > example, typing '50' and < Ctrl-f > will go forward 50 pages, typing '30'
> > and < Ctrl-b > will go previous 30 pages.
>
> > What's more important, Apvlv can understand negative numbers too. If it got
> > '-50' and < Ctrl-b >, PDF document will go FORWARD (preward -50) 50 pages.
> > For example, typing '50g' will goto the 50th page, and typing '-50g' will go
> > to the 50th page from the last page to count.
>
> > And, it also support multiple window view to read multiple pdf doc.
>
> > Here is the webpage:
> >http://apvlv.googlecode.comand has a group to discuss its bugs.

A. S. Budden

unread,
Nov 20, 2008, 3:10:32 AM11/20/08
to vim...@googlegroups.com
2008/11/20 Alf <naih...@gmail.com>:
>
> has windows version now.

Thank you! It looks interesting, I'll certainly have a play around
with it. I know this is optimistic, but on the (long-term) plan, are
you intending to allow '/' to initiate a regular expression search:
this would be fabulous. Continuous scrolling would be nice too (like
acrobat's one: a sliver of grey between two pages and you can see the
bottom of page one and the top of page two at the same time).

Al

Nicolas Aggelidis

unread,
Nov 20, 2008, 5:41:51 AM11/20/08
to vim...@googlegroups.com
Excellent work! I am looking forward to see this project mature! I
will test the reader this sunday.

Marc Weber

unread,
Nov 20, 2008, 11:42:25 AM11/20/08
to vim...@googlegroups.com
On Tue, Nov 11, 2008 at 08:02:31PM +0800, Alf wrote:
> Apvlv is written by me.
>
> It's a Vim-like pdf viewer.
>
> Like Vim, Apvlv makes people reading their PDF files just like using Vim.
>
> So, Apvlv bindings lots of Vim command and its behaviour is like Vim. For
> example, < Ctrl-f > to forward page, < Ctrl-b > to previous page,
> 'k','j','h','l' to scrolling a page up, down, left or right, and so on.
Hi Alf,

Have you had a look at evince?
If you introduce the keybindings there, you'll be able to view .ps files
that way as well.

Sincerly
Marc Weber

Alf

unread,
Nov 20, 2008, 8:26:38 PM11/20/08
to vim_use
Can you split the Evince's window as freely?
Can you mark the read position and jump there as freely?

Alf

unread,
Nov 20, 2008, 8:28:33 PM11/20/08
to vim_use
Thank you for your good advice.

On Nov 20, 4:10 pm, "A. S. Budden" <abud...@gmail.com> wrote:
> 2008/11/20 Alf <naihe2...@gmail.com>:

bill lam

unread,
Nov 20, 2008, 8:35:12 PM11/20/08
to vim...@googlegroups.com
On Thu, 20 Nov 2008, Alf wrote:

>
> Can you split the Evince's window as freely?
> Can you mark the read position and jump there as freely?

Can you reproduce the errors reported by me and Dmitry?

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

唐詩023 綦毋潛 春泛若耶溪
幽意無斷絕 此去隨所偶 晚風吹行舟 花路入溪口 際夜轉西壑 隔山望南斗
潭煙飛溶溶 林月低向後 生事且瀰漫 願為持竿叟

Reply all
Reply to author
Forward
0 new messages