Author |
Topic |
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 10 2005 : 1:38:08 PM
|
Ever since I upgraded to build 1430 I'm getting the error line all over the place in my source. What I mean by the error line is the red squiggly line under certain items in your source.
I'm using VS2005 RTM with C#. I'm currently working within an ASP.NET application but it happens in any project.
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 10 2005 : 6:27:00 PM
|
strange. can you change the underline colours of spelling error and mistyped symbols in VA's options -> Text Editor -> Correction
to two different non red colours please? this will prove which type of underlining you are getting. have you tried deleting any .ncb files? in VS 2003 these were a regular source of problems.
do you have the time to create a new default project, and see if you get the same problem there? if you do then it may be worth telling VA to clear its cache and rebuild its symbol databases. VA options -> performance -> general |
zen is the art of being at one with the two'ness |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 11 2005 : 08:58:43 AM
|
I changed the colors and I'm getting mistyped symbol errors. I already tried clearing the cache and rebuilding the system database to no avail.
I don't see any .ncb files for VS2005. I can't remember, where these were in VS2003 but I do remember them. Were they in the project directories? |
|
|
Rain Dog
Ketchup Master
88 Posts |
Posted - Nov 11 2005 : 10:42:23 PM
|
.ncb files were generally found in the same folder that your .sln and .csproj files were located. Most often if you created a project named "MyProject", they were located in the root of that folder. |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 12 2005 : 07:18:39 AM
|
That's what I thought. In that case there are no ncb files in VS2005 because I don't have any.
quote: Originally posted by Rain Dog
.ncb files were generally found in the same folder that your .sln and .csproj files were located. Most often if you created a project named "MyProject", they were located in the root of that folder.
|
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 15 2005 : 08:35:45 AM
|
I've got move information on this problem.
It still happens in 1432. When I first installed 1432 the lines went away. As soon as I started modifying the file they reappeared. I'm in an ASP.NET C# file and it seems that it always underlines all the member variables. It is like it can't resolve the fact that these variables are members defined in the aspx file. For example, if I have a checkbox on the page named chkBox1 and I access it from the cs file it doesn't know what this variable is.
|
|
|
tragib
Junior Member
USA
15 Posts |
Posted - Nov 15 2005 : 09:51:33 AM
|
This is happening to me as well, in a simple C# class file. In my case, it's occuring with BCL items like Trace from System.Diagnostics and CultureInfo from System.Globalization. I'd tried rebuilding the symbol databases with no effect. |
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 15 2005 : 1:25:45 PM
|
I can confirm that this is happening for me also in 1432, C++ (non-managed), VS 2003.
"When I first installed 1432 the lines went away. As soon as I started modifying the file they reappeared." This is nearly what I found, except I didn't have to modify the files, they just started appearing after I'd been editing other files. The "red squigglies" are happening for quite a lot of things, such as member variables (of the current class), some namespaces/classes, and member functions. |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 15 2005 : 7:09:26 PM
|
to be honest i am a bit mystified by this. certainly i am not seeing any stray underlining in a non managed C++ project using 1432 and VS 2003.
does anyone have the time to see if they get this problem in a new project? if so could you tell me the basic details, IDE, version of VA, type of project, so that i can run the same test here and see what happens?
it is possible that there are some project types that VA is having problems with, which might explain most of this, but i am not sure that explains all of this. |
zen is the art of being at one with the two'ness |
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 15 2005 : 7:10:02 PM
|
A bit more information: turning the "Underline mistyped symbols" option off in the VAX options does not actually remove the (incorect) underlines. |
|
|
tragib
Junior Member
USA
15 Posts |
Posted - Nov 15 2005 : 9:41:05 PM
|
I was able to recreate the problem using the C# ScreenSaver starter kit in Visual Studio 2005 Pro. It manifested in the ScreenSaverForm.cs code file. FileInfo, DirectoryInfo, a generic List object and a few others were underlined as mistyped symbols. This did not manifest immediately when the file was opened, it took a few moments after the file was edited. |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 16 2005 : 07:27:15 AM
|
Alright, I have a use case I think you can use to repro this.
First I'm using: VS2005 Professional VA 1432
I created a fresh Windows forms project. I then added a textbox to the form. If you then go to the source code behind the form and add a method named Test. In this method put the following code. You'll see that by the time your done typing the MessageBox line the text box control member variable will be underlined along with the Text property.
public void Test() { MessageBox.Show(textBox1.Text); }
Let me know if this helps.
Chris |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 16 2005 : 5:03:08 PM
|
quote: Originally posted by rsim
A bit more information: turning the "Underline mistyped symbols" option off in the VAX options does not actually remove the (incorect) underlines.
confirmed in both C# and C++
case=882
with this turned off new mistyped symbols are not underlined, but you seem to have to restart the IDE to remove existing underlines.
so far this is the extent of my progress. Christopher using VS 2005 beta 2 and VA 1432 i created a new C# windows form. i added one text box to the form, and then went to some code.
i can get exactly what you describe if i add the test function to "program.cs", just after the Main() function. of course, this is because textBox1 is not a local variable to this class. this is what comes of selecting the wrong code file first time.
when using the correct code file none of this is underlined. in this simple case it sounds as if VA is not detecting / parsing the changes to the solution. what happens if you close and re-open the IDE? after making a small edit to the file (required for mistyped underlining to kick in) do you still get this underlining?
tragib using the same machine i have created a C# screen saver starter kit project, and in the ScreenSaverForm.cs file, at the bottom of the function:
private void SetupScreenSaver()
i added the lines:
FileInfo fi = new FileInfo(); DirectoryInfo di = new DirectoryInfo(); barbara = 3;
only "barbara" is underlined as a mistyped symbol (sort of pink here), while "screensaver" is underlined in red, as a spelling error, in the comment at the top of this function.
is anyone using any other plugins? any obvious clues here? does this underlining effect change with time, as VA gets caught up with its parsing?
how does the VA wizard bar behave when you place the caret into a class name that is underlined as mistyped, eg FileInfo? what about VAView when you hover over it? |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 16 2005 : 5:20:04 PM
|
Christopher can you check out this thread, and also look to see if you have any odd colouring on your using statements? we have a possible clue to at least part of this effect.
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4152 |
zen is the art of being at one with the two'ness |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 16 2005 : 5:20:04 PM
|
quote: Originally posted by feline
so far this is the extent of my progress. Christopher using VS 2005 beta 2 and VA 1432 i created a new C# windows form. i added one text box to the form, and then went to some code.
i can get exactly what you describe if i add the test function to "program.cs", just after the Main() function. of course, this is because textBox1 is not a local variable to this class. this is what comes of selecting the wrong code file first time.
when using the correct code file none of this is underlined. in this simple case it sounds as if VA is not detecting / parsing the changes to the solution. what happens if you close and re-open the IDE? after making a small edit to the file (required for mistyped underlining to kick in) do you still get this underlining?
One thing that is different from your test is that I am using the released version of VS2005 professional. Not sure if that matters.
After restarting the IDE the textbox1 variable is not underlined. And modifying the file directly does not cause the underline to appear. However if I add another textbox to the form and try to access it from within the partial class the new variable is underlined. |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 16 2005 : 5:21:55 PM
|
quote: Originally posted by feline
Christopher can you check out this thread, and also look to see if you have any odd colouring on your using statements? we have a possible clue to at least part of this effect.
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4152
I do have this odd coloring in some of my namespaces. |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 16 2005 : 5:55:40 PM
|
is there any connection between the namespaces with this colouring and the underlined symbols in your code? if only items from these namespaces are being underlined then we are probably on the right track.
this does not seem to have with rsim's report, but it is something. |
zen is the art of being at one with the two'ness |
|
|
tragib
Junior Member
USA
15 Posts |
Posted - Nov 16 2005 : 5:57:02 PM
|
See my post in the other topic. |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 16 2005 : 6:29:59 PM
|
System.IO seems to be a common one that is not parsed correctly. There is correlation between some mistyped symbols and the namespaces that are oddly colored. But I'm still having problems with member variables. These don't seem to correlate to a namespace problem.
These could correlate with a partial class problem though. This is where it seems to happen.
|
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 16 2005 : 6:47:21 PM
|
I'll have to do some testing, but I think I see something in common.
The code I'm currently working on is a class inside a namespace inside a namespace - and the outter most namespace I have a "using namespace X" statement for at the top of my source file. Something like this (pesudo code, not a tested example of the bug):
// Header
namespace outter
{
namespace inner
{
class MyClass
{
void MemberFn();
};
}
}
// CPP
#include "header.h"
using namespace outter;
void inner::MyClass::MemberFn() // <-- MyClass and MemberFn are both underlined
{
} |
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 16 2005 : 7:04:21 PM
|
Here is a list of some of the namespaces that I see consistently miscolored:
System.IO System.Runtime.Remoting.Lifetime System.Runtime.Serialization.Formatters.Binary System.Security.Cryptography
And when these are miscolored all of the classes found in that namespace are underlined. I will provide more when I run across them. |
|
|
tragib
Junior Member
USA
15 Posts |
Posted - Nov 16 2005 : 7:23:54 PM
|
I've recreated the issue in a simple console application. It doesn't seem to be related to partial classes.
To add to the list of namespaces...
System.Collections.Specialized System.Globalization System.Security.Authentication System.Security.AccessControl System.Timers System.Net System.Net.Mail
A few new bits of info...
When I place the cursor on an underlined CultureInfo, the context window shows 'System.Data.SqlTypes.SqlString.CultureInfo' and the Definition windows shows 'System.Globalization.CultureInfo CultureInfo'.
When I place the cursor on an underlined 'List<int>', the context window shows 'Infragistics.Shared.EventHandlerDictionary.List ' while the definition window shows 'System.Collections.Specialized.HybridDictionary List '
The only assembly referenced by the console application is 'System'.
|
|
|
Christopher Holt
Ketchup Master
USA
70 Posts |
Posted - Nov 16 2005 : 7:33:56 PM
|
quote: Originally posted by tragib
I've recreated the issue in a simple console application. It doesn't seem to be related to partial classes.
Let me rephrase what I said. I meant that the part of the problem where the member variables are not being identified properly seems to have something to do with Partial classes. The other issue when symbols are underlined appears to be entirely based on the fact that the namespaces are not being identified properly.
Sorry for the confusion.
Chris |
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 16 2005 : 7:51:37 PM
|
Another thought is that it may be to do with VA not "seeing" the source be edited. For instance rebuilding the symbols and clearing the cache, or editing the code in an external editor. I did clear everything (cache & symbols) out of VA when I installed 1432.
I tried entering the above code into a new solution, closing it, adding X's to each class/namespace name in another editor, and reopening the solution in VS - at which point the underlines appeared after making edits to the source file. However they did go away after a short time, so it may not be the same issue since I cannot get the underlines to go away in my real project. |
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 17 2005 : 1:23:11 PM
|
And yet more notes on what I'm seeing..
// header
namespace ns
{
class MyClass
{
void MemberFn();
int m_int;
};
}
// CPP
using namespace ns;
void MyClass::MemberFn()
{
m_int = 1; // <-- m_int is underlined.
}
It might be something to do with symbols several levels deep? |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 17 2005 : 4:48:50 PM
|
the previous VA bug with unknown namespaces in C# only showed up on one of my three test systems. so it was very machine specific, even when using the same solution. the same machine specific effect seems to be at work here.
i have distilled this down for the developers, hopefully they will know where to look for this
case=884 |
zen is the art of being at one with the two'ness |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 17 2005 : 5:02:29 PM
|
quote: Originally posted by rsim
And yet more notes on what I'm seeing..
*snip*
It might be something to do with symbols several levels deep?
does this example actually produce this underlining for you? using VS 2003 and VA 1432 i have added this to a non managed C++ project and i am not getting any underlining.
just to make sure i changed the function to read:
void MyClass::MemberFn()
{
m_int = 3;
barbara = 2;
}
and only "barbara" is underlined. waiting makes no difference, and restarting the IDE makes no difference.
as a more general comment, i think the unknown C# namespace problem is different to member variables being underlined, but proving this could be tricky. |
zen is the art of being at one with the two'ness |
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 17 2005 : 5:29:22 PM
|
quote: Originally posted by feline
does this example actually produce this underlining for you?
Sorry, I should've been more clear - no it does not, it was just pseudo code of the namespace/class hierarchy. |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 17 2005 : 5:45:19 PM
|
that makes sense
do you have a single .h and cpp file pair that produce this problem that it is OK to email me? i am hoping that we can slim this down to a fairly basic example that can be reproduced here as well as there. |
zen is the art of being at one with the two'ness |
|
|
rsim
Junior Member
19 Posts |
Posted - Nov 22 2005 : 4:50:07 PM
|
This may be a different bug, but it seems very related - at least to my case. Going a little further than my previous examples, I'm finding this:
// Header1
namespace outter
{
namespace inner
{
class MyClass
{
typedef std::vector<int> MyIntVec;
};
}
}
// CPP1
#include "header1.h"
using namespace outter;
namespace
{
void someFunc1()
{
inner::MyClass::MyIntVec::const_iterator i;
}
}
// Header2
namespace inner
{
void SomeFunc();
}
// CPP2
#include "header2.h"
#include "header1.h"
void inner::SomeFunc();
{
} In this code, for 'inner::MyClass::MyIntVec' MyClass and MyIntVec are just shown as 'inner' in the Definition box. Doing a Go To on MyClass or MyIntVec will open Header2 at the 'namespace inner' line. Changing Header2/CPP2 from 'inner' to 'inner2' cleans up the issue and gives the correct information in the Definition box, and Go To works correctly.
In other words, this works as expected:
// Header1
namespace outter
{
namespace inner
{
class MyClass
{
typedef std::vector<int> MyIntVec;
};
}
}
// CPP1
#include "header1.h"
using namespace outter;
namespace
{
void someFunc1()
{
inner::MyClass::MyIntVec::const_iterator i;
}
}
// Header2
namespace inner2
{
void SomeFunc();
}
// CPP2
#include "header2.h"
#include "header1.h"
void inner2::SomeFunc();
{
}
In these examples, Header1/CPP1 and Header2/CPP2 are in different projects (and directories) in case it matters.
Again, this is just pseudo code of what I'm finding - not an actual known-repo case. |
Edited by - rsim on Nov 22 2005 4:52:34 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Nov 23 2005 : 2:51:36 PM
|
assuming that you have pinned down some specific files where this problem occurs do you have the time to take these 4 files and place them into a test solution? a simple C++ console app should be ample. if you drop the 4 files into the base directory of the project and you can still get the problem this shows that it is a "simple" parser problem.
however if the problem goes away then this suggests that the effect is more subtle, quite possibly depending on the directories the files are in, and how these relate to the project setup *sigh*. lets hope it is not this case.
obviously if it is the simple case a copy of the files so i can try and reproduce the problem would be ideal |
zen is the art of being at one with the two'ness |
|
|
Topic |
|