Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VS 2010: auto-complete bug

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
foo64 Posted - May 23 2012 : 12:53:10 PM
VAX 10.7.1903.0 built 2012.04.03

I've noticed a really annoying bug with auto-complete for nested structs.

Take this class definition:

class ProgressHandler : public State
{
public:    
    struct TagInfo
    {
        String  FileUrl;
        int     TagType;
        int     TagOffset;
        int     TagLength;
        int     TagDataOffset; 
    };
};


And then use it in the following code:

void LoadTagUpdate( const Middleware::ProgressHandler::TagInfo& info )
{
    debugPrint("Tag for %s: Offset %d, Size %d \\n", info.FileUrl.ToCStr(), info.TagOffset, info.TagLength );
}


Typing "info." brings up an autocomplete window as usual, but selecting any of the entries (pressing Tab or Enter) inserts the symbol at the *beginning* of the file! For example, if you type "info.Fi" and then press enter expecting "info.FileUrl", it leaves "info.Fi" alone and inserts "FileUrl" at the beginning of the file.

If you're using precompiled headers, the compiler ignores everything before "include "stdafx.h", so you can unknowingly end up with lots of random symbols piled up at the top of the file..

This only seems to occur for nested structs (defined inside classes). I'm not sure it always happens for nested structs, but I do know I've never seen it happen for non-nested structs.
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 24 2012 : 1:38:44 PM
I am glad the problem has been fixed for now. Please let us know if this ever starts happening again.

Since installing a new build of VA fixed this, but it was not, as far as I know, a deliberate bug fix, I am wondering if rebuilding your VA symbol database might have been a factor. A corrupt or out of date symbol database should not produce a problem like this, but perhaps it is a factor.

So if this problem happens again, can you try pressing the button:

VA Options -> Performance -> Rebuild symbol databases

and then restarting the IDE and reloading your solution, to see if this makes any difference.
foo64 Posted - May 23 2012 : 7:53:00 PM
Thanks for the replies!

quote:
Originally posted by accord

Unfortunately I wasn't able to reproduce the problem using VA1906 with VS11 or VS2010. Which version of Visual Studio are you using?
Can you please try creating a clean new win32 test project to see if you're able to reproduce the problem after you wrapped the class in a namespace? (like on the screenshot below)



I'm using VS 2010 version: 10.0.40219.SP1Rel

I wasn't able to repro in a standalone project.

For what it's worth, this is the second major codebase (million+ lines of code) that I've seen this issue occur in. It was happening around 2010-2011 at my previous job, using VS 2008.

quote:

A random thought, can you see if you have the IDE setting:

IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

turned On or Off. If this is turned Off can you please turn it On, and see if you get warned about mixed line endings when opening any of the problem files?

Mixed line endings can occasionally cause some odd effects, so I am wondering if it could be a factor here.



That setting was already enabled, and I never got a warning for that file (or any other file).

---

The problem seems to have gone away after installing VA 1906, but unless this was a previously known issue, then it probably didn't get fixed, so I'm expecting it to reoccur at some point. Anyhow, it's not a serious issue, and at least you guys are aware of it now :)
feline Posted - May 23 2012 : 6:32:48 PM
A random thought, can you see if you have the IDE setting:

IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

turned On or Off. If this is turned Off can you please turn it On, and see if you get warned about mixed line endings when opening any of the problem files?

Mixed line endings can occasionally cause some odd effects, so I am wondering if it could be a factor here.
accord Posted - May 23 2012 : 5:36:35 PM
Unfortunately I wasn't able to reproduce the problem using VA1906 with VS11 or VS2010. Which version of Visual Studio are you using?
Can you please try creating a clean new win32 test project to see if you're able to reproduce the problem after you wrapped the class in a namespace? (like on the screenshot below)


© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000