On Thu, Mar 26, 2009 at 11:23:23AM +0100, Vincent van Ravesteijn - TNW wrote: > If I start LyX, create a new document while the mouse is in the > workarea, LyX asserts in TextMetrics::pitNearY, which is called by > checkInsetHit: > > LASSERT(!par_metrics_.empty()) > > Abdel, why is this assert there ? When is the cache (par_metrics_) being > filled ? > > I only see this in trunk and with Qt4.5 (although all different > branches/versions/qt-versions are getting messed up a bit). > > Anyone else seeing this ?
Yep, already reported here: http://thread.gmane.org/gmane.editors.lyx.devel/115363/focus=115526 Contrarily to what I stated there, it also occurs on Linux. The second problem reported there, was due to the syntax highlighter problem and is now fixed. Your previous patch would work if only done once, something like this: static bool done = false; if (!done) { parMetrics(0, false); done = true; } would work, instead of unconditionally calling parMetrics() in the TextMetrics constructor. -- Enrico