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
 ALT+O randomly opening files from the wrong projec
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  09:39:23 AM  Show Profile  Reply with Quote
ALT+O randomly opening files from the wrong project tree!!!

I'll be editing a .cpp file, hit alt+o (I normally use the toolbar, I assume that makes no difference) - and I'll get a header that looks at a glance to be right (and usually it is) - and I"ll start editing that - and recompile to see if I solved that error and can move on to the next one - only to find that the compilation has the exact same error.

Come to find out - the .h file it opened for me is the one from a previous year's project - a former branch:

opens: C:\Users\steve\Vault\Cimex CAD-CAM\16.1\MFC Toolbox\ErrorMessage.h
should: C:\Users\steve\Vault\Cimex CAD-CAM\17.0\MFC Toolbox\ErrorMessage.h

(NOTE: it isn't even always the same wrong project tree - it was opening files from 15.0, 15.1, 16.0 - all of our old project branches seemingly at random)

This is crazy!!!!

I just did a search of all .vcxproj and .sln files for anything that could be the issue (which it logically can't - as these are the same structure we've been using for years successfully) - and my searches come up with NO REFs to anything outside of itself.

I've had the current VA + VS2015 constant F*** up since installing it. Alt+O gives the wrong file, It constantly tries to add temporary project files to my solutions, it "refactor-insert header" inserts headers from the wrong version of visual studio (stdio.h from 2013), etc.

I'm close to throwing in the towel on VA. I've been a customer for - like 15 years. It's one of my "essential tools". But - I can't trust it AT ALL right now.

I reported a similar bug recently where VA refactor insert header would insert standard library headers from VS2013 instead of VS2015 for a VS2015 project.

As far as I can tell - VA has a totally goofed up internal database of files and is smearing / mixing databases from VS2013 with VS2015 with my projects from 3 years ago with projects from today!!!!

This is utterly time-wasting.

Help!

Edited by - Mordachai on Oct 19 2016 09:39:48 AM

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Oct 19 2016 :  10:13:35 AM  Show Profile  Reply with Quote
Hello Mordachai,

I'm sorry you are having these issues.

I was able to reproduce your issue with Visual Assist's 'Add include', and have opened case 100831 so that we can get that fixed.

Thank you for making these reports so that we can keep Visual Assist as reliable as it was 15 years ago.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  12:25:37 PM  Show Profile  Reply with Quote
Do you have one solution that contains both branches of the project?

Is the MFCToolbox a project in your solution or is it found via include directories?

If MFCToolbox is a project, is ErrorMessage.h listed in OFIS? If so, with the correct path?
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  12:31:43 PM  Show Profile  Reply with Quote
I assume that you were starting in ErrorMessage.cpp. Is it in the same directory as ErrorMessage.h?
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  1:12:07 PM  Show Profile  Reply with Quote
Do you have one solution that contains both branches of the project?
no

Is the MFCToolbox a project in your solution or is it found via include directories?
no - we only use project/solutions to define dependency relationships (all relative to others in the solution)

If MFCToolbox is a project, is ErrorMessage.h listed in OFIS? If so, with the correct path?
I don't know what OFIS is?
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  1:12:55 PM  Show Profile  Reply with Quote
quote:
Originally posted by Mordachai

Do you have one solution that contains both branches of the project?
no - branches only refer to things inside themselves. Even our 3rd party libraries are branched so that I have full reproducible builds & source years later.

Is the MFCToolbox a project in your solution or is it found via include directories?
no - we only use project/solutions to define dependency relationships (all relative to others in the solution)

If MFCToolbox is a project, is ErrorMessage.h listed in OFIS? If so, with the correct path?
I don't know what OFIS is?

Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  1:13:12 PM  Show Profile  Reply with Quote
Sorry -- OFIS is the Open File in Solution dialog (alt+shift+o).
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  1:15:43 PM  Show Profile  Reply with Quote
I never use that. I always browse in the solution explorer (all files are part of the solution that belong there) - and I use the toolbar for Alt+O to quickly jump between .cpp and .h files.

Yes, ErrorMessage.cpp was what I was in - and both .cpp and .h files are always in the same folder for a given project file within a solution.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  1:21:26 PM  Show Profile  Reply with Quote
Sean - I'm pretty flummoxed at the moment - not only is VA confusing unrelated project trees - Sourcegear Vault is interacting with VS2015 in such a way as to constantly want to add temporary project files to my solutions anytime one of these rogue / bogus - inappropriate files is retrieved.

Basically - it seems that VS is telling vault "hey, add this file to your project" - but that file has NO RELATIONSHIP to that project - wrong folder, ... just wrong.

And then that makes a mess of Vault - because it can't be adding files that aren't part of the source tree to the current project. So that's just a train-wreck.

And backing out of that automatically added file or project file (ISenseFile - temporary xproj file) - causes great confusion in Vault (and errors in the IDE).

I have cleared Vault's local cache, VA's cache, and completely rebuilt the project tree clean from Vault to annihilate any IDE cache files (.e.g. user files and _sgbak folders and .pdb files).

And no matter what - I keep coming to these interrelated set of bugs.

It's beginning to seem like it is VS2015 with the bugs... probably?

But it could be that these extraneous / inappropriate files are being opened viz. VA and that is the start of the erroneous behavior chain? I'm not at all sure...
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  1:31:58 PM  Show Profile  Reply with Quote
An update to VS2015 introduced a feature called Single File Intellisense. It does cause AddFile and RemoveFile events to be fired to project listeners -- we made some recent changes to ignore events caused by those temporary singleFileIsense projects. You might try disabling it to see if that addresses the Vault problems:
Tools | Options | Text Editor | C/C++ | Advanced | Enable Enhanced Single File -- set to False

That could conceivably cause problems for example if you viewed a file from a different branch.

Getting back to VA and alt+o, is the correct ErrorMessage.h file listed in the VA Open File in Solution dialog?
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  2:07:54 PM  Show Profile  Reply with Quote
I'll try shutting that off.

OFIS - shows only files in the 17.0 branch. I looked through all of them (sorted by path).

And only the one copy of both ErrorMessage.h & .cpp.

Just to be clear - although it randomly opened the wrong file and confused me - when I backed out my changes to 16.1 and then closed that document - then did Alt+O again - I got the right file.

So it's unpredictable (so far). Alt+O almost always works - but sometimes it grabs a file from another file tree.

Similarly - I had another case where I was hitting Alt+O for a .h that did NOT have a corresponding .cpp anymore - but an older branch of our software did. And VA opened that older branch's copy of the corresponding file.

This is like that - but in this case both files existed, were part of the project & solution - so I'm even more confused as to why it jumped over to an outside branch for another copy of it?

And: I don't know if this clarifies or muddies - but I used to be able to get the "do you want to create a source/header" chain of events - and now I never do. (either nothing happens, it opens the correct file, or it opens the wrong file at random).

Edited by - Mordachai on Oct 19 2016 2:09:43 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  3:04:22 PM  Show Profile  Reply with Quote
The random nature is scary -- is it possible that you exec'd alt+o while VA was still 'loading' the solution?

I *think* the only path to a VA prompt for creating a file (when you did not explicitly exec Create File) is if you exec Move Implementation to Source File and VA can't find an appropriate match.

Here's something to also try: exit all instances of VS and import the following registry script -- it will tell VA to be less aggressive in looking for matches when a match isn't found in the loaded solution. The setting isn't created by default, but will address that in a future release.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet14]
"AggressiveFileMatch"=hex:00
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  3:04:30 PM  Show Profile  Reply with Quote
sean - I think I may have misreported part of this problem!

I probably got to the wrong project source file using "Go" not using Alt+O.

After all - I noticed this problem after it had happened - and guessed at it's genesis. But I use "go" button constantly - and chances are good that I was on a symbol - hit "go" and then edited the .h file thinking it had brought up the correct one - only to later realize that no, it was from 16.1

So if you're searching for a different bug than the one I previously reported about picking up the wrong header (that was a system header from 2013 in 2015) but I suspect this may be the same root cause.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  3:13:42 PM  Show Profile  Reply with Quote
yes - as to the create corresponding file - sorry- I was confused about when it would offer and when not. That makes more sense. Sorry for the confusion / red herring.

Alt+O during startup - I was well underway responding to a build error - so already had done a build cycle.

Edited by - Mordachai on Oct 19 2016 3:15:02 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  3:36:29 PM  Show Profile  Reply with Quote
By what means are you executing "Go" -- alt+g, press of the Go button in the VA Nav Bar, context menu, etc?

If you do "Go" on the same symbol now, does it go directly or does it display a menu with multiple choices?
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 19 2016 :  5:35:10 PM  Show Profile  Reply with Quote
I have no idea which symbol I had used to invoke the go. When it happens again, I'll reconstruct it.

I don't know if there were multiple options - I don't think there were - but I'll make a note the next time it happens to figure out all of the variables.

I use the "go" button on upper right toolbar embedded in the edit view - I never use keyboard accels for that.
It's also possible I used the context menu. I do that a lot as well. Again - next time it occurs - I'll make a note of what invoked it.

Edited by - Mordachai on Oct 19 2016 5:36:13 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 19 2016 :  10:44:18 PM  Show Profile  Reply with Quote
I should have posted earlier that I'm glad alt+o is not the source of the trouble... but that maybe would have been easier to diagnose since it works for the most part independently of the symbol db.

The next time it happens, enable VA logging (on the Performance page of the VA Options dialog) and then repeat the Go command so that we can see if anything helpful gets logged.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Oct 20 2016 :  10:25:41 AM  Show Profile  Reply with Quote
ah, yes, excellent. I will.

Of course I have disabled the aggressive search, per your previous instructions.
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