Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA Find References and Peek Definition

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
kornman00 Posted - Apr 06 2020 : 09:40:37 AM
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!
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 17 2020 : 08:49:16 AM
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.
kornman00 Posted - Apr 16 2020 : 4:54:29 PM
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.
feline Posted - Apr 15 2020 : 11:06:09 AM
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.
kornman00 Posted - Apr 11 2020 : 4:40:40 PM
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).
feline Posted - Apr 06 2020 : 1:46:27 PM
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?

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