Author |
Topic |
|
tomob
Junior Member
Poland
10 Posts |
Posted - Nov 25 2024 : 3:43:11 PM
|
Hi,
I found that Visual Assist has problems with autocompleting fields of a struct if it contains bit fields. In my case it autocompletes only the fields that are set as bitfields and misses every other field in a struct.
Here's an example:
struct FJournalSection
{
uint32 Magic;
uint32 Version : 30;
uint32 Priority : 2;
uint32 Hash;
uint32 Offset;
uint32 Size;
};
FJournalSection FirstSection = ReadSection();
int32 SectionSize = FirstSection.Size;
At the time when I type in "FirstSection." I would expect VAX to show me all the fields from the FJournalSection, but instead it shows only Version and Priority. If I set Hash to be a bit field as well then it shows the three bit fields: Version, Priority and Hash.
However it doesn't have problems navigating to fields that are not bit-fields. For what it's worth this is an Unreal Engine project solution.
My version is 10.9.2537.0 built 2024.10.27
Regards, Tomek
|
|
feline
Whole Tomato Software
United Kingdom
19063 Posts |
Posted - Nov 26 2024 : 10:01:40 AM
|
Testing this here, in just a normal solution, not an Unreal Engine project, no sign of the problem. All 6 members are being listed for me. This is testing with IDE Intellisense disabled via:
IDE tools menu -> Options -> Text Editor -> C/C++ -> Advanced -> Disable Database = True
so I know the listbox is coming from VA.
On the line where you are seeing the problem, if you place the keyboard caret into "FirstSection" what, if anything, is shown in VA's context and definition field? I am wondering if VA is correctly identifying the type of this variable. If it isn't that might explain the problem.
Assuming VA is showing something that looks correct, what do you get if you use Alt-Shift-G for Goto Related on "FirstSection", and then show the "Goto Member..." dialog? Are all of the members shown here?
And I am getting the same results, all 6 members listed, in an Unreal Engine solution as well. So I suspect the trigger is something else, but I am not sure what. |
zen is the art of being at one with the two'ness |
|
|
tomob
Junior Member
Poland
10 Posts |
Posted - Dec 10 2024 : 06:26:38 AM
|
Hey,
After your suggestions the issue went away and it took me a long time to reproduce it, but it started happening again. I noticed that this happens when I switch multiple times between platform configurations debugging on different dev kits. Sometimes it goes away when switching back to a Win64 (an Unreal target) configuration, but not always. It happens with both Intellisense disabled/enabled and VA being the main source of C/C++ content. What's interesting is that if I disable VA and leave Intellisense enabled the issue goes away. |
|
|
feline
Whole Tomato Software
United Kingdom
19063 Posts |
Posted - Dec 10 2024 : 11:24:27 AM
|
Are you restarting Visual Studio when you make these changes?
Normally VA would not care which platform configuration you were targeting, so I am not sure what is going on here. Off the top of my head, only 2 things should change that effect code parsing when changing the platform configuration.
Firstly your library directories are going to change, but VA should be parsing all "full" set of library directories already. We look for and pick up all the include directories listed.
Secondly different branches in #ifdef blocks will become active. But VA is designed to parse all branches, and be active in all of this code, so we can help you even if the code isn't currently "live" given how your are compiling it.
Am I missing something else that is going to be changing here? The fact that this is the pattern does suggest there is a connection here, I am just not sure why. |
zen is the art of being at one with the two'ness |
|
|
mayer22
Starting Member
USA
1 Posts |
Posted - Dec 23 2024 : 03:33:19 AM
|
Are there any known limitations or bugs in Visual Assist version 10.9.2537.0 regarding the handling of struct fields, especially when bit fields are involved? |
|
|
feline
Whole Tomato Software
United Kingdom
19063 Posts |
Posted - Dec 23 2024 : 08:05:24 AM
|
Nothing that I am aware off of the top of my head. It is possible that what ever problems you are seeing are caused by something odd further up the file. Strange macros can sometimes cause odd problems, in case that offers any clues for where to start looking. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|