Author |
Topic |
|
jfrancis
Senior Member
39 Posts |
Posted - May 10 2007 : 11:06:00 AM
|
I've got a problem with Goto Implementation that doesn't seem to be connected to the other items in this forum.
For certain symbols in my solution, Goto Implementation just does nothing.
I wonder if it would be possible to have a 'debug' style switch that showed messages as to why the Goto Implementation is failing instead of it just doing nothing.
Maybe there is some hidden trace information that I don't know about that could let me know the cause of this?
John
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - May 10 2007 : 12:40:30 PM
|
Is this a consistent problem? Does alt-g always fail on these symbols?
The first place to look is to place the caret into the problem symbol and check the VA context and definition fields, and also to hover the mouse over the symbol and see what the HCB (bottom section of VA View) shows.
These places show what VA knows about this symbol, and if they are also failing / showing nothing then this explains why alt-g fails. If this is the case we need to work out why VA is so confused by the code.
If they are working and only alt-g has a problem then something else is going on. |
zen is the art of being at one with the two'ness |
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 14 2007 : 09:45:12 AM
|
I've just had it happen again with a C++ global function prototype in a header. Alt-G on the symbol wouldn't take me to the actual implementation, just stayed in the header.
The VAView window is just showing the names of the 5 function prototypes that are in the header.
The context and definition fields are showing the name of the function the cursor is in.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - May 14 2007 : 7:53:14 PM
|
Is the implementation in the matching cpp file? Can you reproduce this problem?
I have just done a quick test here, and alt-g is not having any problems with a global function for me. |
zen is the art of being at one with the two'ness |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - May 14 2007 : 8:02:02 PM
|
Do you have multiple IDE instances running simultaneously? If you reparse (VAssistX | Tools | Reparse ) the source file that contains the implementation, does goto then work from the header?
|
Edited by - sean on May 14 2007 8:33:01 PM |
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 18 2007 : 08:56:44 AM
|
I'm only running one instance of the IDE and I've rebuilt the symbol tables.
The function prototype is an old-style C extern char * func(...); in a utility.h type header. The actual implementation is in a .cpp file that doesn't have the same name as the header file.
The Alt-G goes to the extern prototype line in the utility.h but won't go from there to the implementation in the .cpp file.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - May 18 2007 : 11:00:46 AM
|
I have just tried adding the following to the file "test_general.h"
extern char * funcTestAltGDifferentFiles();
and the following - bad - code to the file "bug_general.cpp"
char * funcTestAltGDifferentFiles()
{
return "hello";
}
and alt-g is moving between the declaration and the implementation perfectly for me. If you look in FSIW is this function listed? If so how many times?
I am wondering if VA knows about the cpp file... Is this cpp file listed in OFIW when it is not open in the IDE? |
zen is the art of being at one with the two'ness |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - May 18 2007 : 12:17:34 PM
|
If you reparse (VAssistX | Tools | Reparse ) the source file that contains the implementation, does goto then work from the header? |
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 21 2007 : 08:30:42 AM
|
Reparsing the .cpp file has fixed the problem! But that's not a long term solution, as I'll have to find the symbol to reparse the .cpp file, which kinda defeats the object of Goto-Implementation.
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - May 21 2007 : 10:04:29 AM
|
Is the cpp file listed in OFIW when it is not open in the IDE? |
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 22 2007 : 10:24:02 AM
|
Yes the file is listed in the OFIW even when it's not open in the IDE. It seems like this is now failing about 50% of the time. Far worse than the old version I've just paid to upgrade from. Find Symbol finds the symbol in the .h file, but I can't get from there to an implementation .cpp file without searching the whole source.
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - May 22 2007 : 11:23:09 AM
|
You previously wrote that you only have one IDE instance running. I want to clarify that response because we do have a bug that is fixed in the next build in regard to multiple IDE instances. If you have one instance running and then occassionally open and close a second instance, this can cause the goto implementation information in the first to be lost. So, when you wrote that this happens when only one IDE instance is running, does this also mean that a second IDE instance did not previously run?
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 22 2007 : 3:34:28 PM
|
I quite often open another instance of the IDE (sometimes have three open), so it could be this. At the time of the problem I only had one instance open, but very probably had opened and closed another instance in the mean time. Could this be the problem?
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - May 22 2007 : 3:44:19 PM
|
Absolutely. This will be fixed in the next build. case=6078
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 23 2007 : 11:44:08 AM
|
Any idea when that will be available and how I can find out when it's available?
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
|
jameso
Ketchup Master
United Kingdom
83 Posts |
Posted - May 24 2007 : 03:10:12 AM
|
Excellent news - thanks :)
James |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - May 31 2007 : 01:04:30 AM
|
case=6078 is fixed in 1557 |
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 31 2007 : 12:26:09 PM
|
The update hasn't fixed my problem.
I've got a symbol referenced in one .cpp file that is declared in a header that's included, and defined elsewhere in another .cpp file in the same project.
VA View isn't showing anything for this symbol, and it does not appear in the Find Symbol dialog.
When I load the file containing the definition of the symbol into the IDE, the symbol appears in VA View when selected, but still not in Find Symbol.
I'm sure this used to work far better in the older versions :-(
Is there anything I can do to help diagnose this?
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 31 2007 : 12:34:17 PM
|
The IDE's Goto Definition works OK.
|
|
|
jfrancis
Senior Member
39 Posts |
Posted - May 31 2007 : 12:36:39 PM
|
Sometimes the VA View is showing me information about the first parameter to the missing function even when I'm hovering over the function name.
It seems that if I 'play around' hovering over different parts of the line enough, VA View sometimes gets to know about the function name symbol, but Goto Implementation only ever takes me to the header, never to the .cpp definition.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - May 31 2007 : 1:11:54 PM
|
Is this symbol a function? It seems it is.
If you use the alt-m list in the cpp or .h file where this function is defined is it listed? My first guess is that something further up the file is confusing VA's parser. Heavy C++ template code can do this, or mismatched curly braces inside #ifdef blocks can also do this.
Is there any chance of getting a copy of these two files for testing purposes? I understand the answer is probably no, but it is worth asking on the off chance. |
zen is the art of being at one with the two'ness |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Jun 01 2007 : 10:44:09 AM
|
Yes it's a C style function.
The Alt-M list in the .cpp file containing the function's definition shows the function.
I've just hit two more (seems like they're virtually all failing now) that at first wouldn't move to the .h, then eventually took me to the declaration in the .h, but wouldn't jump to the .cpp definition. I'm considering rewinding to my pre-upgrade version, as I'm just using the built-in goto-definition now.
I'm afraid I can't send the source, there are more than two files involved as there are many more headers in the system. |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Jun 01 2007 : 10:46:26 AM
|
Now that I've got the correct .cpp loaded into the IDE, it's working OK - I'm getting a popup list of the declaration and definition when using Alt-G in a file referencing the function. So it proves it CAN work with this function, just for some reason not working from startup and reliably.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 01 2007 : 11:38:11 AM
|
It is almost as if VA is not parsing this cpp file...
Can you try:
VA Options -> Performance -> Rebuild symbol databases
please? This soon after installing 1557 you should not have to, but it is worth a try. Can you also turn on:
VA Options -> Performance -> Parse all files when opening a project
and see if this makes any difference? |
zen is the art of being at one with the two'ness |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Jun 06 2007 : 07:44:04 AM
|
Doing those things seems to have helped. I'll keep an eye on it and report back if it happens again.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 06 2007 : 09:11:12 AM
|
I am a little concerned you had to do this, but hopefully it was a one off problem. |
zen is the art of being at one with the two'ness |
|
|
jfrancis
Senior Member
39 Posts |
Posted - Jun 06 2007 : 09:38:35 AM
|
Yes, so am I - I was hoping not to have to parse all files every time I opened a project.
|
|
|
|
Topic |
|