Am Montag, 5. November 2018 11:20:33 CET schrieb Richard Kimberly Heck <rikih...@lyx.org>: > On 11/4/18 5:35 AM, Kornel Benko wrote: > > I am hunting an error, which only shows if I disable the debug output. > > So, using '-dbg find', there is no error, the findadv routines work OK. > > > > Without this, the outcome is surprising. > > For instance open a file with some text in English and some in another > > languages. > > > > In findadv deselect 'igmore format' > > use regex '.+' and set the lang of regex to English > > > > Now, sometimes, not the whole English part is found. > > The following search will find the remaining (or again only a part of the > > remaining) and so on. > > > > The question is: What the hell is going on here? The code is the same, > > only the debug output changes the behaviour. > > Also debugging is difficult, because the wrong behaviour does not > > appear consistently. > > That makes it sound like some kind of race condition. Are we doing > background processing here somewhere?
According to outputs of the debugger, yes. Plenty. But I thought, the reason was QT. > Riki For me it looks like some variables are not initialized correctly in calls to TeXOnePar(). Indication to this is the following behavior: 1.) Start searching for bold strings (no ignore format) \textbf{\regexp{.+\endregexp{}} 2.) After a while (many string found and correct) there is a too short match, then the next and so on. Later, starting anew on the position where the wrong matches previously started, all matches are OK at first, and the wrong matches are coming at another position. But NEVER seen under gdb or if the debug 'find' is in effect. Kornel
signature.asc
Description: This is a digitally signed message part.