LyXBuffer Update fails without Error

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
jasonmtroos
Posts: 2
Joined: Fri Mar 09, 2012 6:16 pm

Buffer Update fails without Error

Post by jasonmtroos »

I have a LyX document (custom dissertation class based on book) with seven child LyX documents (class=article, included type=Input). When I compile the master document using LyX 2.0.3 (the problem first appeared while I was still using 2.0.2, I think) on Windows XP SP2, I get unpredictable results as follows:
  1. Click on View (or Update) button (I am compiling with pdflatex)
  2. One of the following occurs, and I am not able to predict which:
    1. LyX assembles the document without any problems
    2. LyX begins assembling the document and does not finish
    3. LyX does not appear to even begin assembling the document. This outcome seems like a variant of (b).
  3. After either (2b) or (2c), the Update and View buttons are disabled, as are the corresponding entries under the View menu. Moreover, the View and Update commands for other file types are also disabled. LyX reports "command-disabled" when I attempt to compile using ctrl-shift-R. I have not been able to get LyX out of this state. If I try to close LyX, I get one of two outcomes:
    1. A modal dialog: LyX could not be closed because documents are being processed by LyX.
    2. A clean close. This seems to happen if I let the app run for a few minutes before trying to close.
  4. While all of this is happening, the LyX interface is responsive, and the CPU is not pegged. I can edit and save documents without any problems. But I'll never be able to compile a document until I exit and restart LyX.
  5. I have checked debug output and there does not appear to be anything particularly illuminating. After about 5000 lines of output, I get this:
    Warning: Different textclasses
    ----------------------------------------
    Included file `D:\...path to child doc...\...name of child doc....lyx'
    has textclass `article'
    while parent file has textclass `dukedissertation'.
The child doc above is not the last one in the document -- there are two more to go. And the document is probably the simplest one of the bunch -- just two paragraphs with some very simple inline math. I just replicated the problem and it stopped at the same place.

I have had this happen with another large document (one of the child docs -- but one that compiled prior to the error above), as well as with a document that embeds many of the same children. I have searched for other users reporting similar behavior and have come up empty. I have tried to construct a MWE and have not been able to replicate -- hence the size of the documents might be a factor. (Perhaps this is related to a shortage of memory?) Anyway, I understand I may not get very specific advice here--but I'm hoping for some helpful suggestions. I am also documenting this problem in case others have run into it as well.

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

Buffer Update fails without Error

Post by justdeath »

Welcome to the forum!

So it is not point 5, it was very easy to reproduce this by including a child document with a different class.

There are too possible options:

1. You have too large project, and it fails to build for unknown reasons.
Solution: Start a new project and make as less child files as possible, just put several chapters/sections in one child file.

2. The Lyx installation has been corrupted.
Solution: Remove Lyx, also remove the folder in Program files, go to Start -> Run -> regedit, ENTER, check and delete the Lyx keys in Local machine and Current user. Then better restart, download Lyx again and install.

Instead of messing with the registry you can use CCleaner: http://filehippo.com/download_ccleaner/ After removing Lyx, open CCleaner -> Registry -> Scan for issues, which will delete the Lyx registry entries if there are any.

Hope this helps.

Nikolay
jasonmtroos
Posts: 2
Joined: Fri Mar 09, 2012 6:16 pm

Re: Buffer Update fails without Error

Post by jasonmtroos »

Hi Nikolay,

Thank you for the suggestions. I have already tried #2 -- reinstalling -- and I suspect, but can't confirm, that this bug is related to #1.

For now, however, things appear to be working again. I changed my child documents to have the same class as the parent and, coincidentally, I have not seen this bug since. So while I'm not going to rule out #5 just yet, I don't believe that's what really fixed my problem. It could easily have been the case, for example, that something else going on with my system changed at the same time (e.g., a memory-intensive process may have exited).

I'm marking this as solved for now, but I would be interested in hearing from anybody else who has had this or similar problems. I have a feeling this isn't over...

Jason
guest

Re: Buffer Update fails without Error

Post by guest »

Hi there, I want to add that I am currently experiencing the described problem: I am editing in chapter 6 of my phd thesis and can only update one time after I have restarted LyX. When I try to update the master buffer after the first time, nothing happens, as if LyX hasn't registered that I have made edits to the text in chapter 6. When I go to a previous chapter and make edits, then it is possible to update, and the also the edits in chapter 6 appears..? Very strange.

If I use the "includeonly" option to only include very few chapters and chapter 6, then suddenly it appears as if the problem has gone, now I can make edits to chapter 6 and update the master buffer while standing in the chapter-6 child document. This seems to suggest to me that the problem has something to do with the length of the document that is supposed to be compiled by latex, it seems that if there is "too much" to the point where one is standing, then lyx does not see the edits. This agrees with the fact, that when I "includeonly", then chapter 6 is no longer "so far down", and lyx can see the edits. Does this make sense? Anybody else who has experienced this?
khaume
Posts: 1
Joined: Thu Jun 13, 2013 5:32 am

Re: Buffer Update fails without Error

Post by khaume »

I have just now experienced the same issue as OP with Lyx 2.0.5.

In my case I have a master document with 7 children, with one of them containing an additional 2 children, where one of them has its own 3 children. This means that one of the master's children has 3 layers below it.
I get the problem described, where nothing happens when I want to view the output with the "View" command in Lyx. Nothing happens, and I can continue working, saving and everything, I just cannot get any view/output, and the buttons become blocked. I then also face 3) in original post.

I noticed the following:

My master has a different document class than the children (which all have identical class)
Normally Lyx warns about it, but continues to show the output but not this time.

If, however, I do one of the following, the output works as per usual:
1) Exclude the child which has several layers of children itself
2) Change the master document to have the same document class as the children (I have not yet tried the other way around - changing all the children)
By the way, all the children use 'Report' while master uses 'Report(KOMA)'

For now, though, the problem is not present, due to the identical classes of master and children.

EDIT/UPDATE
I tried to remove the child document that has layers under it while using 'report(KOMA)' on master and 'report' on children. Same result - nothing happens.

When I tried to use some other document class, that also was different from all the children, it DID work, even with the aforementioned child. It thus seems to be not a problem with children with subchildren, but the class 'report (KOMA)'. The strange thing is, that it worked a few days ago. Perhaps it has got to do with the fact that I dismissed the warning and told it to not warn me again?

EDIT/UPDATE/ SOLVED
It works now with report(KOMA)! The problem was, as I assumed, that I had dismissed the warning. To bring back the warning of different document classes for master and children, I did Tools --> Reconfigure. This brought back the warning which I then just dismissed (but did not say "Don't show again") and then it worked.
The problem then seems, at least for me, to be telling the warning to not show again which apparently makes Lyx stuck in some weird state.

Can anyone confirm this behavior?
Ps, I have left all my edits for people to see the things I tried.
Post Reply