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
 VA Find References and Peek Definition
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kornman00
Senior Member

USA
30 Posts

Posted - Apr 06 2020 :  09:40:37 AM  Show Profile  Reply with Quote
I think I have observed a bug when it comes to using VA's Find All References while Peek Definition in C++.

I had ran FAR on a symbol, which I was interested in what was writing to it. The current document I had open (say, ABC.cpp), I had also Peek Definition to the same file where the writes were taking place (say, XYZ.cpp). When I clicked on either the FAR's tree result for the file (XYZ.cpp), or the instances within the file (XYZ.cpp) it would either go to the top of the current document (ABC.cpp) or the corresponding line of the FAR instance in the current document (ABC.cpp).

I've noticed this in before with VS2015 and (just now in) 2017.

I may have noticed this impacting VA's Open File In Solution as well (it wouldn't open XYZ.cpp, at least on the first attempt). Apologies, but I do not have time to debug/provide more details at this time. Hope this is enough for investigations for now. I love VAX!

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Apr 06 2020 :  1:46:27 PM  Show Profile  Reply with Quote
I don't understand what you are doing. I have set up the following test, using VS2015 and VA 2366.0. In the file "test_simple.h" I have the code:

class testPeekAndFindRef
{
private:
	int m_nValue;

public:
	// try this as the target of IDE peek
	// and also as the target of VA Find References
	void testPeekHere(int nSetValue)
	{
		m_nValue = nSetValue;
	}

	void setValueOne();
	void setValueTwo();
	void setValueThree();
	void setValueFour();
};


and then in the matching file "test_simple.cpp" I have the code:

void testPeekAndFindRef::setValueOne()
{
	// test - trigger "Peak Definition" here on this function call
	// then make sure keyboard focus is in this cpp file
	// and trigger VA Find References on the function call
	// jump to .h or .cpp file references in Find References Results
	testPeekHere(1);
}

void testPeekAndFindRef::setValueTwo()
{
	testPeekHere(2);
}

void testPeekAndFindRef::setValueThree()
{
	testPeekHere(3);
}

void testPeekAndFindRef::setValueFour()
{
	testPeekHere(4);
}

I open the peak definition window, as explained in the comments. This shows part of the .h file inside the .cpp file. If I jump to a .h file reference via Find References Results then the current file changes to the .h file, as normal. When I jump to a .cpp file reference via Find References Results I jump back to the cpp file, and the peak definition block is still visible.

Am I testing the correct thing here?

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

kornman00
Senior Member

USA
30 Posts

Posted - Apr 11 2020 :  4:40:40 PM  Show Profile  Reply with Quote
Sorry, I haven't had time this week to try and figure out the 100% repro steps.

It sounds like you're testing the right thing. There may be some more steps for this. I forget if I did a Peek then proceeded to do a Find All Refs from the Peek'd file or after the Peek was already opened. I know it doesn't always happen, but I know I've seen it happen a handful of times (and in both 2015 and most recently 2017).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Apr 15 2020 :  11:06:09 AM  Show Profile  Reply with Quote
Random effects certainly do happen.

Do you have any sense of how often this happens? 1 in 10? 1 in 1,000?

Any clues to help reproduce this on demand here would be appreciated.

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

kornman00
Senior Member

USA
30 Posts

Posted - Apr 16 2020 :  4:54:29 PM  Show Profile  Reply with Quote
I'd put it closer to 1 in 1,000. I've only noticed it a handful of times, even being a heavy user of VA Find All Refs and Peek Def.

I can hopefully set some time aside to attempt a repro for this around the end of the month.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Apr 17 2020 :  08:49:16 AM  Show Profile  Reply with Quote
At least the problem is rare, that is something. I am happy to help you try and pin this down, but without some clues it sounds like it will be hard to reproduce.

It's possible it is a file specific problem, so if you see it happen it might be worth trying to reproduce it in the same file / files, to see if this helps.

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