It was not very easy to find but the fix is simple and is obvious once found. The problem is that a screen update needs a bibtex key for proper rendering of the Citation. This key requires the master document to load all child document, which trigger an additional screen update, even when we don't switch buffer. The problem is that we are already in the process to update the screen, hence the crash.

Only one OK is sufficient for this one... OK?

Abdel.

Index: LyXFunc.cpp
===================================================================
--- LyXFunc.cpp (revision 18982)
+++ LyXFunc.cpp (working copy)
@@ -1441,6 +1441,11 @@
                        } else
                                lyx_view_->loadLyXFile(filename, true, true, 
autoOpen);
 
+                       // If a screen update is required (in case where 
auto_open is false), 
+                       // loadLyXFile() would have taken care of it already. 
Otherwise we shall 
+                       // reset the update flag because it can cause a 
circular problem.
+                       // See bug 3970.
+                       updateFlags = Update::None;
                        break;
                }
 

Reply via email to