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
 Member listing not working!
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

MrDoomMaster
Tomato Guru

251 Posts

Posted - Dec 08 2006 :  2:47:52 PM  Show Profile  Reply with Quote
I think I found the problem...

The problem, I believe, lies in both xVector.h and xList.h. As you know, if you create a function in a template class that has syntax errors... the compiler will never complain until you actually use them first.

I just found an error in the "Empty()" function in my xVector class, because I had never used it before. I fixed the error but I'm still getting "find references" issues.

So, here's the test case:


	int GUIManager::NewPage( const char* xml_file )
	{
		int ret = 1; // non-zero is failure
		Page* page;

		SyncPageCache();

		if( NULL != ( page = GetExistingCacheObject( xml_file ) ) )
		{
			SyncPageCache();
			page->m_topMost = true;
			ret = 0;
		}
		else
		{
			TiXmlDocument xmldoc;
			char* absPath = MakePathAbsolute( xml_file );

			if( absPath != NULL )
			{
				if( xmldoc.LoadFile( absPath ) )
				{
					XUTIL::xVector< int > tvec;

					tvec.Push( 1 );
					tvec.Pop();
					int cap = tvec.Capacity();
					int tsize = tvec.Size();
					tvec.Erase( 1, 2 );
					tvec.Front();
					tvec.Back();
					tvec.Empty();


I've only shown you the top half of this function. The code at the very bottom is the code I've placed temporarily to test ALL of the functions in the xVector template class. This is how I found out that the Empty() function had a syntax error in it!

I believe that my template classes are error-prone and are causing the VAX parser to get confused.

Test case 1:
If I "find references" on ANY local variable *above* where I'm using the tvec variable, it will list ALL references to that variable BEFORE tvec.Pop();. If the local variable in question is referenced below the Pop() call, it will not appear in the Find References list. This is consistent for ALL local variables.

Test case 2:
If I "Find References" on the definition of "tvec", I get a list of references up to the line BEFORE tvec.Pop(). Now, xVector::Pop() compiles just fine, so I don't know why it's still not working. But I imagine there's other error-prone areas that the compiler in VS2005 just isn't finding, but the VAX parser IS finding and is causing the symbol database to become corrupt.

I'm not sure if the above is valid, but it most certainly seems that way. I'm going to continue to try to fix template class errors and hopefully get this resolved. In the meantime, I'll post the entire function for you:


	int GUIManager::NewPage( const char* xml_file )
	{
		int ret = 1; // non-zero is failure
		Page* page;

		SyncPageCache();

		if( NULL != ( page = GetExistingCacheObject( xml_file ) ) )
		{
			SyncPageCache();
			page->m_topMost = true;
			ret = 0;
		}
		else
		{
			TiXmlDocument xmldoc;
			char* absPath = MakePathAbsolute( xml_file );

			if( absPath != NULL )
			{
				if( xmldoc.LoadFile( absPath ) )
				{
					XUTIL::xVector< int > tvec;

					tvec.Push( 1 );
					tvec.Pop();
					int cap = tvec.Capacity();
					int tsize = tvec.Size();
					tvec.Erase( 1, 2 );
					tvec.Front();
					tvec.Back();
					tvec.Empty();

					// Create the new frame. There is always a single root frame of type "Frame".
					// This frame represents, in essence, the "screen", and can contain many child
					// frames which compose of a full menu.
					TiXmlElement* root = xmldoc.RootElement();
					if( root && strcmp( root->Value(), "GUI" ) == 0 )
					{
						Frame* newFrame = NULL;

						Page* page = new Page;
						if( page != NULL )
						{
							// Store the name of the XML File
							page->m_xmlFile = new char[ strlen( xml_file ) + 1 ];
							strcpy( page->m_xmlFile, xml_file );

							// ---------------------------------------------------------------------------------
							// TEMPLATE CREATION
							// ---------------------------------------------------------------------------------
							const TiXmlElement* templateIter = root->FirstChildElement( "Template" );
							while( templateIter != NULL )
							{
								m_templates.Push( templateIter );
								templateIter = templateIter->NextSiblingElement( "Template" );
							}

							// ---------------------------------------------------------------------------------


							// ---------------------------------------------------------------------------------
							// VARIABLE CREATION
							// ---------------------------------------------------------------------------------
							const TiXmlElement* variableIter = root->FirstChildElement( "Variable" );
							while( variableIter != NULL )
							{
								m_variables.Push( variableIter );
								variableIter = variableIter->NextSiblingElement( "Variable" );
							}

							// ---------------------------------------------------------------------------------


							// Create a temporary vector to store pointers to
							// dispatchable entities that need to have dependencies
							// resolved.
							XUTIL::xVector< Dispatchable* > dispatchables;

							// ---------------------------------------------------------------------------------
							// FRAME CREATION
							// ---------------------------------------------------------------------------------
							const TiXmlElement* rootFrame = root->FirstChildElement( "Frame" );
							if( rootFrame != NULL )
							{
								// Check the type of the root frame. It must be of type "Root" (RootFrame class)
								const char* rootType = rootFrame->Attribute( "type" );
								if( rootType != NULL && strcmp( rootType, "Root" ) == 0 )
								{
									newFrame = FrameFactory::Create( rootType, NULL, NULL, NULL, page );
									if( newFrame != NULL )
									{
										ParseFrame( rootFrame, newFrame, page );

										dispatchables.Push( newFrame );
									}
								}
							}

							// ---------------------------------------------------------------------------------



							// ---------------------------------------------------------------------------------
							// SETTER CREATION
							// ---------------------------------------------------------------------------------
							const TiXmlElement* setterElement = root->FirstChildElement( "Setter" );
							while( setterElement != NULL )
							{
								const char* type = setterElement->Attribute( "type" );
								if( type != NULL )
								{
									const char* id = setterElement->Attribute( "id" );

									Setter* newSetter = SetterFactory::Create( type, id, page );
									if( newSetter != NULL )
									{
										ParseSetter( setterElement, newSetter, page );
										page->m_setters.Push( newSetter );

										dispatchables.Push( newSetter );
									}
								}

								setterElement = setterElement->NextSiblingElement( "Setter" );
							}

							// ---------------------------------------------------------------------------------

							// Add the GUIManager *and* GameScript to the dependencies list,
							// since both of these are capable of receiving dispatches.
							dispatchables.Push( this );
							dispatchables.Push( GameScript::Instance() );


							// Resolve dependencies *AFTER* all frames and setters
							// have been created. Resolving dependencies
							// means that actions (which currently only have
							// string ID's to the frames they will be dispatched
							// to) are converted to pointers, for faster dispatching
							// during "runtime".
							page->m_eventCache.ResolveDependencies( dispatchables );

							// Finally, the cache is completely created
							if( newFrame != NULL )
							{
								page->m_topMost = true;
								page->m_rootFrame = newFrame;

								m_pages.PushBack( page );
								ret = 0;
							}

							// Delete all of the templates & variables. They are not needed outside of the parser.
							m_templates.Clear( true );
							m_variables.Clear( true );
						}
					}
				}

				delete[] absPath;
			}
		}

		return ret;
	}
Go to Top of Page

MrDoomMaster
Tomato Guru

251 Posts

Posted - Dec 08 2006 :  3:03:42 PM  Show Profile  Reply with Quote
Also, there's another weird thing going on...

Sometimes comments will pop up when I hover over a variable name. These comments have weird symbols in them, and I'm not really sure what is actually supposed to be appearing in them. In Visual Assist, I do not have "Show comments from source" checked.



Also, Feline, you have xVector.h and xList.h, correct? I'm wondering if maybe you can look through them and see if you notice any reason why creating objects of these classes would cause find references for local variables to not work. (or maybe it's just something else)

Thanks.
Go to Top of Page

MrDoomMaster
Tomato Guru

251 Posts

Posted - Dec 08 2006 :  3:21:26 PM  Show Profile  Reply with Quote
Build 1534:

This build allows member listings to appear for local variables that appear in Find References results.

Build 1541:

This build does NOT allow member listings to appear for the very same local variables tested in build 1534. Find references is also even more completely useless on local variables.


I'm going to try uninstalling Visual Studio, DELETING visual studio's install directory afterwards, cleaning the registry of all VS2005 related keys, and reinstall visual assist.

If this doesn't work, I don't know what will.
Go to Top of Page

MrDoomMaster
Tomato Guru

251 Posts

Posted - Dec 08 2006 :  4:16:04 PM  Show Profile  Reply with Quote
Wow, this sucks.

I did the following:

- Uninstall Visual Studio 2005 Professional
- Delete all VS2005 related registry keys (In HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER)
- Delete all VS2005 related folders in files in c:\\documents and settings\\user\\Application Data
- Uninstall Visual Assist X
- Remove Visual Assist X related registry keys
- Remove all files related to Visual Assist X in c:\\program files
- Restart computer
- Install Visual Studio 2005 Professional
- Open VS2005 with default settings, open the project, test default intellisense (all is working well)
- Close VS2005, install Visual Assist X Build 1541
- Open VS2005 (now with VAX installed), leave VAX at default settings, open same project.
- Wait for parsing to complete for both default intellisense and VAX.
- Attempt to "find references" on a previously not-working local variable
- SAME STUPID BROKEN RESULTS!

I don't know what more you can do than I just did. It doesn't make any sense to me. Maybe this is machine specific? I don't know.

EDIT:
I just found out how to edit posts... I never saw the option because I was always not logged in :) Apologies for the spam.

Edited by - MrDoomMaster on Dec 08 2006 4:58:24 PM
Go to Top of Page

aryaky
New Member

China
5 Posts

Posted - Dec 11 2006 :  02:48:54 AM  Show Profile  Reply with Quote
hai MrDoomMaster, i have same problem just as you. but i use vs2003.
now i have to use default intellisense.
i almost want to reinstall xp, but i don't have so many time.
Go to Top of Page

MrDoomMaster
Tomato Guru

251 Posts

Posted - Dec 11 2006 :  11:40:45 AM  Show Profile  Reply with Quote
I reinstalled windows on both machines and it fixed the problem, for some odd reason.

Both machines, at one point, had the very same software on them. The installations were fairly old (years) and the reinstallation must have done something magical!

Anyway, we'll never know the cause of the problem but at least it's fixed now.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Dec 11 2006 :  12:53:18 PM  Show Profile  Reply with Quote
I really don't know what to say to this, but I am very glad the problem is fixed! Having to reinstall windows just to fix this... nasty!

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

MrDoomMaster
Tomato Guru

251 Posts

Posted - Dec 12 2006 :  01:43:38 AM  Show Profile  Reply with Quote
Well, I didn't necessarily reinstall windows *just* to fix this. There have been several things I've been unhappy with for a long time and Visual Assist was just the last bit of motivation I needed to actually get around to doing it.

Thanks for all of your help Feline, I really do appreciate it.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000