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 2393: Copy in HCB doesn't always copy right
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 16 2020 :  12:37:36 PM  Show Profile  Reply with Quote
I am getting mixed results when using the "Copy Declaration" on the entries in the HCB view on C# classes.
Sometimes it copies the declaration correctly, sometimes I get two entries separated by a char[255], sometimes the entry has no method return type. I am pretty sure this has to do with the duplicate entries I am seeing.

For example, on the System.Diagnostics.Trace type:
Assert(Boolean condition, System.String message, System.String detailMessage)
static Void Assert(Boolean condition, System.String message, System.String detailMessage)

both lines are copies from the same source entry.

Or this one:
static Void Fail(System.String message)
static Void Fail(System.String message, System.String detailMessage)[FF]static Void Fail(System.String message)

In place of the [FF] is a char[255] that actually only shows up when pasting into Notepad++
My bet: the char 255 points to something bad and might give a lead where all the problems come from.

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 16 2020 :  12:41:15 PM  Show Profile  Reply with Quote
Addendum: the "Expand Descendants and copy" menu entry doesn't make much sense when not on a .h file as shown in the documentation. Or, when in a C# file.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17012 Posts

Posted - Nov 16 2020 :  1:42:22 PM  Show Profile  Reply with Quote
If you change HCB to show a different class, and then change it back again to show:

System.Diagnostics.Trace

and do the copy again, do you get the same confused results? This certainly looks like a related problem, except that I cannot reproduce it here. I have tried on two different systems, one with my normal settings and one with your settings, and no sign of the problem at all.

So I am wondering if this is a stable effect or if there is a random element for you.

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

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 16 2020 :  2:28:59 PM  Show Profile  Reply with Quote
I get this reliable, even in different classes. selecting the first method of the symbol, copy, paste into notepad++, select the second method, copy, paste into notepad++, i get now the first one + char[255] + second one. seems to work for any C# class with methods.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17012 Posts

Posted - Nov 17 2020 :  09:08:44 AM  Show Profile  Reply with Quote
I have just installed Notepad++, I don't use this as my text editor personally, so had to install it. So default settings. The only thing I have changed is to turn on wordwrap via the toolbar button. I have attached a screen shot of what I am getting, along with notes on what I did. I am assuming the [FF] character should be obvious if it was happening with the default settings, but it's always possible it isn't obvious.

Ah, got the [FF] character by copying a control character from another location and pasting it into Notepad++. Got lucky that the control character in question was [FF]. So definitely nothing showing up here.



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

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 17 2020 :  09:31:06 AM  Show Profile  Reply with Quote
Thats what I get...



Note please that some methods have curly brackets, some dont, some of the above methods are twice with slightly different definitions, in the HCB they appear identical, although the tooltip of some shows the difference it copied.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17012 Posts

Posted - Nov 17 2020 :  10:51:56 AM  Show Profile  Reply with Quote
What class / type is this from? I have a test project you sent me, so I can hopefully try the same type here, and see what I get.

I don't get why we seem to be getting such different results here.

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

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 17 2020 :  10:58:09 AM  Show Profile  Reply with Quote
This is from the Q7 solution, you might have this class complete actually.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17012 Posts

Posted - Nov 17 2020 :  1:10:36 PM  Show Profile  Reply with Quote
It looks like the most recent version of your Q7 solution I have is from May 2020, and there is no symbol containing "DataContext" in the Find Symbol dialog.

If you are able to share a current version, purely for testing purposes, I will have a look and see if I can get the same result. I want to say VA symbol database corruption, but I have no basis for this, and even if I assume so, where on earth is the FF character coming from? That seems quite random for copying a declaration from the HCB.

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

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 17 2020 :  1:14:45 PM  Show Profile  Reply with Quote
Sorry, cant share anymore now. Anyway the FF char is appearing here in pretty much any assembly that I copy from, so its not project specific. IŽd point to a string termination error in VA somewhere.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17012 Posts

Posted - Nov 18 2020 :  08:13:41 AM  Show Profile  Reply with Quote
It was worth asking on the off chance.

I will keep an eye on this, and keep checking in the background, but given how easily you can trigger this problem I really should have reproduced this by now.

I have even taken the steps from case=142203, which produces a corrupt VA symbol database for C# when using NuGet, and I still cannot get this problem to reproduce. There has to be some form of odd trigger, but I am not sure where else to look for it.

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

Uniwares
Tomato Guru

Portugal
2046 Posts

Posted - Nov 18 2020 :  08:16:59 AM  Show Profile  Reply with Quote
Cant say. Today I was trying to find a pattern, but there seems to be none. for some assemblies its happening always, for others never. There is no pattern in method type or parameters, only can say that no method without parameters seem to cause this behaviour, but the type of parameters seems irrelevant.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000