TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I add a pdf figure into lyx the preview works only for the current session. When I restart Lyx I get an error: Error loading file into memory. This only seems to occur with .pdf files (i.e. not with .svg or .png) and has no effect on the final rendered PDF document.

I've seen references to this bug in several places online but in those case the issue was that previews were never generated. Also, I have pdf2ps and pdftoeps installed so this shouldn't be the problem either.

Running Kubuntu 12.04; Lyx 2.04

share|improve this question
Hard to tell what's going on without more info. You could try running LyX from the command line with lyx -dbg graphics and posting the output around when the error occurs. It could be a caching problem. You could also try using the Ubuntu PPA to get a development version of LyX to see if that fixes the problem: launchpad.net/~lyx-devel/+archive/daily – scottkosty Nov 3 '12 at 2:02
Well, running lyx -dbg graphics spewed tons of text which I couldn't redirect to a file using lyx -dbg graphics > out. Of the text left on the shell screen I couldn't find anything that would be the obvious piece of information. I might try to get lyx straight from the PPA but I'm afraid of bugs. – Roey Angel Nov 3 '12 at 17:54
There are less bugs in the PPA 2.0 package (which will be released as 2.0.5 shortly). The debug information is printed to standard error so you have to redirect with lyx dbg graphics > out 2>&1. That will redirect both standard out and standard error to the file out. – scottkosty Nov 3 '12 at 21:27
Adding:deb http://ppa.launchpad.net/lyx-devel/daily/ubuntu quantal main deb-src http://ppa.launchpad.net/lyx-devel/daily/ubuntu quantal main To my resource list didn't help (I'm not getting any new version from it). Also it turns out I have the latest version from the ppa:lyx-devel/release (the ubuntu repos have an older version of lyx). – Roey Angel Nov 4 '12 at 18:37
OK. Three separate ideas: (1) For the PPA, because the authors didn't want to overwrite your current LyX installation, the package is named differently. After you do a sudo apt-get update do sudo apt-get install lyx2.0 (which will install what will become 2.0.5 soon) or sudo apt-get install lyx2.1 (maybe less stable but maybe fixes your problem). (2) maybe try just Tools > Reconfigure. Sometimes that can solve things. (3) if nothing works, send a message to the mailing list: lyx-users@lists.lyx.org – scottkosty Nov 4 '12 at 23:43
up vote 1 down vote accepted

As scottkosty suggested in his comment, the bug is seemed to be solved in Lyx 2.05 and above which can be obtained directly from the daily build ppa (ppa:lyx-devel/daily) by installing packages lyx2.0 or lyx2.1.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.