Sometimes content of arrays in the "Whatches" windows are wrong: all elements are shifted (i.e. A[1] is displayes on the first place, A[2] on the 2nd, ..., A[0] is displayed last).
Steps to reproduce:
1. Create a simple console application with one c++ file:
int main()
{
int A[5];
A[0]=1;
return 0;
}
2. Set breakpoint to the line A[0]=1 and start debugging application.
3. After reaching breakpoint open "Watches" window, A is displayed as {2009315348,4012952,4012888,8,2009312941}:
(http://server.179.ru/~dk/cb1.png)
4. After executing line A[0]=1, A is displayed as
{4012952,4012888,8,2009312941,1}, i.e. all elements of A are shifted to the left:
(http://server.179.ru/~dk/cb2.png)
I am using 20060904 nightly build on windows and older revision on Linux.
https://developer.berlios.de/bugs/?func=detailbug&bug_id=6687&group_id=5358
"Due to an Operating System Upgrade the Services are unavailable..."
Quote from: dkirienko on September 06, 2006, 03:22:26 PM
"Due to an Operating System Upgrade the Services are unavailable..."
Sorry, worked before.
Anyway, this bug exists for some time and is already reported (link I gave you).
Yes, I've found that bugreport. Do you think this is a same bug? Are there any progress in the fixing this bug?
Today I've recomended C::B for my students as a best open-source IDE for C++ development, and immediately they have found this ugly bug...
I haven't worked on it yet.
It's an optimization bug, in that it doesn't display consecutive same values. So if you have an int[5] and all elements are initialized with the same value, you will only see the first value. The rest are skipped because of the tree updating optimization.
I know this is not desirable but I 'll have to change the way the watches tree is constructed for this to be fixed. And so, it's taking some time...
Quote from: mandrav on September 06, 2006, 05:28:42 PM
It's an optimization bug, in that it doesn't display consecutive same values. So if you have an int[5] and all elements are initialized with the same value
No, all elements have different values in my array, and they are all displayed, but in the wrong order!
I tried to explain the root of the problem and gave an example...
This and all related bugs are now fixed.
Thank you, it's really works correct!
Another minor bug (may be, new) with "Watches".
Start debugging that simple program ang goto to the last line. We will get:
(http://server.179.ru/~dk/cb3.png)
Now press F7 to go to the next line. Look at the "Watches window":
(http://server.179.ru/~dk/cb4.png)
We see two artifact strings in the "Watсhes" with old values of A array.
Should I post bug to BerliOS?
I am using svn revision 3025 of C::B and Linux.
please post it, otherwise this report might get lost in here
Bug #9035: https://developer.berlios.de/bugs/?func=detailbug&bug_id=9035&group_id=5358 (https://developer.berlios.de/bugs/?func=detailbug&bug_id=9035&group_id=5358).