WrapEarnPass left a comment (geany/geany#4620)
I "dethreaded" that to
```
std::vector<std::future<void>> futures;
for (size_t th = 0; th < threads; th++) {
printf("%s %s %d\r\n", __func__, __FILE__,
__LINE__);
// Find relative positions of everything except
for tabs
LayoutSegments(pCache, surface, vstyle, ll,
segments, nextIndex, textUnicode, false);
}
```
So LayoutSegments is just called immediately.
No more crashes. Key entry works normally.
I think this may be a bug in Scintilla.
Scintilla as late as 5.6.4 still has the LayoutSegments in a std::future.
Editor.cxx also uses std::future, but those calls are mutex guarded.
```
// Protect the line layout cache from being accessed from multiple threads
simultaneously
std::lock_guard<std::mutex> guard(mutexRetrieve);
ll = view.RetrieveLineLayout(lineNumber, *this);
```
I'll try to see if adding a mutex to EditView helps with crashy.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4620#issuecomment-5026273149
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/4620/[email protected]>