Summary: | kopete crash when setting yahoo plugin to 'offline' | ||
---|---|---|---|
Product: | [Unmaintained] kopete | Reporter: | Amit Shah <amitshah> |
Component: | Yahoo Plugin | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Amit Shah
2003-12-07 08:41:37 UTC
Subject: Re: [Kopete-devel] New: kopete crash when setting yahoo plugin to 'offline' Do you have any output on the console? Did you compile Kopete using --enable-debug=full? It seems you don't, which makes tracking it down a lot harder for us. Do you have valgrind tracelogs? ('valgrind --num-callers=12 kopete --nofork') Is this the entire backtrace? If so, #4 makes me suspect serious stack or memory corruption. The most likely way to trigger this is to write data to a deleted object that happens to overlap with the stack. OTOH, #3 seems sane again, which is a bit strange. All in all a very weird backtrace. Subject: Re: [Kopete-devel] kopete crash when setting yahoo plugin to 'offline'
On Sunday 07 December 2003 11:42 am, Martijn Klingens wrote:
> Is this the entire backtrace? If so, #4 makes me suspect serious stack or
> memory corruption. The most likely way to trigger this is to write data to
> a deleted object that happens to overlap with the stack. OTOH, #3 seems
> sane again, which is a bit strange. All in all a very weird backtrace.
Maybe the stack corruption occurred in the function which called #3...
Looks like #3 is probably YahooAccount::disconnect (which is a very dangerous
name for a function in a QObject anyway - maybe QObject::disconnect was
intended to be called by someone?)
The only thing that calls on the way is isConnected. And the only way I can
see that going wrong is if the myself contact is deleted but not NULL'd.
Any insights, anyone?
lilac
Subject: Re: [Kopete-devel] kopete crash when setting yahoo plugin to 'offline' On Sunday 07 December 2003 15:38, Richard Smith wrote: > Maybe the stack corruption occurred in the function which called #3... > Looks like #3 is probably YahooAccount::disconnect (which is a very > dangerous name for a function in a QObject anyway - maybe > QObject::disconnect was intended to be called by someone?) Unlikely. Our disconnect is a void method, the Qt versions take 3 or 4 parameters, that's easy to distinguish. > The only thing that calls on the way is isConnected. And the only way I can > see that going wrong is if the myself contact is deleted but not NULL'd. Well, _IF_ it is indeed stack corruption it can have happened anytime. Unlike reading deleted memory stack corruption alters a program's behaviour a LOT later, when returning from a method. Example: void foo() { bar(); doSomethingElse(); } void bar() { char[20] bla; char *c = &bla; int index = -1; *(c + index) = 0x12; } Such out-of-bounds accesses are fairly easy to get. And in a lot more potential places. Subject: Re: [Kopete-devel] kopete crash when setting yahoo plugin to 'offline' On Sunday 07 December 2003 3:28 pm, Martijn Klingens wrote: > On Sunday 07 December 2003 15:38, Richard Smith wrote: > > Maybe the stack corruption occurred in the function which called #3... > > Looks like #3 is probably YahooAccount::disconnect (which is a very > > dangerous name for a function in a QObject anyway - maybe > > QObject::disconnect was intended to be called by someone?) > > Unlikely. Our disconnect is a void method, the Qt versions take 3 or 4 > parameters, that's easy to distinguish. Not true at all. The Qt versions take 2 or 3 parameters. The 3 parameter one has all three params defaulted. So if someone calls account->disconnect() through a pointer whose static type is KopeteAccount*, they might well be calling the wrong function. These functions NEED renaming anyway (post 3.2 I guess), since they shadow a base class function which does something different. > > The only thing that calls on the way is isConnected. And the only way I > > can see that going wrong is if the myself contact is deleted but not > > NULL'd. > > Well, _IF_ it is indeed stack corruption it can have happened anytime. > Unlike reading deleted memory stack corruption alters a program's behaviour > a LOT later, when returning from a method. True indeed. In fact, this need not be stack corruption at all. It's theoretically possible the compiler uses ESP to store some value in YahooAccount::logOff(), and that value is still stored when the program crashes. we-need-more-information-to-diagnose-ly yrs, lilac Subject: Re: [Kopete-devel] kopete crash when setting yahoo plugin to 'offline' On Sunday 07 December 2003 16:57, Richard Smith wrote: > Not true at all. The Qt versions take 2 or 3 parameters. The 3 parameter > one has all three params defaulted. So if someone calls > account->disconnect() through a pointer whose static type is > KopeteAccount*, they might well be calling the wrong function. Oops, I meant connect(), not disconnect(), right. > These functions NEED renaming anyway (post 3.2 I guess), since they shadow > a base class function which does something different. Well, the old name we had was butt ugly and AFAICS there are no ambiguous overloads. Also I modelled this after KExtendedSocket, which has the same naming convention. What would you suggest? Following QSocket and use open()/close() ? Subject: Re: [Kopete-devel] kopete crash when setting yahoo plugin to 'offline' On Sunday 07 December 2003 4:07 pm, Martijn Klingens wrote: > On Sunday 07 December 2003 16:57, Richard Smith wrote: > > These functions NEED renaming anyway (post 3.2 I guess), since they > > shadow a base class function which does something different. > > Well, the old name we had was butt ugly and AFAICS there are no ambiguous > overloads. Also I modelled this after KExtendedSocket, which has the same > naming convention. > > What would you suggest? Following QSocket and use open()/close() ? logOn() and logOff() seem more appropriate for IM accounts IMO. lilac Subject: Re: [Kopete-devel] kopete crash when setting yahoo plugin to 'offline'
On Sunday 07 December 2003 17:50, Richard Smith wrote:
> logOn() and logOff() seem more appropriate for IM accounts IMO.
Fair enough. It's good to have some native speakers around :)
Subject: Re: kopete crash when setting yahoo plugin to 'offline' On Sunday 07 Dec 2003 17:12, Martijn Klingens wrote: > Do you have any output on the console? Sorry, didn't check. > Did you compile Kopete using --enable-debug=full? It seems you don't, which > makes tracking it down a lot harder for us. no, I'm using the konstruct build, and it doesn't have --enable-debug=full turned on. I'll do that for beta2 (which is expected soon, right?) > Do you have valgrind tracelogs? ('valgrind --num-callers=12 kopete > --nofork') no; and I couldn't reproduce it... so can't really say when I'll be able to provide more info > > Is this the entire backtrace? If so, #4 makes me suspect serious stack or yes, it is. there were a lot of (debug symbols not found) messages at the top, but I stripped them. The most interesting part I've posted. Amit: provide more info when you can. If I don't hear anything back from you within the next couple of weeks, I'll probably close the bug since I've never seen it here myself. Subject: Re: kopete crash when setting yahoo plugin to 'offline'
On Friday 19 Dec 2003 21:56, Matt Rogers wrote:
> ------- Amit: provide more info when you can. If I don't hear anything back
> from you within the next couple of weeks, I'll probably close the bug since
> I've never seen it here myself.
Sorry, I too haven't seen it again. But from the discussion we had, I guess
the bug was identified.... or am I wrong?
there's a couple of places it might crash, i'm looking into those now ok, i think i've fixed a few of the places where it might crash, so I'll go ahead and close it. The updates are in CVS. |