sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
21 stars 7 forks source link

piclist blew up in size #929

Open KimB2017 opened 7 months ago

KimB2017 commented 7 months ago

See https://community.scripture.software.sil.org/t/ptx-project-corrupt/3718/2.

My piclist had an error due to using the wrong keyman layout while editing it outside of PTXPrint :(. I don't know if this was the cause of the piclist problem, but it was still growing when I shut down PTXPrint and took this screenshot.

I think PTXPrint hung when I tried creating an archive of the layout with the 89MB piclist file. I think perhaps the file was still growing so this archive is of another layout that contained the same piclist malformed line at GEN 3.6. image

nsnNehan-CheckingBookA5PTXprintArchive.zip

markpenny commented 7 months ago

@KimB2017 Wow! That is serious. We've seen this happen once before, and that time it was due to someone trying to use a legacy encoding (the project had not been converted to Unicode properly, leaving some captions with legacy data). I don't think that the cause is the same this time, but could you please confirm that this project shouldn't have any legacy data in it.

When running your archive, I am able to get it to work after fixing the position of the GEN 3.6 image; but even then it isn't consistent, so I'm digging deeper. It might be something to do with the cutouts ... but nothing conclusive yet,

markpenny commented 7 months ago

@davidg-sil I'm getting strange and inconsistent result between runs. Are you able to look at the above archive to see if you can make any sense of what is happening?

image

Okay, it is something to do with \zimagecopyrights not working as expected and causing it to fail. If you take that out of the Colophon, it works predictably.

markpenny commented 7 months ago

@KimB2017 Aha - found it. In the Copyright attribution field for the image in GEN 3.6, it had the letters 'GR' which seem harmless, but in the world of TeX, this ends up in the .piclist file looking like this:

image

Somehow it seems to be getting mixed up with GRaphite, and then goes BOOM! :-(

So all you need to do to fix it (or work around the bug/feature) is to change GR to its full form: image

markpenny commented 5 months ago

@mhosken Is there anything that can be done to protect us from this {GR} bomb? Or is there something else going on which I'm not aware of?

markpenny commented 5 months ago

This is fixed in ver 2.4.8 to be released soon. It wasn't strictly related to {GR}, but rather due to having an unrecognized artist code/name which is less than 6 characters in length. In future an appropriate warning message will be issued rather than blowing up completely.