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
 VA 2393: fatal rename references bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2084 Posts

Posted - Dec 09 2020 :  07:38:36 AM  Show Profile  Reply with Quote
C#: When I change the name of a struct, and then use the VA "Rename references" menu that (sometimes) appears, there is a underlying fatal bug: when the new name contains the name of another type, the rename may change all references of the contained name instead of the changed one.
Example: two types "struct Niceone" and "class Naughty", now I type Naughty in front of the Niceone, the rename references will change all Naughty references into "NaughtyNiceone" instead of the Niceone references.








feline
Whole Tomato Software

United Kingdom
17095 Posts

Posted - Dec 11 2020 :  1:17:16 PM  Show Profile  Reply with Quote
Ignoring the "why won't this in place refactoring trigger" problem, how often do you run into this?

I have managed to reproduce it once, but so far only once. Definitely a nasty problem, and I don't like the idea of it happening on rename without a preview. Still, I just wish I could reproduce this more reliably. I have put in a bug report for my test case:

case=144196

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

Uniwares
Tomato Guru

Portugal
2084 Posts

Posted - Dec 11 2020 :  1:58:44 PM  Show Profile  Reply with Quote
seems to be constant. Whenever you have added a name in front that exists as a type, it will change the wrong one.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17095 Posts

Posted - Dec 14 2020 :  11:18:37 AM  Show Profile  Reply with Quote
I have tried several different things here, but I still cannot get this to happen. I have seen this bug once, but none of my follow up tests have reproduced it.

I have added a note to the case to explain how often you are seeing this.

I hope that triggering Rename via the rename dialog is at least reliable and safe.

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

Uniwares
Tomato Guru

Portugal
2084 Posts

Posted - Dec 14 2020 :  11:58:52 AM  Show Profile  Reply with Quote
Not really using the rename dialog, but by quick testing it seems to work.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2084 Posts

Posted - Dec 16 2020 :  09:16:57 AM  Show Profile  Reply with Quote
Just had another instance of the same problem:
namespace XX.yyy


Have a namespace called XX somewhere and now remove the dot, hit enter on VAs "Rename references" or "Rename references with preview..."
All instances of XX will be renamed to XXyyy

Its actually a even trickier situation, since we are messing with two namespaces, XX and yyy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000