Quote:
Originally Posted by bdbcat
did-g...
What part of LoadHeader() is not thread-safe? There is a texture factory class instance per chart. No static storage, AFICT.
Dave
|
I don't know but if transmitterdan patch actually works it only could be a
race somewhere:
before in the same function
delete m_fs; // now it's invalid
... some stuff in the same function
all paths end in
m_fs = new ...// now it's valid again
after
delete delete m_fs; // now it's invalid
m_fs = nullptr
... some stuff in the same function
so something in a separate thread was using m_fs and
m_fs = nullptr only reduces the time it is invalid
I made a PR which seems to fix all crashes I could reproduce
https://github.com/OpenCPN/OpenCPN/pull/1084
Anyway with c++11 we can get ride of that kind of hard to get right code soon.