This bug is driving me mad currently. Abdel gave some explanation: http://bugzilla.lyx.org/show_bug.cgi?id=3118#c3
Unfortunately I don't understand it. AFAIK the coord cache is set by calling setPosCache(pi, x, y); in an inset. I did not check all insets, but in those I checked (including InsetText and InsetTabular) this is done in the draw() method. Abdel, can you please explain how the coord cache is set in the metrics method? My next question is about InsetMathNest::cursorPos(). This code if (!coord_cache.getArrays().has(&ar)) { // this can (semi-)legally happen if we just created this cell // and it never has been drawn before. So don't ASSERT. //lyxerr << "no cached data for array " << &ar << endl; x = 0; y = 0; return; } looks really like a bad hack. If we make sure that the coord cache is always set in the metrics method as Abdel suggests, then I don't see how we could get here with an invalid coord cache, and we could assert here. Georg