[Kstars-devel] Heisenbug leading to crash at Legend::setAlpha()
Aleksey Khudyakov
alexey.skladnoy at gmail.com
Thu Apr 4 13:41:39 UTC 2013
On 4 April 2013 10:26, Akarsh Simha <akarshsimha at gmail.com> wrote:
> So I'm encountering a crash when I try to "Export Sky Image" and then
> go to "Preview" to preview the legend. I'm pretty sure I introduced
> this sometime in January (see git log on imageexporter.cpp), but I
> don't know what's causing it, and how I may be able to fix it.
>
> Here's the backtrace from the crash. In my experience -- it has
> occurred at random. Only today has it been consistently crashing
> (because I actually want to get some charts made).
> http://paste.kde.org/715580/
>
> I tried to study the bug using gdb, but it's a Heisenbug -- most of
> the times when I try to study it, it disappears. I was able to track
> down very close once under gdb.
>
> In this method:
> void ImageExporter::setLegendAlpha( int alpha )
>
> When I tried using gdb to print m_Legend after the asserts, for
> example, I got an error saying it could not access that memory
> location. I don't see a place where the pointer has been toyed around
> with, so I don't see how the pointer can't point to something
> sensible. Here's the relevant interaction with gdb:
> http://paste.kde.org/715586/
>
> Any pointers will be greatly appreciated!
>
`this' pointer in ImageExporter looks suspicious. 0x222220 is strangely
regular and very far off another pointer which appears in stack trace
0xc7f5640. Probably it was overwritten at some point.
Maybe valgrind could help. Or you can dump value of m_imageExporter
in beginning and end of every function call. Would it change you've
bracketed memory corruption. Hopefully this wouldn't prevent bug from
occuring
More information about the Kstars-devel
mailing list