I am facing a strange problem with Skim being unable to open a dvi file in a certain location after logout/reboot. Specifically, I have a directory ~/Dropbox/PAPERS/Paper1 which is soft linked to ~/PAPERS/Paper1:
$ls -l ~/PAPERS/Paper1
lrwxr-xr-x me mygroup 30 24 Sep 22:37 /Users/me/PAPERS/Paper1 -> /Users/me/Dropbox/PAPERS/Paper1
In ~/Dropbox/PAPERS/Paper1, I have file U10.3.dvi. The file contains an eps figure. When I try to open the file with Skim, using the terminal command "open -a Skim.app ~/Dropbox/PAPERS/Paper1/U10.3.dvi", I see a progress bar showing that the file is being converted into a PDF file, then the message "The document "U10.3.dvi" could not be opened." appears. The same message appears if I use "open -a Skim.app ~/PAPERS/Paper1/U10.3.dvi", i.e., when I am referring to the file location in the symlinked directory, and even if I copy the file into ~/Dropbox/PAPERS/Paper1-backup/, which is not symlinked to anything. On the other hand, If I copy the file into the parent directory ~/Dropbox/PAPERS/, Skim opens this file just fine.
Removing the figure solves this issue, and I can open the file in its original location ~/Dropbox/PAPERS/Paper1, but of course I need that figure:-).
Amayzingly, closing Skim and reopening it again solves the problem but only until next logout/reboot.
The details of my system: Skim 1.4.36 (110), MacOS High Sierra 10.13.6.
I cannot make any sense out of what you are seeing. There is nothing
different in Skim between logout an reboot. Also any symlinks should not
make a difference, or an embedded image.
Does conversion on the command line using dvipdfmx work?
Could you attach a copy of the device file?
Sure, please see attached.
I can confirm that the issue arises for me when I log out while Skim is still open and is reopen on the next login.
Last edit: Coverup Unison 2018-10-18
You just logiut and login? And how is Skim reopened, do you have auto
restoring or in your system prefs?
Yes, just logout and login. When I log out, the window pops up asking to confirm. It contains a checkbox "Reopen windows when logging back in" which is always checked. When I log back in, all applications reopen including Skim. In the Skim preferences, the option to reopen the last open files at startup is inchecked.
I can reproduce your problem even without all the symlinks, so that's a red herring. It sometimes works, most of the time doesn't, I canot really get a good consistent way when it does or doesn't.
Burt anyway, when it fails it is because the dvipdfmx conversion command fails. For us, that's unfortuantely where it stops, we cannot make that command to work when it doesn't. The bug is in dvipdfmx, there is nothing we can do about that.
Obne way out could be to try another conversion command. This can be through a hidden preferences, as described on the Wiki. But in my tests also dvipdfm fails.
This is the error I get from dvipdfmx, the tool seems to have some problem with the eps figure:
dvipdfmx⚠️ Filtering file via command -->rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoRotatePages=/None -sOutputFile='/var/folders/x6/_l7hpk053l9dqz9cgg7qdysh0000gn/T/dvipdfm-x.e261ed4dbeb7991c9b9266380c2ca944' './Q2.eps' -c quit<-- failed.
dvipdfmx⚠️ Image format conversion for "./Q2.eps" failed...
dvipdfmx:fatal: pdf_ref_obj(): passed invalid object.
Output file removed.