List Info

Thread: Unable to track down a duchain bug




Unable to track down a duchain bug
country flaguser name
Australia
2007-12-09 23:14:22
Hi,

Quite a while ago David added an assert in the c++ duchain
context builder 
that the top level context should not have a parent smart
range.

This is quite easily triggerable - just open a project, open
any cpp file in 
it (I use kdevplatform and plugins/classmodel.cpp), wait for
it to parse, 
then open the corresponding header, and start editing -
crash.

I have so far been unable to track down where this occurs. 
I attach my 
patches which add debug asserts and smart range watchers to
try to find out 
the root cause - so far, all i can see is that top level
contexts go into the 
chain ok (probably not as smart ranges), then come out with
a spurious parent 
in their smart range.

I guess this may be due to some smart range conversion code
(I still think 
it's a mistake to have it in more than one location), but i
haven't found it 
yet.  (Note to self: maybe I should review this code.)

If anyone is interested in working on this problem, I attach
my debug patches 
+ class (copy to platform/editor,
platform/languages/duchain, and 
kdevelop/language/cpp)

Cheers,
Hamish.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

  
  
  
Re: Unable to track down a duchain bug
country flaguser name
Germany
2007-12-10 16:51:03
On Monday 10 December 2007 06:14:22 Hamish Rodda wrote:
> Hi,
>
> Quite a while ago David added an assert in the c++
duchain context builder
> that the top level context should not have a parent
smart range.
>
> This is quite easily triggerable - just open a project,
open any cpp file
> in it (I use kdevplatform and plugins/classmodel.cpp),
wait for it to
> parse, then open the corresponding header, and start
editing - crash.
>
> I have so far been unable to track down where this
occurs.  I attach my
> patches which add debug asserts and smart range
watchers to try to find out
> the root cause - so far, all i can see is that top
level contexts go into
> the chain ok (probably not as smart ranges), then come
out with a spurious
> parent in their smart range.
>
> I guess this may be due to some smart range conversion
code (I still think
> it's a mistake to have it in more than one location),
but i haven't found
> it yet.  (Note to self: maybe I should review this
code.)
>
> If anyone is interested in working on this problem, I
attach my debug
> patches + class (copy to platform/editor,
platform/languages/duchain, and
> kdevelop/language/cpp)
>
> Cheers,
> Hamish.

The problem is that I simply cannot reproduce this, so I
fear I cannot help on 
this :(

Maybe you've got some patches applied you forgot about?
Maybe even to 
kdelibs/kate?

greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Unable to track down a duchain bug
country flaguser name
Australia
2007-12-10 20:27:21
On Tue, 11 Dec 2007 09:51:03 am David Nolden wrote:
> On Monday 10 December 2007 06:14:22 Hamish Rodda
wrote:
> > Hi,
> >
> > Quite a while ago David added an assert in the c++
duchain context
> > builder that the top level context should not have
a parent smart range.
> >
> > This is quite easily triggerable - just open a
project, open any cpp file
> > in it (I use kdevplatform and
plugins/classmodel.cpp), wait for it to
> > parse, then open the corresponding header, and
start editing - crash.
> >
> > I have so far been unable to track down where this
occurs.  I attach my
> > patches which add debug asserts and smart range
watchers to try to find
> > out the root cause - so far, all i can see is that
top level contexts go
> > into the chain ok (probably not as smart ranges),
then come out with a
> > spurious parent in their smart range.
> >
> > I guess this may be due to some smart range
conversion code (I still
> > think it's a mistake to have it in more than one
location), but i haven't
> > found it yet.  (Note to self: maybe I should
review this code.)
> >
> > If anyone is interested in working on this
problem, I attach my debug
> > patches + class (copy to platform/editor,
platform/languages/duchain, and
> > kdevelop/language/cpp)
> >
> > Cheers,
> > Hamish.
>
> The problem is that I simply cannot reproduce this, so
I fear I cannot help
> on this :(

You're sure you've tried exactly the instructions above?

> Maybe you've got some patches applied you forgot about?
Maybe even to
> kdelibs/kate?

Nope.  Do you?

Cheers,
Hamish.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Unable to track down a duchain bug
user name
2007-12-10 20:41:16
On 10.12.07 16:14:22, Hamish Rodda wrote:
> Hi,
> 
> Quite a while ago David added an assert in the c++
duchain context builder 
> that the top level context should not have a parent
smart range.
> 
> This is quite easily triggerable - just open a project,
open any cpp file in 
> it (I use kdevplatform and plugins/classmodel.cpp),
wait for it to parse, 
> then open the corresponding header, and start editing -
crash.

open as in using File->Open? If so I can't reproduce the
crash here.

Andreas

-- 
You have an unusual magnetic personality.  Don't walk too
close to
metal objects which are not fastened down.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Unable to track down a duchain bug
country flaguser name
Germany
2007-12-11 02:41:41
On Monday 10 December 2007 06:14:22 Hamish Rodda wrote:
> I guess this may be due to some smart range conversion
code (I still think
> it's a mistake to have it in more than one location),
but i haven't found
> it yet.  (Note to self: maybe I should review this
code.)
>
> If anyone is interested in working on this problem, I
attach my debug
> patches + class (copy to platform/editor,
platform/languages/duchain, and
> kdevelop/language/cpp)
>
> Cheers,
> Hamish.

I was able to reproduce it now, using your description.
Maybe I will find some 
time for further investigation tomorrow.

Greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )