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
 No autocomplete on array elements
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Zeblote
Tomato Guru

183 Posts

Posted - Sep 24 2018 :  3:37:21 PM  Show Profile  Reply with Quote
Just tried the new build 2291 but it does not fix this problem
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 24 2018 :  3:52:16 PM  Show Profile  Reply with Quote
No, opening a different project should not have any effect on this.

Just to double check, after you have restarted the IDE, and autocomplete on array items is broken, if you now do the Alt-g on TMap are you still seeing both entries?
Can you check and make sure the va_stdafx.h file is still in the same directory as your .SLN file?

What do you have:

VA Options -> Enhanced Listboxes -> Source of C/C++ content: Visual Assist OR Default Intellisense

set to? This should not matter, since intellisense has been disabled, but I don't understand what is going wrong here.

What, if anything happens if you press Ctrl-Space to try and force a listbox to appear on the second IDE restart when this has stopped working again?

Are you running the same test, in the same code file on both loads of the IDE? I am wondering if somehow this works correctly in some files, some code, but not in other files and code. This would at least sort of explain the pattern.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 24 2018 :  4:16:00 PM  Show Profile  Reply with Quote
Yeah, still seeing both entries, the file is still there.
It's set to visual assist.
Pressing ctrl-space makes a ding sound.
Trying the same test both times.

Maybe VA is somehow not saving the database correctly so it only works when it was newly created by parsing?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 25 2018 :  08:29:33 AM  Show Profile  Reply with Quote
The va_stdafx.h file is a stable and reliable method for me, and quite a few of our users, so I don't know why this isn't working reliably for you. It is almost as if you are loading the "same" solution from different directories, so that VA does not always see the va_stdafx.h file. That could explain this...

Let's try a different approach. Firstly, this requires that you are using VA 2291, it won't work in earlier builds.

Please close all instances of the IDE, and now find your VA install directory. If you have VA installed for more than one IDE you will probably have to find and update more than one install directory. This page explains how to find the install directory for your version of the IDE:

https://docs.wholetomato.com/default.asp?W105

Inside the VA install directory please look for and open the file:

Misc\StdafxUnreal.h

and at the END of the file, copy and paste in all of my fixes for Unreal, making sure you leave a blank line at the end of the file. Since this file is global, it will be applied to all Unreal projects you open, please do NOT copy across your extra lines:

#define BRICKADIA_API
#define BRICKADIAEDITOR_API
#define BRICKADIAOPENSSL_API

you can leave these in your solution specific va_stdafx.h file.

Once you have saved these changes load the IDE, no need to load a solution, and trigger a symbol database rebuild:

VA Options -> Performance -> Rebuild symbol databases

And now load your normal Unreal solution.

Because we are no longer relying on the solution specific file, or even the solution directory, if the solution is somehow being loaded from a different .SLN file, in a different directory, this should still work. This does rely on VA detecting that you are loading an Unreal Engine solution though. If VA does not realise that you are loading an unreal solution then these helper fixes won't be used.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  10:49:22 AM  Show Profile  Reply with Quote
This is really weird. I'm seeing the exact same thing happen after doing that - autocomplete works after initial parsing, and stops working forever if I restart VS.
Go to Top of Page

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  10:53:31 AM  Show Profile  Reply with Quote
The plot thickens... autocomplete on arrays works *without* your hint file after the initial parse. Restarting VS breaks it.
Go to Top of Page

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  11:00:08 AM  Show Profile  Reply with Quote
Maybe you have some sort of debug mode for VA that can show what exactly is happening with my VA since you can't reproduce the issue?
Go to Top of Page

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  11:02:48 AM  Show Profile  Reply with Quote
For now, I'm just using hardcore mode - reparsing all files fixes the problem and takes like 2 minutes, so I'm doing that every day when I open the project.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 25 2018 :  11:11:51 AM  Show Profile  Reply with Quote
This feels like the wrong solution, but if it really is this fast, then it is probably a good solution for now.

The more general problem is that the va_stdafx.h file contains fixes for several other things inside Unreal Engine that are confusing VA, so I don't know if you will want or need these fixes or not.

A random question, have you ever added "va_stdafx.h" to your solution? If you make sure this file is NOT open in the IDE, and then show VA's Open File dialog (Alt-Shift-O) is the file listed when you filter on "va_stdafx"?

I will try and pin down a few simple test cases that rely on other fixes in this file, this will hopefully help to start us narrowing down what is going on here.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  11:21:09 AM  Show Profile  Reply with Quote
The hint file isn't added to the solution, open file dialog can't find it.
I'm starting to think the problem is actually not related to the hint file at all, for two reasons:

1) The hints you added for TMap work well after the initial parse and after restarting VS, so this is not affected by the issue.
2) Autocomplete on TArray elements works after the initial parse and stops working after restarting VS, regardless of whether the hint file is in place or not.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 25 2018 :  11:39:57 AM  Show Profile  Reply with Quote
So... the hint file is actually working, and staying working, since it keeps on fixing TMap. What is breaking is TArray array access, but not because the hint file has been lost...

OK, new test Find an instance of TArray, or just enter the class name, and then place the caret into TArray, press Alt-Shift-G and select "Goto Member..." from the bottom of the menu. This should show you a dialog listing all of the known members of TArray. Please filter this dialog with "operator". How many operator[] functions are listed?

There should be two instances, one with FORCEINLINE at the start of the signature, and one without this at the start of the signature. If you are seeing this then the hint file is still being picked up, and is working mostly as expected. The key question is, are you seeing this when array access stops working? I am sort of hoping the answer is yes, so that the hints are still doing what I expect, and we can try to focus on the array problem only.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  11:52:18 AM  Show Profile  Reply with Quote
After reparsing:



- The first one goes to va_stdafx.h
- The second and third are the ones from Array.h, seems like the FORCEINLINE is removed in this window


After restarting, first attempt:



- I'm not sure if I broke this by starting to type operator before it loaded or what happened here


After restarting, second attempt:



- Everything is still there
Go to Top of Page

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  11:55:08 AM  Show Profile  Reply with Quote
I found a much more efficient "fix" for the problem :D

Opening Array.h and using va>tools>reparse current file also makes the autocomplete work again.
Go to Top of Page

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  1:29:22 PM  Show Profile  Reply with Quote
Just confirmed that another dev working on the project has the exact same problem on a different pc, and the same fix also works there, so it's not an issue specific to my install of vs/va
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 25 2018 :  2:08:04 PM  Show Profile  Reply with Quote
Array.h should have already been parsed, the members being listed for TArray seem to prove that this has happened. So, this suggests that something else that VA parses later on is causing the problem.

First up, which version of Unreal Engine are you using? You are listing a different set of TArray operator functions than I am seeing on either of my two Unreal test systems.

Can you please open VA's Find Symbol dialog and use the filter "tarray operator". How many matches are you seeing? I have 12 matches on one system and 14 on the other system.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 25 2018 :  2:19:09 PM  Show Profile  Reply with Quote
Searching for TArray operator gives me these results:



I'm still using a custom build with minor changes off 4.20.3. None of these were to core files such as Array.h, so you could easily replicate the setup by just using 4.20.3-release branch on github
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 28 2018 :  11:51:43 AM  Show Profile  Reply with Quote
I have just finished setting up a local GitHub copy of the Unreal Engine, and tested this. TArray handling is still working perfectly for me here.

Can you please try making a new, default, minimal game project and see if you can reproduce the problem there? I am starting to wonder if the trigger is somehow inside your game project rather than the engine project. Hopefully this will tell us one way or the other.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 28 2018 :  12:12:20 PM  Show Profile  Reply with Quote
Hmm. I created a new project using my engine build, from the 3rd person template. I'm seeing the exact same result there:

- after initial parse, it works
- after restarting vs, it doesn't work
- after reparsing array.h, it works again
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Sep 28 2018 :  12:17:13 PM  Show Profile  Reply with Quote
Would you be able to zip up this new project and send it to me, so I can try testing it here? Please also include your IDE and VA settings if possible:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

Something has to be driving these different results, I am just not sure where to look at this point in time.

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

Zeblote
Tomato Guru

183 Posts

Posted - Sep 28 2018 :  12:44:38 PM  Show Profile  Reply with Quote
I've uploaded all of that to your support form, it gave me case 119684

To test, I just wrote this in some function, it doesn't make any difference where:

TArray<FString> Blah;
Blah[0].
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Oct 02 2018 :  10:11:00 AM  Show Profile  Reply with Quote
I have the game solution, thank you for this.

So far though, still no sign of the problem. So I am going to try and describe clearly all of the steps I have taken in setting up this test, to see if I have done anything wrong or missed a step.

Using GitHub desktop, I grabbed a full copy of:

https://github.com/EpicGames/UnrealEngine.git

which has been placed into the directory tree:

C:\src_github\UnrealEngine
Then following the Windows instructions in the file:

C:\src_github\UnrealEngine\README.md

I did a full build in VS2017. This allows me to launch the Unreal Editor from this source tree build. I then extracted and opened your project. One interesting point, I was told that the versions of Unreal Engine were different, so I told the editor to do an in place convert, since I still have the zip file on hand.

From the Unreal editor view of the project I opened Visual Studio, which loaded the project in VS2017.

Opening the code file:

C:\src_github\Projects\MyProject\Source\MyProject\MyProjectCharacter.cpp

I placed your two test lines into "AMyProjectCharacter::AMyProjectCharacter()", so the first function in the file. Deleting and retyping the dot produces a listbox every time for me.

Checking this, I noticed that the Find Symbol dialog lists two entries for the class TArray, one from the normal install of Unreal, and one from the git clone copy of Unreal. I also noticed that there is no "va_stdafx.h" file in the base directory of your test solution.

So I copied across version 2.2 of my va_stdafx.h file into the base director of your game project, and did a full VA symbol database rebuild.

After the rebuild finished typing the dot still produces the listbox, every time, as expected.

Next I imported both your VA and IDE settings. No difference, the test still works.

So in case it matters, I did another VA symbol database rebuild. The test still works, the listbox is appearing when I type the dot every time.

I am seeing the same list of entries, in the same colours, as your screen shot for VA's Find Symbol dialog, filtered on "tarray operator".

Pressing Alt-g with the caret in "TArray" on this test line offers me two different file locations. The first is the "va_stdafx.h" file in the root directory of the solution. The second location is the file:

C:\src_github\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h

All of which leaves me with very few clues.

But there are a couple of things I noticed.

After importing your settings, when I show the VA options dialog, "nothing" happens. That was confusing, but I realised the VA options dialog was appearing off screen. I am currently testing on a single screen system here. Are you working with multiple monitors? A 4k screen?

The other interesting difference is the total number of symbols being searched by VA's Find Symbol dialog. Your screen shot above shows a total number of symbols of 1,216,076.

In contrast I am showing a total number of symbols of 1,114,631

which is a significant difference in the number of symbols.

As a sanity check, the total number of files VA is listing on my system is 38,706

When I place the caret into TArray, and then use the Alt-Shift-G menu to bring up the "Goto member..." dialog, VA is listing a total of 168 members for this class, including symbols from base classes.

Excluding symbols from base classes (tickbox at the bottom of the dialog) makes no difference, I still have 168 symbols.

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

Zeblote
Tomato Guru

183 Posts

Posted - Oct 02 2018 :  10:59:55 AM  Show Profile  Reply with Quote
> One interesting point, I was told that the versions of Unreal Engine were different

Custom builds of the engine are identified with a GUID, so this makes sense.


> Checking this, I noticed that the Find Symbol dialog lists two entries for the class TArray

Sounds like this issue: https://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=15257


> Are you working with multiple monitors? A 4k screen?

Using a 1440p ultrawide. It's kinda nice for unreal, lets you have two of their ridiculously wide files open at the same time :D


Did you try to restart VS without rebuilding symbols though? Since rebuilding symbols fixes the problem, it's expected that you don't see the problem immediately after.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Oct 02 2018 :  3:32:51 PM  Show Profile  Reply with Quote
Yes, the duplicate entries do look like that thread and case. I had completely forgotten about that. Until now most of my Unreal tests have focused on the installed version, so less risk of running into this effect by accident.

I had forgotten about reloading the solution being a factor. I keep jumping between different bug reports, so rely on re-reading recent bits of the thread to get myself back up to speed, but when it gets this long and complex, it is easy to overlook important details.

In case how and where from you reload the IDE matters, I tried this a couple of different ways. First I loaded the Unreal Editor I compiled from source code directly (ran a shortcut to the exe file), bypassing the overhead of using the IDE to launch the Unreal Editor. Then I opened up your first person test project, and loaded the IDE from the Unreal Editor.

Once the IDE had finished loading I went straight to the . after the array test, and ran the test again, 4 times. I always got the expected listbox.

Then I closed the IDE, leaving the Unreal Editor open. Then after the IDE process had time to quit, I launched the IDE again from the Unreal editor. Again I went straight to the dot on array test, and again everything worked correctly.

I did this once more, to make sure. There was basically no VA parsing on any of these IDE loads.

Then I closed both the IDE and the Unreal Editor, and then just loaded VS2017 directly. From the recently opened list I opened the unreal game solution, and again went straight to the dot array test, and again the test worked. Still no VA parsing happening.

I closed the IDE, waited for it to exit, and opened the IDE and solution again, and still no sign of the problem.

I have double checked, and the "array.h" file that defines TArray is NOT open in the IDE, so it's not being parsed on starting up, as an open file.

So I am now wondering if you are loading the IDE in a different manor, or doing something after the IDE loads, before doing the dot on array test, that could be a factor.

Something has to be driving this odd behaviour, but so far I still cannot find that trigger.

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

Zeblote
Tomato Guru

183 Posts

Posted - Oct 02 2018 :  6:21:27 PM  Show Profile  Reply with Quote
I just tried to open this solution again, and it was broken. This is really strange that you can't reproduce it at all, maybe I should try to reinstall VS and VA at this point?

Are there any special steps required to make va settings, snippets, etc survive a reinstall?

Edited by - Zeblote on Oct 02 2018 11:14:15 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Oct 03 2018 :  06:47:43 AM  Show Profile  Reply with Quote
Before we try that, let's try a half way house. Close all instances of the IDE, and then use the Run dialog to run the command:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

you may have to adjust the path to the IDE, if you have a different version or install location. This will create a new, default IDE profile. When the profile is first loaded it will ask you which theme to base your settings on. You will only have the default extensions installed.

You can now install VA from the online store.

Can you first try loading your solution without importing any of your IDE and VA settings, and see if you can reproduce the problem?

To return to your default IDE profile, just load the IDE normally, without passing any command line parameters. To return to this test profile, just past the "/RootSuffix VATest" command line parameters again.

If you don't see the problem at first, you can import your IDE settings into the test profile, and see if this makes a difference.

It is possible that you have another extension installed that is a factor. This test will help to test options like this.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Dec 03 2018 :  6:56:12 PM  Show Profile  Reply with Quote
case=117081 is fixed in build 2301
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000