Summary: | Kstars crashes due to change in density of stars | ||
---|---|---|---|
Product: | [Applications] kstars | Reporter: | Sandesh <sandeshkalantre> |
Component: | general | Assignee: | Akarsh Simha <akarsh.simha> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | mutlaqja |
Priority: | NOR | ||
Version: | 2.0.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Sandesh
2012-02-03 03:10:30 UTC
I hit this bug as well today. I changed the density of stars and enabled two catalogs that were not enabled earlier. Will look into it. Thanks for the report. Okay, I can reproduce this bug fairly frequently, but not every time. It looks like trying to draw while the constellation lines are still being reloaded is the problem, but I don't know if that's true. Git commit 51c5f967e5954ef36682361889f252b49a8f9af3 by Akarsh Simha. Committed on 05/02/2012 at 23:39. Pushed by asimha into branch 'master'. Possible fix for bug #293183. The crash was caused by the following sequence of events: * To reload constellation names / lines, the SkyMapComposite::reloadConstellationLines etc methods would delete the m_CNames and m_CLines instances and create new instances. * In the process, the ConstellationNames etc constructors would emit progress text by way of SkyMapComposite::emitProgressText(). * This would display a splash screen (for too short a while to be seen most of the time. Maybe possible on slow computers). The splash screen seemed to call for a redraw of the sky map behind it. * The redrawing of the sky map would access the m_CNames / m_CLines pointers and thereby cause a crash in many cases. This crash sequence was verified by making the following change in reloadConstellationLines and reloadConstellationNames: * After delete m_CNames / m_CLines, add a m_CNames = 0 and m_CLines = 0 The crash was reproducible _every time_ after this change (since the pointers were now NULL and not pointing to an older block of memory) and the backtrace after this change showed a call to a ConstellationNames method with this = 0x0. So this patch fixes the problem by making sure that we prevent the drawing process while updating the constellation names / lines. The code added (in the previous commit) also prevents recursive and concurrent draws. I'm not sure if this is the cleanest and the best solution. I'm copying the mailing list to invite comments on this. Will backport to 4.8 CCMAIL: kstars-devel@kde.org M +8 -0 kstars/skycomponents/skymapcomposite.cpp http://commits.kde.org/kstars/51c5f967e5954ef36682361889f252b49a8f9af3 |