T O P I C R E V I E W |
MrDoomMaster |
Posted - Nov 28 2006 : 2:01:18 PM Not sure why, but for build 1540 and 1541, I am not getting member listings for class objects.
For example, take the following:
#include "xVector.h"
void foo( void )
{
XUTIL::xVector< Dispatchable* > dispatchables;
dispatchables.
}
The code above does not give me a member listing, although the default intellisense does.
I am using Visual Studio 2005 Team Suite.
if I do this:
struct tempStruct
{
int foo;
};
void Foo( void )
{
tempStruct obj;
obj.
}
Then I get a member listing with "foo" in the list. The difference between both of the scenarios is that the xVector class is in a different file, and is also a templated class. The second scenario has the structure definition in the same file and is not a template class.
Anyone had similar issues? I know this is a very non-specific issue, and I wish I could provide more details. I hope that maybe there are some debugging steps I can take to resolve the issue.
Thanks. |
30 L A T E S T R E P L I E S (Newest First) |
MrDoomMaster |
Posted - Dec 12 2006 : 01:43:38 AM 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. |
feline |
Posted - Dec 11 2006 : 12:53:18 PM 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! |
MrDoomMaster |
Posted - Dec 11 2006 : 11:40:45 AM 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. |
aryaky |
Posted - Dec 11 2006 : 02:48:54 AM 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.
|
MrDoomMaster |
Posted - Dec 08 2006 : 4:16:04 PM 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. |
MrDoomMaster |
Posted - Dec 08 2006 : 3:21:26 PM 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. |
MrDoomMaster |
Posted - Dec 08 2006 : 3:03:42 PM 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. |
MrDoomMaster |
Posted - Dec 08 2006 : 2:47:52 PM 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;
} |
feline |
Posted - Dec 08 2006 : 1:51:11 PM Using the same test project I triggered comment reflower on the big comment, then saved the file, waited a couple of moments, and then VA and refactoring was fine.
Remember that comment reflower will add or remove lines to the file, possibly quite a few, which will mean that VA's "index" of what code is on what line will be out of date. Triggering this plugin is not quite the same as making the edits manually. I am not sure how it works, but it looks like it just sends a single "atomic" update to the document, since I did not see any screen flicker as the text was redrawn.
Until VA has caught up with the changes things will not work correctly.
It is interesting that you are not getting the refactoring options at first. What are you doing? Is this when you have just opened a project, or after you have been editing for a while?
What are you seeing when you open the refactoring context menu? Just "refactoring is not available on this symbol" or something else? What about the refactoring sub menu on the IDE VAssistX menu? Here items are disabled if not available.
Which items are available is tied to the parser, and understanding the current file, so if the file has been changed and VA has not yet caught up then this can happen.
Rename uses Find References to get the list of references, so I expected the two to behave the same, still it was worth checking. |
MrDoomMaster |
Posted - Dec 07 2006 : 2:27:52 PM Hi Feline, thanks again for your reply.
It's very comforting (and also uncomforting) to know that you are starting to see the same symptoms after having Comment Reflower installed. I find it odd, however, that on both machines I still have the same problems after uninstalling comment reflower.
The "Rename" refactoring feature is just as broken as "Find References", in that I still get the same two results as shown in the screenshots I posted above, in a previous post. It does not give me all references to the myList local variable. As expected, by renaming the variable anyway, only those two references get a variable name change.
I usually use the refactoring icon to access refactoring features for a variable. Try this: When Comment Reflower is installed, hover your cursor over the myList local variable and wait for the refactoring icon to appear. Expand the menu and see if you get a list of refactoring options. If you don't, keep making the menu appear until you eventually see some refactoring options (I normally have to do this 3-4 times before I get a list of refactoring options). Once you get a list of refactoring options (if you do), then try to "Find References". I am curious if you get a list of references.
At this point I'm a bit out of ideas on what I can do to further investigate the issue. Hopefully you can offer a few more test cases that may help you guys out in figuring out why Comment Reflower is causing so many problems. After all, it's a very useful tool and I'd hate to get rid of it just so that Visual Assist works :) I use it in all of my Doxygen comments. |
feline |
Posted - Dec 07 2006 : 12:54:59 PM There is no need to feel hopeless just yet! If we don't start making progress soon some form of debug dll with extra logging may be the next step.
Using my win2k + VS2005 team system + VA 1533 machine I have installed the comment reflower VS2005 plugin I opened your test project, and then triggered comment reflower on the description comment, to make sure that it was installed and working. The comment was reshaped very nicely, I felt nicely impressed with this, and the file was listed as modified. At this point I could not trigger *any* refactoring operations from VA. I tried in three different places in the code, and nothing was available. So we do have a potential conflict between using comment reflower and VA. I did not save the file or tell VA to reparse the file, since this was not directly relevant.
after undoing the comment reflow operation refactoring started working normally again. I restarted the IDE, and triggered Find References on the declaration of the local variable "myList" and 10 references were found.
close the IDE and install VA 1541 over the top of 1533, with comment reflower already installed. I accepted the defaults, so autotext was overwritten and the IDE was NOT reset. Load the IDE, wait for all parsing to finish, and Find References is working correctly.
Restarting the IDE does not make any difference.
Now reinstall 1541 over the top of its self, saying yes to reset the IDE this time. Comment reflower is still listed in the IDE tools menu After waiting for all parsing to finish there are still no problems with Find References.
Can you try running rename on this local variable? It should give the same results as Find References, but since it uses a different GUI this might make a difference. This is clutching at straws, but I am not desperate to reinstall the IDE just yet |
MrDoomMaster |
Posted - Dec 07 2006 : 12:14:07 PM One other similarity that both IDE's have is that I don't allow Visual Studio to load 'feacp.dll'.
This file is located in Microsoft Visual Studio 8\\VC\\vcpackages\\feacp.dll
From my understanding, this DLL provides the "stock" intellisense functionality in Visual Studio. Since it's slow, doesn't work correctly, and I use Visual Assist, I have renamed this file to feacp.dll.bak to prevent it from being loaded.
By renaming this file back to normal and allowing visual studio to load it, it makes no difference in the symptoms I'm seeing out of Visual Assist. Just thought I'd let you know this small detail because it is something both work and home share. |
MrDoomMaster |
Posted - Dec 06 2006 : 11:58:11 PM Well I can finally verify to you that I had VS2005 Comment Reflower installed on both machines. I don't know if this is the source of the problem.
I'm really starting to feel hopeless about this. I just double checked the project I sent you at home, and I'm seeing the very same problems- even after uninstalling Comment Reflower.
I have one last idea before I feel completely hopeless. If you could download Comment Reflower, install it, and see if you can reproduce the problems I'm seeing in the Console project, that might give us an answer.
Here's a direct link: http://downloads.sourceforge.net/commentreflower/CommentReflowerForVS2005.1.4.zip?modtime=1136331489&big_mirror=0
Here's some exact steps you should take: 1) Install a fresh copy of Visual Studio 2005 (Team Suite, if possible) 2) Install Comment Reflower from the link above, and Visual Assist X build 1541 (Not sure what order I installed them in, but if you have the time please try both ways) 3) Run the Console project I sent you earlier and try the same test cases again.
Let me know what you find. Thanks again Feline for all of your great guidance. |
MrDoomMaster |
Posted - Dec 06 2006 : 2:55:02 PM Yes, there is some overlap.
I have installed "VS2005 Comment Reflower" on both machines, although at this point the one at work no longer has this addon installed. Also at work I have DevPartner (boundschecker) installed (was uninstalled yesterday, however) but I don't think I have this installed at home. I can't remember. I rarely ever use VS2005 at home. In fact, I basically just installed it on a fresh copy of windows XP 64-bit and left it sitting there, unused.
I'd have to double check later what addons I have installed at home, because I can't remember off the top of my head right now.
I ran the test using the exact steps you provided at the bottom of your post. I have no different results.
The two files you mentioned I have never modified. In fact, I never knew they existed until you mentioned something.
When I get home I'm going to try the same exact project I gave you on my machine using the steps you provided and see if I can reproduce the problems I'm getting at work. That could be a few hours :)
Below, I will provide some screenshots of the problems:
----------------------------------- Find Reference Results: -----------------------------------
----------------------------------- Member listing not working: -----------------------------------
|
feline |
Posted - Dec 06 2006 : 1:28:06 PM I have the project, thank you.
I can see that this is going to be lots and lots of "fun"
Running win2k professional and VS2005 Professional I have opened the solution. Sitting in "App1.cpp" both tests that you describe in the comment block work perfectly for me.
Find References is returning 10 references for the local variable myList. I have run Find References on each and every one of these 10 references, running different finds between, to make sure that a new find is being run, and VA is not simply reusing the last set of results.
Moving to a different test machine, win2k, VS2005 Team Edition and VA 1533 (I have not upgraded this for a little while as you can see) I am still getting 10 references for Find References on the local variable.
I am also getting a sensible list of class members for "myList."
So I am seeing the same behaviour on 2 different machines here.
The good news is that you are seeing the same problems on 2 different machines there. This means we know it is not some strange, random problem with just one machine.
Do you have the same plugin's installed on both machines? Any overlap at all, other than VA?
Have you modified either:
C:\\Program Files\\Visual Assist X\\Misc\\StdAfx.h C:\\Program Files\\Visual Assist X\\Misc\\StdafxVa.h
on either machine? They should be reset to the standard forms when you reinstall VA, but it is worth asking.
Based on your machine information further up this thread I have also tried this on a WinXP professional SP2 machine with 2 processors and VS2005 Professional. I am still getting the same result for Find References.
In case it matters, and it might, to run a test I am doing the following:
Your test project is placed on the local C: I open the project in VS2005 via "open project" in the IDE. Using solution explorer I open just one file, "App1.cpp" I wait for both VA and the IDE to finish parsing, I am waiting for the CPU usage to return to normal. I then trigger Find References via the VAssistX menu, using the keyboard to do so, Alt-A, D |
MrDoomMaster |
Posted - Dec 06 2006 : 11:48:35 AM File is sent.
The filename is Console.7z
There are a few files in particular in this project you will be interested in. The entire workspace contains one solution and one project. The project will build as a console application.
App1.cpp contains documentation that I have specifically typed for you, Feline, to assist you in some test cases. I have listed 2 test cases in the documentation in this file that you can read later on when you open the project.
There's also xList.h and xVector.h. xVector.h is not used in the project, but I included it since it has the same basic problems that xList.h has.
If you need any other information, please let me know!
PS: I had tested this project on both Visual Studio 2005 Professional and Team Suite editions. |
feline |
Posted - Dec 06 2006 : 08:58:38 AM I did a lot of work in C and C++ under SCO UNIX at my last job. While there was some basic C libraries the C++ STL classes were a disaster, since they were nothing like the real STL classes, so I am fully aware that you are not joking about needing things like this!
The easiest way to get the file to me is to upload it via
http://www.wholetomato.com/support/contact.asp
referencing this thread ID or URL in the description, so we can match it up. Zip is good for me, anything that 7-zip can read will be fine as well
I can then run the same tests here in a couple of IDE's and let you know what I find. Many thanks for letting us try the same code, this should make things a lot easier.
Can you include some basic details of the file you ran Find References in, and the variables it failed on? |
MrDoomMaster |
Posted - Dec 05 2006 : 9:21:07 PM Ohhh... Interesting news!
I just got home from work and installed the latest build of VAX (1541) on my Windows XP 64 Professional system, which also has Team Suite. It has the VERY same symptoms! I've even tested this on a very small project.
The project at work is very VERY large. Over 400 source files. There would be no way for me to debug the issue there. However, the small project at home is only a few files... maybe like 5.
There is one similarity between my example project and the very large one at work. They both use the same list class that I created. xList.h
I deigned this class mainly for platforms that do not have standard C libraries (No, I'm not joking!).
In any case, I would be more than happy to pass this example project containing about 5 files to you guys for debugging purposes, if you wish. Just let me know how you would like it packaged ( probably ZIP format ) and where I can upload it at!
I'm thinking that since both projects share the same problems, and both share the very same list class (xList.h), maybe xList.h is confusing visual assist? This is why I want to send the project to you guys along with the source code. Maybe the developers can open the project using Team Suite and see if they can get similar problems, or maybe you Feline can check it out yourself :)
Just let me know! Thanks! |
MrDoomMaster |
Posted - Dec 05 2006 : 3:51:35 PM I uninstalled the following plugins from VS2005:
BoundsChecker VS2005 Comment Reflower
This did not help anything. So, I uninstalled Visual Studio 2005 Team Suite and downgraded to Professional.
The downgrade didn't even help... same problems! |
MrDoomMaster |
Posted - Dec 05 2006 : 2:38:46 PM There really is no easy way, that I know of, to disable Boundschecker.
I will uninstall it temporarily and post back here with any results. |
feline |
Posted - Dec 05 2006 : 1:03:33 PM Is it fairly easy to disable the other two plugin's, just to see if they are causing problems? Since you are using VS2005 you may need to set a registry key to stop the plugin's loading, rather than simply using the Add-in manager. See here for the details of how this works for VA.
http://docs.wholetomato.com?W306
If something was confusing VA's parser I would have expected at least one of these tests to have failed, if not all of them. |
MrDoomMaster |
Posted - Dec 05 2006 : 12:13:06 PM Yes, both of these variables are bolded when I enable "Bold local variables".
Alt-G works properly.
Find References instantly shows results (even though the list is completely empty) and there is no progress bar.
Find next/previous by context works fine. It finds the next instance of that variable name in the document. |
feline |
Posted - Dec 05 2006 : 07:48:18 AM Does VA know that plyx and plyy are local variables? If you turn on:
VA Options -> Environment -> Fonts and Colors -> Local symbols in Bold
are they shown in bold? if you try alt-g on then are you taken to where they are declared?
Find References on a local variable should be quite reliable, since VA knows it does not have to scan the entire project. When you trigger Find References what do you see? Specifically if you trigger Find References on a function you will see a progress bar as VA scans your project, but if you trigger Find References on a local variable there is no progress bar and you just get the answer.
What do find next by context and find previous by context do for these local variables?
With regard to trying to find the problem, the best approach may be to copy the entire solution to a test directory, and then just pull handfuls of files out of it until the problem goes away. Unfortunately this could be a fair bit of work, depending on the size of the solution. |
MrDoomMaster |
Posted - Dec 04 2006 : 3:45:11 PM Okay,
I just commented out *every* single include in the file in question (SSEngine.cpp). I rebuilt the symbol database and reopened the project. Visual Assist is still unable to find references for those local variables (plyx and plyy). Not sure what to do from there...
I guess this test proves that the includes in that file really have nothing to do with the problem. Maybe there's a file that's being parsed somewhere else that's causing the symbol database to become corrupted? |
MrDoomMaster |
Posted - Dec 04 2006 : 3:23:33 PM This is rather hilarious because I think the code base I'm working on has found an exploit in Visual Assist.
The code base is very horribly done. In fact, if you were able to look at it you'd agree that it's the most horrible code on the face of the planet. No lies. I have no doubt in my mind that it would confuse *any* intellisense parser.
The very same file we've been noticing the problems out of has the following includes at the top:
#include "precompile.h"
//#if !defined(__EDITOR__) && !defined(__WINDOWS_PORT__)
//#include <f32file.h>
//#endif
#include "SSEngine.h"
#include "SSEntity.h"
#include "SSPlayer.h"
#include "SSBullet.h"
#include "SSPlatform.h"
#include "Bitmaps.h"
#include "AlphaAnim.h"
#include "Surfaces.h"
#include "TileMap.h"
#include "TilePalette.h"
#include "TkoNew.h"
#include "TKOArray.h"
#include "TriggerMap.h"
#include "AudioSession.h"
#include "TextDraw.h"
#include "Weapons.h"
#include "tkoString.h"
#include "GameTimer.h"
#include "Model.h"
#include "titan.h"
#include "profiles.h"
#include "AssetLoader.h"
#include "FileIO.h"
#include "Path.h"
#include "UsefulStuff.h"
#ifdef __EDITOR__
#include "Editor.h"
#include "SpriteEngineDlg.h"
#endif
#include "Trigactspawnenemy.h"
#include "Trigactlockcamera.h"
#include "Trigactunlockcamera.h"
#include "Trigactsetcameralogic.h"
#include "Trigactloopmap.h"
#include "Trigactendlevel.h"
This is just a small sample of how horrible this file is. Debugging the problem will probably take a lot of time on my end. When I do find the source of the issue, however, I will most definitely post it here.
Thanks again! |
feline |
Posted - Dec 04 2006 : 2:05:05 PM I agree, this seems to rule out the file its self.
When you open the file on its own there are no project settings, so the IDE, and thus VA will not know where to find project specific include directories. So some of the #include lines will reference unknown files, so they will not be parsed.
My current theory is that one of the header files, hopefully one of the directly included ones, is causing the problem. You may be able to make progress fairly quickly by copying the code file + any includes to a separate directory and putting them into a test project, to see what happens.
Would you be able to try this? Hopefully you can find the file that is causing the problems, and strip it down to the point where you will be able to send us a copy of the file for testing purposes. Code is normally not available, but the problem bit normally is. |
MrDoomMaster |
Posted - Dec 04 2006 : 11:08:21 AM Interesting. By closing Visual Studio, and opening the file just by itself... find references works *perfectly*. So I guess this means it's not something in the file, right?
The next/previous scope commands seem to be working fine... |
feline |
Posted - Dec 04 2006 : 08:37:45 AM Simply copy / pasting these two functions into a test project in VS2005 with VA 1541 and Find References is working perfectly for me on both functions.
I have created a new C++ console application in VS2005 team suite and have added these two functions, along with a small amount of dummy code. I was going to add enough dummy code to make this compile, but it is not really worth while. Find References is working perfectly for me in this solution.
If you email me via the forum I will reply with the test project attached, if you want.
I am starting to think that there is something in this file that is confusing VA's parser. Does VA' next and previous scope commands work correctly in this file?
What happens if you open the cpp file containing these functions on its own? It is possible that by deleting chunks of this cpp file the problem will go away, which would seem to prove that something in the file is the cause of the problem. |
MrDoomMaster |
Posted - Dec 02 2006 : 9:07:07 PM Yes, I have reinstalled VAX after installing the new IDE (although initially when I uninstalled Visual Studio 2005 professional, I did not uninstall visual assist before installing Team Suite). I installed VAX over again several times.
Does find references work for local variables? Sometimes. Oddly enough, some instances of local variables work fine with find references, others don't even show 1 entry in the find references window.
I have two test cases. Both are in the same file, (cpp file) and each are in two separate functions.
First test case:
void SSEngine::SpawnExplosionPieces( fx24_8 xpos, fx24_8 ypos, int amount, int /*size*/, fx24_8 lifespan )
{
for( int i = 0; i < amount; ++i )
{
ShrapnelEntity* entity = TKO_NEW(ShrapnelEntity);
entity->Init();
entity->SetPosX(xpos);
entity->SetPosY(ypos);
#ifndef __EDITOR__
entity->SetModel( ENGINE->m_ModelManager.GetModel(MODEL_SHRAPNEL) );
entity->SetScale( ScalingHack(method::as_fixed(24)) );
entity->SetDrawMode(kDM_TexturedLit);
#endif
fx24_8 fixangle = fx24_8(ENGINE->rnd() % 256);
entity->SetVelX( method::as_fixed(fixsin(fixangle.raw())) );
entity->SetVelY( method::as_fixed(fixcos(fixangle.raw())) );
entity->SetLifespan( lifespan );
AddEntity(entity);
}
}
Above, notice the variable named entity. If I "find references" on any copy of that variable name in this function, I get a full and complete list of references.
Second test case (Fairly long function):
void SSEngine::RespawnCamera()
{
if( m_bLockCamera )
return;
short plyx = (short)to_integer(m_pPlayer->GetPosX());
short plyy = (short)to_integer(m_pPlayer->GetPosY());
switch ( m_nCameraLogic )
{
case CAMERA_SCROLL_RIGHT:
m_fBitmapX = fx24_8( plyx - (VIEWPORT_WIDTH / 4) );
m_fBitmapY = fx24_8( plyy - ( 7 * VIEWPORT_HEIGHT / 8 ) );
m_fBitmapLastValidX = m_fBitmapX - fx24_8(VIEWPORT_WIDTH);
if ( m_fBitmapLastValidX < 0 )
m_fBitmapLastValidX = 0;
break;
case CAMERA_SCROLL_UP:
m_fBitmapX = fx24_8( plyx - COLUMN_EDGE_BUFFER );
m_fBitmapY = fx24_8( plyy - ( 7 * VIEWPORT_HEIGHT / 8 ) );
m_fBitmapLastValidY = m_fBitmapY;
break;
case CAMERA_SCROLL_RIGHT_INCLINE:
m_fBitmapX = fx24_8( plyx - (VIEWPORT_WIDTH / 3) );
m_fBitmapY = fx24_8( plyy - ( 7 * VIEWPORT_HEIGHT / 8 ) );
break;
case CAMERA_SCROLL_HORZ:
m_fBitmapX = fx24_8( plyx - COLUMN_EDGE_BUFFER );
break;
case CAMERA_SCROLL_DOWN:
m_fBitmapX = fx24_8( plyx - COLUMN_EDGE_BUFFER );
m_fBitmapY = fx24_8( plyy - ( 2 * VIEWPORT_HEIGHT / 3 ) );
break;
case CAMERA_FORCED_SCROLL:
//m_fBitmapX = fx24_8( plyx - COLUMN_EDGE_BUFFER );
m_fBitmapX = fx24_8( plyx - 88 );
//m_fBitmapY = fx24_8( plyy - ( 7 * VIEWPORT_HEIGHT / 8 ) );
m_fBitmapY = fx24_8( plyy - 168 );
break;
}
// make sure to stay within map bounds
if( m_fBitmapX < 0 )
{
m_fBitmapX = 0;
}
if( to_integer(m_fBitmapX) > ( m_pCurrentLevel->GetTileMap()->GetMapWidth() *
m_pCurrentLevel->GetTileMap()->GetTileSize() - VIEWPORT_WIDTH ) )
{
m_fBitmapX = fx24_8( m_pCurrentLevel->GetTileMap()->GetMapWidth() *
m_pCurrentLevel->GetTileMap()->GetTileSize() - VIEWPORT_WIDTH );
}
if( m_fBitmapY < 0 )
{
m_fBitmapY = 0;
}
if( to_integer(m_fBitmapY) > ( m_pCurrentLevel->GetTileMap()->GetMapHeight() *
m_pCurrentLevel->GetTileMap()->GetTileSize() - VIEWPORT_HEIGHT ) )
{
m_fBitmapY = fx24_8( m_pCurrentLevel->GetTileMap()->GetMapHeight() *
m_pCurrentLevel->GetTileMap()->GetTileSize() - VIEWPORT_HEIGHT );
}
m_fParallaxX = m_fBitmapX * m_pCurrentLevel->m_fParallaxSpeed;
m_fParallaxY = m_fBitmapY * m_pCurrentLevel->m_fParallaxSpeedVert;
m_fForegroundX = m_fBitmapX * m_pCurrentLevel->m_fForegroundSpeed;
m_fForegroundY = m_fBitmapY * m_pCurrentLevel->m_fForegroundSpeedVert;
m_fUndergroundX = m_fBitmapX * m_pCurrentLevel->m_fUndergroundSpeed;
m_fUndergroundY = m_fBitmapY * m_pCurrentLevel->m_fUndergroundSpeedVert;
}
Above, the second test case. At the top of the definition, there's two local variables: plyx and plyy. Both of these, when I first hover my cursor over them and get the refactoring icon, the menu appears with "Refactoring not available." If I hover over it a SECOND time right after, then the list appears with valid entries for that variable (weird huh?). When I click "find references" for either of those variables, the list appears completely empty.
The "Open file in workspace" dialog works perfectly.
The "Open symbol in workspace" dialog appears to be working fine, I haven't noticed any abnormalities in it (I don't usually use it that much, but just glancing through it the list seems to be fairly complete).
I hope I've provided sufficient answers to your inquiries. Thanks a ton for helping out!
*edited by feline to make the thread less wide* |
feline |
Posted - Nov 30 2006 : 2:16:32 PM Have you reinstalled VA since upgrading to the new version of the IDE? If not can you please try that.
We have other users using Team Suite edition without these sort of problems, so it is not the IDE its self.
Does Find References work correctly for local variables? I am trying to get a feel for the nature and scope of this problem.
Does OFIW list all of the expected files for your solution? How about FSIW, is this producing a sensible list of symbols? |
|
|