02-16-2010 11:47 AM
Luckily this isn't a burning problem for me - I just found out and being curiosity driven, I wanted to share my experience (or report a bug, whatever).
Anyway, I appreciate your interest, thanks.
Wolfgang
02-16-2010 02:07 PM
Wolfgang,
Your speculation that the size of the preceding function is affecting how the QuitCallback region is identified is correct. When CVI dtects a brace-delimited block it tries to determine its context of this block in the program, in order to classify the block properly. For this, it needs to parse the preceding code, looking for other braces that will define the context appropriately. For performance reasons it only parses the preceding code up to a certain number of lines (not quite sure what that number is, but it's almost certainly less than 3000). If it can't find the opening brace of the preceding block within that number of lines, it gives up on establishing a context and instead treats the block as a generic block. To the best of my knowledge, this only has an impact on where the twistie appears -- if it's a generic block it appears in the line with the opening brace, instead of the preceding statement or function definition line, but I could be wrong about this. Let me know if you see other effects.
Luis
02-16-2010 03:07 PM
Compliments to my nose 🙂
OK, Luis, yes, I do see other side effects, as mentioned in the earlier posts of this subject.
Most irritating to me is the fact that if you scroll through the text (after the long function), the marker positions do not get updated, they simply remain in their position, hence mostly indicating the wrong position (see the screen shots above, with no markers or markers at obviously wrong positions). Only if you refresh the screen, e.g. by ALT-tabbing to a different program and back again, the correct positions are indicated.
It seems that this is due to performance reasons, too. But I consider it very annoying because it makes the markers unreliable.
I am adding yet another example showing the variations: missing marker, wrong marker, accidentally correct marker...
Wolfgang
02-17-2010 01:00 AM
Hi Luis,
1) The free MS Visual C Express Editor handles the case correctly 🙂
2) CVI handles it correctly, but only provided one is willing to force a screen refresh; so maybe the 'misbehaviour' is motivated by performance reasons, but the result is not, it simply misses a refresh.
3) It would be nice to have it fixed
Wolfgang
02-17-2010 09:56 AM
Hi Wolfgang,
Yes, I'm sorry I hadn't noticed that you had also complained about the scrolling behavior. This is a known issue (#208315) in CVI 2009 -- when scrolling through the file using your arrow keys, the region column does not redraw. To get it to redraw, you have to actually move the caret through each individual line, after scrolling. This is actually a bug, and it's not related to the large-function performance issue that I was alluding to earlier.
For what it's worth, if you show line numbers in the file (View>>Line Numbers), the scrolling problem doesn't happen.
Luis
02-17-2010 10:16 AM
Hi Luis,
thanks for the update, and thanks it's a bug and not my stupidity 🙂
But this issue makes me reiterate a wish I have expressed earlier: It would be most useful to all of us if the list of known bugs would be public.
We could have saved some time and effort in this and related cases. If users encounter some strange behavior they could check this list first...
Wolfgang
02-17-2010 10:35 AM
Agreed.
We're working on this now, and we should have a list out fairly soon. Sorry it's taken so long...
Luis
09-06-2015 08:18 AM
bookkeeping: fixed in CVI 2009 SP1