[Marble-devel] Re: Problem with map creation

Dennis Nienhüser earthwings at gentoo.org
Mon Jun 13 02:59:43 CEST 2011


On 13.06.2011 00:21, Mülner, Helmut wrote:
> Hi,
> I think I found the cause of the problem (but no solution):
> It is a data race condition caused by the QFileSystemWatcher which results in a rebuild of the
> m_mapThemeModel in MapThemeManager::updateMapThemeModel() which leads to undeterministic chaos, made worse by the existance of 3 (three!) MapThemeManagers, see:
> C:\source\marble-trunk\marble\src\ControlView.cpp(80):    m_mapThemeManager = new MapThemeManager;
>   C:\source\marble-trunk\marble\src\lib\MapViewWidget.cpp(162):        d->m_mapThemeManager = new MapThemeManager();
>   C:\source\marble-trunk\marble\src\lib\MarbleModel.cpp(82):          m_mapThemeManager( new MapThemeManager( parent )),

Good catch. I removed two of them for a start, git master only contains
the one in the model now.

I can reproduce the focus losing here. It's caused by the tile creation,
which triggers changes in the watched directories, which lead to a model
reset. Maybe that can be extended to only recreate affected themes. Not
sure if it's worth the effort. A simpler workaround would be to store
the name of the selected map theme and re-select it after a model reset
and re-population.


More information about the Marble-devel mailing list