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
 broken find-references (v.1819)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Michal Puczynski
Ketchup Master

Poland
85 Posts

Posted - Apr 14 2010 :  06:00:52 AM  Show Profile  Reply with Quote
The following code causes VA parser to fail.

#if _MSC_VER < 1300
if (ERROR_SUCCESS==RegKey.QueryValue(RegParams,_T("Parameters"),&dwLen))
#else
if (ERROR_SUCCESS==RegKey.QueryStringValue(_T("Parameters"),RegParams,&dwLen))
#endif
{
  bIgnoreServiceParam = true;
  lpParsedParams = RegParams;
}

The lines are within a method. The parser is unable to find the end of the method and thinks it follows to the end of source file. When I try find-references to symbols within the code, VA find result reports all references being a part of the function. Following functions are not reported at all.
When #if _MSC_VER < 1300 .. #else .. #endif is removed VA works fine.

VA 1819, in VC++ 2003 SP2, no other plugins, intellisense disabled in registry.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 14 2010 :  4:55:00 PM  Show Profile  Reply with Quote
I wasn't able to reproduce this. Can you please try if you can reproduce this in a clean new win32 project? I'm wondering if something in your project or in the surrounding code causes this.
Go to Top of Page

Michal Puczynski
Ketchup Master

Poland
85 Posts

Posted - Apr 15 2010 :  03:26:05 AM  Show Profile  Reply with Quote
I doubt it. It is a very simple test. I comment the #if part and it works, when I revert to original it is back wrong.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 15 2010 :  03:50:42 AM  Show Profile  Reply with Quote
I see. The problem is that I didn't see the problem that you are seeing even with your original code (when nothing was commented out)

I asked you to check the behavior in a new project to draw conclusions. Another possibility is to send the whole file or at least the whole function to us to see if this helps. It is not normally possible, but worth mentioning. You can send the files via the form:

http://www.wholetomato.com/support/contact.asp

if you decide to do it. Please include the URL of this topic in the description so we can match it up.

It is important for us to be able to reproduce the problem on our side to be able to fix it.

Edited by - accord on Apr 15 2010 04:02:23 AM
Go to Top of Page

Michal Puczynski
Ketchup Master

Poland
85 Posts

Posted - Apr 20 2010 :  10:26:42 AM  Show Profile  Reply with Quote
I was worth trying older build. I rolled back to 1814 and this one is able to recognize the #if stuff correctly together with following code. I decided to dig deeper as I had numerous other problems with #if and #ifdef clauses. ex. when writing number of code changes under #ifdef/#else/#endif parser was unable to recognize variable definitions. In large parts of code those variables were underlined red. After reinstalling 1814 instead of 1819 all gets back to normal.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 20 2010 :  3:36:52 PM  Show Profile  Reply with Quote
Are you aware of that the underlines appear only in modified files? This behavior can seem erratic if you don't aware of that.
Installing builds may trigger rebuild symbol databases so it may caused the difference. In this case VA1819 would work now.
You can trigger this manually via

VA Options -> Performance -> Rebuild symbol databases

Worth trying this when things go wild. But normally you don't have to use or even know about this option.

Edited by - accord on Apr 20 2010 3:38:29 PM
Go to Top of Page

Michal Puczynski
Ketchup Master

Poland
85 Posts

Posted - Apr 21 2010 :  02:44:13 AM  Show Profile  Reply with Quote
I did that before reverting to 1814 with no result.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Apr 27 2010 :  3:25:06 PM  Show Profile  Reply with Quote
Appologies for the delay in getting back to you about this. I have tested the following code in VS2003 with VA 1814, 1819 and 1822:

void testFelineFuncBeforeTestCode() { }

void testFelineFuncHoldingTestCode()
{
	bool bIgnoreServiceParam;
	void *lpParsedParams;
#if _MSC_VER < 1300
	if (ERROR_SUCCESS==RegKey.QueryValue(RegParams,_T("Parameters"),&dwLen))
#else
	if (ERROR_SUCCESS==RegKey.QueryStringValue(_T("Parameters"),RegParams,&dwLen))
#endif
	{
		bIgnoreServiceParam = true;
		lpParsedParams = RegParams;
	}
}

void testFelineFuncAfterTestCode()
{
	bool bIgnoreServiceParam;
	bIgnoreServiceParam = false;
}

when I do a Find References search for "bIgnoreServiceParam" in either function, VA only returns the references inside that function. Can you try this test on your system please?

It is possible you will see a different result, and if you do, I am wondering if the problem is file or solution specific.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000