logo       

Re: Strange backtrace: msg#00384

kde-devel

Subject: Re: Strange backtrace

Am Mittwoch 29 Juli 2009 09:42:45 schrieb Thiago Macieira:
> Stefan Majewsky wrote:
> >As you see, the second-to-last line in the method invokes
> >Kolf::Game::setCurrentHole, which equals the step from #8 to #7 in above
> >backtrace. The fact that puzzles me is that the this pointer changes
> > between #8 and #7. How can I interpret this? In my understanding the
> > this pointer stays the same even during casts (if we disregard multiple
> > inheritance which is not used in this class layout). Is this wrong?
>
> The this pointer doesn't stay the same in the case of multiple inheritance
> if you're casting the pointer to a base which is not the primary base
> (non-virtual).

No multiple inheritance is involved. The inheritance diagram is linear:

QObject --> Kolf::Game --> Kolf::NormalGame

> Unless this is just an artifice of optimisation, which I'm sure you'd have
> caught by now by compiling with -O0, this has to be a bug caused by
> uninitialised memory access somewhere.

I do not know whether I compile with -O0. All I'm doing is setting the
CMAKE_BUILD_TYPE to Debug.

> Of course, since the source code I have has no NormalGame or Game classes,
> I have no clue what memory could be uninitialised. In fact, I have no clue
> whether there is multiple inheritance at play.

Which source code are you looking at? (Thanks for your effort anyway.)

Greetings
Stefan

Attachment: signature.asc
Description: This is a digitally signed message part.


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise