vpdf

watto · 11401

watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
on: November 11, 2018, 03:56:04 AM
Hello there,

Just thought you guys may be interested in some vpdf progress.

There are plenty of issues still, but I seem to have figured out why it was crashing... seems to be connected to truetype fonts.  Seems to crash whilst reading them in, but could be connected to rendering also.  This is building ok on ABI 1 using normal mmake script, I think on ABI 0 there'll be some issues with the MUI child lookups, but haven't checked just yet.

If anyone would like to help me out with some ideas on this, please let me know.  Otherwise I'll keep hacking away at it until we hopefully get something usable.  Worst case I'll see if some of the improvements can be brought over to AROSPDF.

If it helps, I'm the guy who did the original AROSPDF (about 10 years ago), and a few other things.  It's been a while since I've worked on AROS/Amiga, pretty rusty, but I hope I can get a couple things done at least.  I've got a list of things I'd like to port/fix, time permitting.



ch1ll

  • Newbie
  • *
    • Posts: 31
    • Karma: +0/-0
Reply #1 on: November 11, 2018, 05:48:35 AM
Hi watto,

thanks for your effort.
I compiled Odyssey with ABI_V0 and I also noticed the crash while opening forms with child lookup (Bookmarks and Cookie). Please keep me posted if you fix the issue. Of course if I'll do the same with you if I have news on this topic.

Cheers



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #2 on: November 11, 2018, 06:49:38 AM
hi watto
it would be good to fix this up. we were looking at it with neil and afair he came to similar conclusion. commenting out some section of code retated to fontconfig, which i dont rememeber, i might be able to recall though, made it work on abi v1 386 to an extent, has though never worked for other platforms at least big endian ones.

i thought btw, arospdf was more advanced, and it works too, but it might be worthwhile to check up vpdf as well, and review whatever i have commited if it holds any water.



watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
Reply #3 on: November 11, 2018, 06:50:21 AM
Does it use MUIM_Family_GetChild or MUIM_Group_GetChild?  These didn't seem to do anything under ABI 0, at least whichever version of it I had under icaros.  I could find items by iterating through the ChildList instead but not 100% on whether that was getting the right data either.

If I can get vpdf working right on ABI 1, I'll try to port it back to ABI 0 - obviously other issues in vpdf at the moment and it may well just have been those causing the crashes.

There are also some uses of InitChange in vpdf code that aren't checking for the result, which I don't think is the best behaviour, maybe was done to get past some failures though.



watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
Reply #4 on: November 11, 2018, 07:25:37 AM
AROSPDF uses the Splash backend vs Cairo in vpdf and is build off of xpdf vs Poppler which is newer and probably a bit better for newer PDF versions.  Aside from that there are several features in vpdf that would take some time to re-implement in AROSPDF.

If I was to re-do AROSPDF I'd want to use Poppler and Cairo anyway.  Ideally we could pull Poppler out into a library or DataType or something ridiculous but I'd have to leave that to someone who knows what they are doing :)

When I did AROSPDF there wasn't any proper PDF viewer in AROS (no offence to PoorPDF), it was pretty much a quick and dirty MUI front-end to xpdf with most stuff stripped out.  I then got busy at work, moved countries, got married, bought a house, renovated it, sold it, finished a University degree and moved countries again, so pretty much had no time to support it and ScummVM, etc. that I had been working on.  I'll hopefully have more time to keep things maintained now.



wawa

  • Senior Member
  • ****
    • Posts: 265
    • Karma: +55/-0
Reply #5 on: November 11, 2018, 08:22:10 AM
i applaud your effort. in fact the inability to finally fix up vpdf as well as few other (mostly mui/zune frontend equipped) contribs (for differnet reasons) has been driving me nuts. ill try to be of as much assistance as possible, but im not sure if i can competently help and answer your questions especially where aros internals are considered, as im not or a very lousy coder, at best.

best is to as questions on aros ml. or for fast interaction (hopefully) join a slack chanel. as i proposed elsewhere. pm me with your email if you are interested and ill invite you there.



sabbate

  • Guest
Reply #6 on: November 11, 2018, 09:11:15 AM
Thanks watto, I hope you can also take a look at soundfx is a tool for mmusicisti that would come in very useful  ;)

salvatore



watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
Reply #7 on: November 11, 2018, 11:03:12 AM
This has been a productive day :)  Fonts are working.  Main issue was an enum that defined some names with the same values as some char constants used by fontconfig.  The fonts were using the char constants to look up values in an array - obviously the indexes were way off what they should've been causing the crashes.  If there weren't so many warnings already I'd probably have noticed it before.

Still some issues with thumbnails, a couple UI functions not working, but as you can see it's displaying PDFs fine.



watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
Reply #8 on: November 11, 2018, 11:06:58 AM
And proof the fonts work correctly (I think) now...



mmartinka

  • Newbie
  • *
    • Posts: 48
    • Karma: +4/-0
Reply #9 on: November 11, 2018, 11:11:12 AM
This has been a productive day :)  Fonts are working.  Main issue was an enum that defined some names with the same values as some char constants used by fontconfig.  The fonts were using the char constants to look up values in an array - obviously the indexes were way off what they should've been causing the crashes.  If there weren't so many warnings already I'd probably have noticed it before.

Still some issues with thumbnails, a couple UI functions not working, but as you can see it's displaying PDFs fine.
Ooooo thanks for work  :)



Gundam

  • Guest
Reply #10 on: November 11, 2018, 11:34:03 AM
@watto:

is it for abi V1 32 bit or 64 bit ?


I see that the colors are not correct; endianness issue maybe ?
« Last Edit: November 11, 2018, 11:50:27 AM by Gundam »



watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
Reply #11 on: November 11, 2018, 11:52:41 AM
32bit - images are from linux-i386 hosted.  Not sure if there'd be any issues with it working on 64bit.

Once I've fixed the remaining issues and cleaned up all my unnecessary hacks and debug output I'll get a diff up and binaries for testing, then look at building on ABI 0.  I expect some MUI problems on ABI 0 - was trying to build it on there before and had to add quite a few workarounds for it and code commented out..  I'll try removing the fonts on there and see if it magically starts displaying stuff - if that works, good chance it just needs my changes and maybe a couple features taken out or re-implemented.

Not 100% on the ABI v0/1 situation, looks like we're on a 2016 branch for v0?  Fairly sure I've lost my SVN access anyway so I'll need to fix that up so I can push stuff back.



Gundam

  • Guest
Reply #12 on: November 11, 2018, 11:58:06 AM
32bit - images are from linux-i386 hosted.  Not sure if there'd be any issues with it working on 64bit.

Once I've fixed the remaining issues and cleaned up all my unnecessary hacks and debug output I'll get a diff up and binaries for testing, then look at building on ABI 0.  I expect some MUI problems on ABI 0 - was trying to build it on there before and had to add quite a few workarounds for it and code commented out..  I'll try removing the fonts on there and see if it magically starts displaying stuff - if that works, good chance it just needs my changes and maybe a couple features taken out or re-implemented.

Not 100% on the ABI v0/1 situation, looks like we're on a 2016 branch for v0?  Fairly sure I've lost my SVN access anyway so I'll need to fix that up so I can push stuff back.


abi v0 is becoming obsolete; abi v1 is the main branch and we should gradually move to it, finally abandoning abi v0.



watto

  • Newbie
  • *
    • Posts: 16
    • Karma: +0/-0
Reply #13 on: November 11, 2018, 12:35:04 PM
Appreciate what you're saying, but most of the existing software and distros are for ABI 0 as far as I know.

I already develop for ABI 1 first. I'll aim to make my work available for both for now.



aha

  • Junior Member
  • **
    • Posts: 66
    • Karma: +41/-0
Reply #14 on: November 11, 2018, 01:01:41 PM
@watto

Thank you very much!