Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA View - HCB - redundancy and corruption
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

RMdata
Junior Member

17 Posts

Posted - Sep 22 2006 :  12:52:02 AM  Show Profile  Reply with Quote
I'm currently using build 1535 with C# on VS2005, but have seen this same behavior with several earlier builds, and also on VS2003.

When hovering over an inherited item, the HCB displays nonexistent multiple entries for almost everything in the base class. For example, in the first image I was hovering over a implementation of a base class method (LogToFile) in an inherited class. (HCB is on the right, and object browser is on the left, with object browser displaying the same class as HCB). It's easy to see here that each method in the class has a phantom (nonexistent) 2nd entry with the same interface as the real method. This often happens for properties also. There is often more than one phantom entry for each method/property; in this example there is only one. In the image example, the base class is an abstract class, but this happens with any inherited class and not just when an abstract class is involved.


This second image is hovering over a field inside the base class itself. Here 3 separate entries in the HCB are displayed for every single field, where only one actually exists for each. Looking at the top, there are also even many phantom entries that display no information at all.


I have tried rebuilding symbol databases and clearing history; these actions make no difference.

Edited by - RMdata on Sep 22 2006 01:12:59 AM

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 22 2006 :  01:48:58 AM  Show Profile  Reply with Quote
Does the member listbox for an instance of absBilling have duplicated items too?
Are you able to reproduce this behavior in a trivial set of derived classes?
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Sep 22 2006 :  08:35:19 AM  Show Profile  Reply with Quote
No, the member listbox does not have the repeats in it.

I see it in really (EXTREMELY) simple classes. The more inheritance there is going on, the worse the problem seems to be. I just tried to create a simple example to post here, using the exact same code from some projects that display the problem, and wasn't able to get it to repeat. That makes me think to see the problem there has to be more than one project in the solution. All the solutions I work with have multiple projects in them. I don't have time right now to create a sample solution with multiple projects to post here, but I probably can this weekend.

Thanks,
Mark.

Edited by - RMdata on Sep 22 2006 08:36:48 AM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 22 2006 :  12:53:20 PM  Show Profile  Reply with Quote
Thanks - that would be much appreciated.
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Sep 26 2006 :  11:29:33 PM  Show Profile  Reply with Quote
Ok, here's an easy way to reproduce this problem.

Go to
http://apress.com/book/supplementDownload.html?bID=450&sID=2960
and download the source code for the book, "Pro Asp.net 2.0 in C# 2005"

Unzip the zip file, and in Visual Studio 2005 open the website in the "Chapter05" folder.
Open the files "SherlockLib/SherlockQuotes.cs", Website/HolmesQuote.aspx.cs", and "SherlockLib/Quotation.cs" in the IDE.

Ok, now do the following, with VA View open so you can see the HCB:
Go back and forth among those 3 files, doing a mouseover of any references to Quotation.cs. Basically, that can be the "quote.QuotationText" in the last line of HolmesQuote.aspx.cs, the "return new Quotation" in the last line of SherlockQuotes.cs, and the constructor definition "public Quotation(XmlNode quoteNode)" in Quotation.cs. There are others, but these are examples. You definitely want to include mouseovers of the Quotation constructor.

In the middle of doing all those mouseovers, also throw in a few mouseovers of other things, like "XmlNode", and "SelectSingleNode".

A couple of things to note here:
1 - Watch what happens to "Date" and "date" in Quotation in the VA View. You keep getting more and more.
2 - After several times of going back and forth with the mouseovers, especially between items in Quotation and items in System.Xml, you will see the VA View is often not displaying the correct item.

----

This is a pretty simple example. It is seen here when the private member variable representing a property only differs from the name of the property by case (Date - date). It can also be seen when there are overloads that have a similar signature, when a child class overrides a base class member, and several other similar circumstances.

Edited by - RMdata on Sep 26 2006 11:30:30 PM
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 27 2006 :  01:41:01 AM  Show Profile  Reply with Quote
Yep. Using that project and following your instructions, I see problem #1. Either I don't understand, or I am not seeing problem #2.

case=2734

Help me out here, please. Not being a C# programmer, I don't see how the compiler knows what Quotation is when used in SherlockQuotes.cs. How is this resolved?

Joe Pizzi
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Sep 28 2006 :  7:57:27 PM  Show Profile  Reply with Quote
I'm glad that you are seeing problem #1.

Problem #2 becomes much worse when problem #1 exists - basically, you can do mouseovers of things that "should" cause items to appear in the HCB, but there is often either nothing at all displayed in HCB or no change from the previous display to what should be displayed. Almost at random the HCB will either respond or not respond to changes in mouseover. This doesn't happen all the time, and gets worse with larger projects, and gets much worse when problem #1 gets worse.

On your question
quote:
I don't see how the compiler knows what Quotation is when used in SherlockQuotes.cs. How is this resolved?
The method 'GetRandomQuote()' creates an instance of the class Quotation, and returns it to whoever called the method. That's performed because the method has a return type of 'Quotation', and the instantiation and return of a Quotation object happens when this line executes:

return new Quotation( quoteDoc.DocumentElement.ChildNodes[i] );

Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 30 2006 :  11:45:48 PM  Show Profile  Reply with Quote
About the C# question:

I understand that GetRandomQuote() creates an instance of Quotation. But, does the C# compiler go looking for the declaration of Quotation? There is no reference to it in the code (or is it done through project settings, somehow)?

Joe Pizzi
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Oct 02 2006 :  5:27:37 PM  Show Profile  Reply with Quote
The classes "SherlockQuotes" and "Quotation" are in the same namespace, "SherlockLib". Items in the current namespace do not need to be fully qualified.

The class "SherlockQuotes" only has two namespaces in the 'using' statements, using System; and using System.XML.

Since neither System nor System.XML have a "Quotation", there is nothing to create contention by addressing "Quotation" without fully qualifying it.

Another example of the same thing is in Quotation.cs. There you will find 'XmlNode' referenced without fully qualifying it as "System.XML.XmlNode". That is ok because there is a 'using System.Xml' statement at the top, and there is no contention with another 'XmlNode'.

By the same token, HolmesQuote.aspx.cs is in a different namespace. In code there, the programmer chose to fully qualify all references to members of the "SherlockLib" namespace, instead of the alternative of adding a "using SherlockLib" statement.


Edited by - RMdata on Oct 02 2006 5:31:15 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 03 2006 :  2:13:39 PM  Show Profile  Reply with Quote
for problem number 2, where the HCB ends up showing the wrong thing, are you seeing this quite quickly?
i have downloaded the zip file and i have been through each file about 15 times each, hovering over two or three things each time i pass through a file, and so far the HCB is still showing me the correct items.

the number of duplicate entries in the HCB has gone up quite a bit, but so far that is the only problem i am seeing. does the problem simply take longer to show up, or am i missing something?

zen is the art of being at one with the two'ness
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Oct 03 2006 :  5:53:17 PM  Show Profile  Reply with Quote
Unfortunately, problem #2 is more fleeting. It is there sometimes and not there other times.
I just spent some time trying to get it to dependably repeat, and wasn't able to.

However, in that effort I came across another HCB issue; it doesn't properly identify generics.

Here's another download to make this problem show up very clearly (it also gives an EXCELLENT example of issue #1 on a ton of items):

Go to
http://wintellect.com
and download the "Power Collections".
You have to create a (free) account on the website to download this item.

Unzip the project, and open it in VS2005.
Open 'OrderedSet.cs' in the editor, and mouseover any generic at all.
For example, consider only the following portion of OrderedSet.cs:
public OrderedSet(IEnumerable<T> collection, IComparer<T> comparer):
            this(comparer)
        {
            AddMany(collection);
        }

When you mouseover "OrderedSet", observe that there are a large number of repeated methods and properties in the HCB.
When you mouseover "IEnumerable<T>", note that the quick tip at the mouse point correctly identifies it as "System.Collections.Generic.IEnumerable<T>", but the HCB identifies the incorrect interface "System.Collections.IENumerable". The same thing happens when you mouseover "IComparer<T>"; the wrong interface is identified by HCB.

Thanks,
Mark.

Edited by - RMdata on Oct 03 2006 5:54:51 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 05 2006 :  07:52:30 AM  Show Profile  Reply with Quote
about problem #2, do you ever click into the HCB, thus placing focus there? I often do this when scrolling it, to see the bottom of long classes.

I have found that after doing this you have to click back into the edit window before hovering the mouse over something will update the HCB. this is not what you have described, but could this be a factor? when this happens to me the HCB seems to just "freeze" and stop working, simply because VA is not aware I want to change the displayed class.


I have downloaded the sample code, thank you for pointing me at such a clear example

simply opening the file and hovering over the function does not produce any duplicates in the HCB for me. The duplicates seem to be linked to using CTRL-TAB to change the current file, so if you have had this file open for a little while, and have been moving between different files this would explain why you were seeing a lot of duplicates.

I am seeing the same thing for the generic interface IComparer<T>

case=2862

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Oct 06 2006 :  8:02:00 PM  Show Profile  Reply with Quote
Case 2734 is fixed in 1538.
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Oct 09 2006 :  3:01:59 PM  Show Profile  Reply with Quote
I just installed 1538, and see that issue #1 is now gone. Great!

Regarding issue #2, I have been trying to get it to dependably replicate for some time now, without much luck. I did discover what you mentioned, that you (sometimes, but only sometimes???) have to actually click on the edit window when another window has the focus, or else the mouseover is not recognized by the HCB even though it is recognized by intellisense.

I have one solution that I can always get issue #2 to appear on. Unfortunately, I can't include the source for that as it is proprietary code belonging to the company it was created for. I can say, though, that it has a website, 13 DLL projects, 2 console apps, and is a little unusual in that it uses Sybase ASE for the database provider.

...more added later... - Problem #2 is seen most often when an object instance is a property of another object instance.
For example, I'm looking at a place where it happens consistently right now, in the solution mentioned above.
There is a class called "PaymentDetail" that exists in a whole bunch of instances in a collection inside another class named "Finance". The currently selected collection member is a property on "Finance" called "CurrentPaymentDetail".
Inside "Finance" is the following code,
if ((CurrentPaymentDetail != null) && (CurrentPaymentDetail.BillingType != null))


Ok, now if I hover over either place where "CurrentPaymentDetail" appears in that, the HCB displays the property "CurrentPaymentDetail" inside "Finance". Now if I mouseover the "BillingType", which is itself a property of the "PaymentDetail" class, there is no change in the HCB display (no matter what it is currently displaying), even though the mousetip help correctly identifies "BillingType" as a property of the "PaymentDetail" class.

I'll try again soon to create a small solution (or find one that can be downloaded) that repeatedly displays problem #2. Since the only solution I have that dependably repeats the problem can't be posted here, that's about the best I can do on this problem.

Thanks for the great help on all these issues!

Mark.

Edited by - RMdata on Oct 09 2006 5:10:11 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 10 2006 :  3:26:05 PM  Show Profile  Reply with Quote
the tooltips when hovering over code in VS2005 always come from the IDE, so unfortunately a valid, or even invalid tooltip does not help much.

if you place the caret into BillingType what does the VA wizard bar show? this might give us a clue.

when you say there is "no change in the HCB display (no matter what it is currently displaying)" if you get the HCB to show some totally unrelated class, like String or Console, it will not update when you have focus in the editor and hover over BillingType?

if so this suggests that VA simply does not recognise / understand BillingType.

in your example is "CurrentPaymentDetail" a variable? I am re-reading your description, and looking at the line of code, and getting a little confused

Can you try alt-g on both "CurrentPaymentDetail" and "BillingType" ? what happens?

zen is the art of being at one with the two'ness
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Oct 11 2006 :  12:12:42 PM  Show Profile  Reply with Quote
feline,
In the example...

There is a collection of PaymentDetail objects (PaymentDetail is a class), that collection exists inside the class Finance.

CurrentPaymentDetail is a PaymentDetail object that is exposed as a public property of the Finance class. As a PaymentDetail object, CurrentPaymentDetail has all the methods and properties of any other PaymentDetail object.

When I mouseover 'CurrentPaymentDetail' in the example above, the HCB displays CurrentPaymentDetail as a property of the Finance class.
When I click on 'CurrentPaymentDetail' in the example above, the HCB display stays the same as above, and the wizard bar displays,
"a.b.c.Finance.CurrentPaymentDetail" on the left and "public PaymentDetail CurrentPaymentDetail{...}" on the right.

When I mouseover 'BillingType' in the example above, the HCB does not change its display at all from what it was previously displaying. When I click on 'BillingType', the HCB still does not change from whatever it was displaying before. The wizard bar displays "a.b.c.PaymentDetail.BillingType" on the left and "public string BillingType{...}" on the right.

I did the above about a dozen times. The first 7 or 8 times, exactly what is described above is what happened. For some unknown reason, then the HCB started properly digging down into the 'PaymentDetail' class and displaying its properties and methods. Once it started giving the correct behavior, it repeatedly gave the correct behavior.

As stated earlier in this thread, this problem comes and goes. I can now get the HCB to display the wrong behavior in several other places in the app, but until I close and reload the application it will continue to display PaymentDetail correctly now. It's almost as if you keep trying and trying on the same thing over and over again and eventually the HCB will display correctly, and once it starts displaying correctly it will continue to do so until you close Visual Studio and reopen it.

Thanks,
Mark.

NOTE: a.b.c is used here to represent the real namespaces. Both classes used are in the same namespace.

Edited by - RMdata on Oct 11 2006 12:17:19 PM
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Oct 11 2006 :  12:31:33 PM  Show Profile  Reply with Quote
I never gave this info earlier in this thread, so...
I also have MZ-Tools installed, latest version.
I also have Resharper installed, latest version.

I have all VAX suggestions, coloring, and corrections turned off, as I use the suggestions, coloring, and corrections of Resharper. I basically use VAX for the 'wizard windows' (Context and Definition fields) and VAView only.

VA_X.dll file version 10.3.1538.0 built 2006.10.06
Licensed to:
VA X: [email protected] (1-user license) Support ends 2007.04.20
VAOpsWin.dll version 1.3.3.6
VATE.dll version 1.0.5.8
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.51
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.2180
Windows XP 5.1 Build 2600 Service Pack 2
Single processor

Platform: Win32
Stable Includes:

Library Includes:

Other Includes:

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 11 2006 :  4:40:21 PM  Show Profile  Reply with Quote
does the VA wizard bar always display the correct information?
i was half expecting both the wizard bar and the HCB to be wrong all of the time. the two being out of sync is a little unexpected.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 11 2006 :  5:23:47 PM  Show Profile  Reply with Quote
quote:
Originally posted by RMdata

There is a collection of PaymentDetail objects (PaymentDetail is a class), that collection exists inside the class Finance.


what sort of collection is this? does it use a generic collection class?

If so are generic classes often involved when you see problems with the HCB not updating correctly? i am searching for some form of common element here.

zen is the art of being at one with the two'ness
Go to Top of Page

RMdata
Junior Member

17 Posts

Posted - Oct 12 2006 :  12:03:40 PM  Show Profile  Reply with Quote
The wizard bar always displays the correct information.

This particular project was recently converted from VS2003 to VS2005, so generics (which don't exist in VS2003) have only been recently introduced into the project. This problem was seen when the project was in VS2003, and has carried over into VS2005.

The collection mentioned in the example is a standard arraylist, which contains instances of a class.
However...
The problem is not seen when looking at a member of the arraylist, but instead when looking at a property which exposes an instance of a class. I probably shouldn't even have mentioned that this item is a collection member, as it probably isn't related. The problem in the example is seen when hovering over a property or method in an object which is itself a property, and below is the actual property definition. The problem in the example is seen when hovering over a property on the PaymentDetail object represented by 'CurrentPaymentDetail':

		public PaymentDetail CurrentPaymentDetail
		{
			get {return currentPaymentDetail;}
			set
			{
				currentPaymentDetail = value;
				HasChanges = true;
			}
		}

Edited by - RMdata on Oct 12 2006 12:05:56 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Oct 17 2006 :  11:02:16 AM  Show Profile  Reply with Quote
I think I have distilled this description down to a simple test case. Is this basically what you are describing?

class PaymentDetail
{
    public String BillingType
    {
        get { return "money"; }
    }
}


class Finance
{
    private bool HasChanges;
    PaymentDetail currentPaymentDetail;

    public PaymentDetail CurrentPaymentDetail
    {
        get { return currentPaymentDetail; }
        set
        {
            currentPaymentDetail = value;
            HasChanges = true;
        }
    }

    public void TestHCB()
    {
        if ((CurrentPaymentDetail != null) && (CurrentPaymentDetail.BillingType != null))
        {

        }
    }
}


VA and the HCB work perfectly on this code, it is so simple I hardly expected to see a problem.

zen is the art of being at one with the two'ness
Go to Top of Page

Nels_P_Olsen
Senior Member

USA
47 Posts

Posted - Jan 03 2008 :  10:57:52 AM  Show Profile  Reply with Quote
I'm working with a large solution filled with C# projects (60+), I'm using build 1624, and these problems happen for me a lot. HCB displays wrong item, or doesn't update, or duplicate members shown, etc. It misbehaves enouogh of the time (and responds slowly when it does work) to make it useless for us.

Rather than have us spend a lot of time trying to boil down test files to reproduce the problems, we can provide the code to our entire solution (or use some large open source project's code to reproduce ...)

- Nels
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 03 2008 :  2:19:35 PM  Show Profile  Reply with Quote
Anything that can help me try to pin down the source of the problem would be most helpful.

You can send me files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up. But I am not sure how this will cope with massive files. If you are seeing this in an open source project then that would certainly help, since I can then just download the source code and try to reproduce the problem here.

zen is the art of being at one with the two'ness
Go to Top of Page

sub-star
New Member

Norway
8 Posts

Posted - Jan 08 2008 :  12:40:02 PM  Show Profile  Reply with Quote
Hello!

I haven't been using VAX for long, but I have experienced the same/similar things as RMdata describes in his first post with methods having multiple entries in the HCB. I haven't tried to do much about it, as I haven't used VA View much yet.

The only thing I have discovered that nobody else has reported in this thread (I have not searched other threads), is that when I hoover over the multiple entries in the HCB I get a file location in the ToolTipText. For the first entry the path is correct (except when the method has been renamed/removed and it still shows in HCB, then no path is visible). In the second entry (and all other entries, if there are more than two) the path is referencing some file in the C:\\Users\\username\\AppData\\Local\\Temp directory, named vsp####.tmp.cs (#### is a combination of letters in uppercase and numbers). I have tried to locate theese files, but I haven't been able to find them anywhere. I couldn't find them in the referenced directory, which was odd. Then I tried a search in the C:\\Users directory (including subdirectories), with no result.

A thought entered my mind that theese files might be related to VS's recovery files, but I cannot confirm this.

I hope this information helps.

My system info:
VA_X.dll file version 10.4.1624.0 built 2007.12.07
DevEnv.exe version 8.0.50727.867
msenv.dll version 8.0.50727.867
Font: Courier New 16(Pixels)
Comctl32.dll version 6.10.6000.16386
Windows Vista 6.0 Build 6000
2 processors

The simplest solution is often the most difficult one to reach.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 08 2008 :  1:33:31 PM  Show Profile  Reply with Quote
I am wondering if these files are coming from your source control system. If you diff a local file against the version checked in you might well get temporary files being created.

Does turning off:

VA Options -> Performance -> watch for externally modified files and reparse when necessary

make any difference to this problem?

zen is the art of being at one with the two'ness
Go to Top of Page

sub-star
New Member

Norway
8 Posts

Posted - Jan 09 2008 :  07:10:49 AM  Show Profile  Reply with Quote
quote:
I am wondering if these files are coming from your source control system. If you diff a local file against the version checked in you might well get temporary files being created.

You are probably right. I'm using Team Edition with Team Explorer against a Team Source Control Server. I compare my local version against the latest server version from time to time, so I guess that's the source of these files.

quote:
Does turning off:

VA Options -> Performance -> watch for externally modified files and reparse when necessary

make any difference to this problem?

It has never been turned on as far as I know (it defaults to off, and I can't remember having it on). So the answer to your question would be no.

The simplest solution is often the most difficult one to reach.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 09 2008 :  11:08:44 AM  Show Profile  Reply with Quote
Assuming these files are coming from the source control system, VA should not be scanning them if this option is turned off. Even with this option turned on VA should be ignoring files in the temp directory.

Can you try:

VA Options -> Performance -> Rebuild symbol databases

and then restarting your IDE. Does this fix the problem? Or are you still seeing the wrong items listed in the HCB?

zen is the art of being at one with the two'ness
Go to Top of Page

sub-star
New Member

Norway
8 Posts

Posted - Jan 10 2008 :  02:18:33 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Assuming these files are coming from the source control system, VA should not be scanning them if this option is turned off. Even with this option turned on VA should be ignoring files in the temp directory.

Can you try:

VA Options -> Performance -> Rebuild symbol databases

and then restarting your IDE. Does this fix the problem? Or are you still seeing the wrong items listed in the HCB?

I have now tried rebuilding symbol databases and restarted VS2005, and now HCB is showing only one instance of each class member like it should. All the wrong entries it had are gone now as well. I'll try to keep an eye on this to see if this happens again, and if it does I'll try to identify the cause of this behavior. Thank you for your help feline!

Another thing I stumbled upon just now was that when I opened a file that I had renamed yesterday(renamed the class first and then the filename later the same day), HCB didn't do what it's supposed to do when hovering over items in the file (in the text editor). The only thing that worked, was hovering over the namespace line at the beginning of the file. When doing this, HCB showed the classes of the namespace, listing the old class name among the other classes. I also did not get any tooltip when hovering over members, only when hovering the namespace, so there is probably a connection there. After a tiny change to the code and a build operation, HCB now works with this class again. I think the problem was that I hadn't compiled the file after renaming it. Well, actually I did put in some XML comments and compiled after i renamed the file, but I guess those comments doesn't affect the compiled code at all. But it should have detected at least the class name change, because that does change the compiled code, right? Any thoughts?

The simplest solution is often the most difficult one to reach.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 10 2008 :  08:29:57 AM  Show Profile  Reply with Quote
The fact that rebuilding the symbol database helped suggests that VA saw, or is seeing, "odd" things, and remembering them. VA is designed to remember the code it see's, otherwise it would not be much use

The real question is where is it finding these other versions of the files, and why is it scanning them. If you start seeing it again, hopefully you will find some clues.


Renaming the file, is this a C# file you renamed? I am guessing it is.
Do you remember how you renamed the file? Did you simply rename it in Solution Explorer, or did you do something else?

Do you remember if you reloaded the IDE after renaming the file? Reloading the IDE will hopefully fix this problem with the HCB being confused.

zen is the art of being at one with the two'ness
Go to Top of Page

sub-star
New Member

Norway
8 Posts

Posted - Jan 14 2008 :  10:46:03 AM  Show Profile  Reply with Quote
quote:
The fact that rebuilding the symbol database helped suggests that VA saw, or is seeing, "odd" things, and remembering them. VA is designed to remember the code it see's, otherwise it would not be much use

The real question is where is it finding these other versions of the files, and why is it scanning them. If you start seeing it again, hopefully you will find some clues.

Since I rebuilt my symbol database thursday, today I noticed that there are now two entries for almost all of my methods, properties and fields. The correct entry displays the correct filepath, but the other one simply doesn't display any path at all at the moment. The other thing I notice about these incorrect entries is that they do not display the exact same signature as the correct entry does. E.g.
correct entry: method1(String foo)
incorrect entry: method1(System.String)

For fields it becomes:
correct entry: private String bar
incorrect entry: System.String bar : System.String bar

For properties it becomes:
correct entry: public String Bar
incorrect entry: System.String Bar

Notice how for methods the incorrect entries don't display parameter names, only parameter types, and how the modifier (public/private) doesn't show up in the incorrect entries for fields and properties. Does this make sense to you feline?
quote:
Renaming the file, is this a C# file you renamed? I am guessing it is.
Do you remember how you renamed the file? Did you simply rename it in Solution Explorer, or did you do something else?

Do you remember if you reloaded the IDE after renaming the file? Reloading the IDE will hopefully fix this problem with the HCB being confused.

Yes, this is a C# file I renamed. This is what happened:

Original filename: fileName1.cs
Original classname: className1

First I renamed the class to changedClassName. I did this with refactor --> rename (I don't remember if I used VAX or VS2005 for that). I compiled the file after this change. I then added XML-comments and compiled multiple times. Then later on the same day, I renamed the file to changedClassName.cs in Solution Explorer so that the file and the class would have the same name. Heres when I noticed HCB couldn't keep up anymore. (It may have had problems after I renamed the class, but I didn't look at HCB then, so I can't confirm that.) So I did a little change in the code to force a complete compile/build, and then it worked again. Didn't need to restart VS2005. In fact, I can't remember restarting my IDE at all that day.

The simplest solution is often the most difficult one to reach.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 14 2008 :  1:55:38 PM  Show Profile  Reply with Quote
Most odd.

If you double click on one of these duplicate items, does anything happen? It would be useful if VA took you somewhere, but that might be asking a bit much.

If that does not help can you try right clicking on one of them and triggering "Find References". Again I am not sure if this will help, but it might.

If you get VA to show one of the system classes in the HCB are there any duplicates? I am wondering if this only applies to your own classes.

To be honest I really am not sure what to think. The lack of parameter names sounds like it should mean something, but I do not recognise this.

zen is the art of being at one with the two'ness
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000