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
 Very bad bug in refactor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Jan 28 2014 :  3:02:57 PM  Show Profile  Reply with Quote
I wrote up a long description of this yesterday and your forums deleted it all - so I'm going to be very terse today and hope you make the effort to reproduce it anyway - since it's trivially easy to make go wrong.

class foo { bool memberfun1(); bool memberfun2(); bool memberfun3(); }
bool foo::memberfun1() { blah blah... something interesting... return true; }
bool foo::memberfun2() { return memberfun1() && nachos(); }
bool foo::memberfun3() { return memberfun1() ? nachos() + beer() : wine(); }

If I use refactor to transform memberfun1 to become:
bool memberfun1(int defaulted_arg = VALUE);

Then memberfun 2 and 3 are trashed as follows:
bool foo::memberfun2() { return memberfun1(); }
bool foo::memberfun3() { return memberfun1() : ; }

Very bad bug - easy to miss as memberfun2 still compiles --- only by careful inspection of the code (or later bug reports from testing) will you ever know that it did something truly awful). :(

Mordachai
Tomato Guru

USA
224 Posts

Posted - Jan 29 2014 :  12:17:15 PM  Show Profile  Reply with Quote
Holy bed-bugs, Bat-man!

This problem affects - AFAICT - ALL/MOST function signature refactoring!!!

Anytime a refactored function / member is updated at the call-site, VA deletes everything after that updated call!!!!

so:

if (foo() && bar())

becomes

if (foo())

assuming the change-signature was applied to foo().

THIS IS A CRITICAL - VERY VERY NASTY BUG ---- !@@!!@ !@#!@#

Is there anyone responding on the forums today?!!!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 30 2014 :  1:40:24 PM  Show Profile  Reply with Quote
Thank you for reporting this bug and sorry for the inconvenience. I have put in a bug report for this:

case=79955

I have used the highest priority possible.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Jan 30 2014 :  3:45:06 PM  Show Profile  Reply with Quote
Were you able to duplicate the issue?

A part of me wonders if this was a consequence of the out-of-order syntax highlighting issue (like the edits to the code were being interfered with by VS2013).

I haven't had a chance to directly test this yet.

UPDATE:


This is definitely a bug - not related to my previous issue with load order of VA/Update1.

Tons of stuff becomes wrecked if I try to use change-signature right now

Edited by - Mordachai on Jan 31 2014 2:04:32 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 31 2014 :  3:05:07 PM  Show Profile  Reply with Quote
Yes, I was able to reproduce the problem both with your example from the first and from the second post. A developer is already working on this.

Sorry for the inconvenience, again. I'm glad you reported this, and am looking forward to your experience with the fix, once it becomes available. We will update this thread, so if you click on the "Subscribe to this topic" link, you should get an email notification about the release of this bug fix.
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Feb 06 2014 :  11:59:20 AM  Show Profile  Reply with Quote
Thanks. Subscribed.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Feb 26 2014 :  10:42:07 AM  Show Profile  Reply with Quote
case=79955 is fixed in build 2029
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000