Editor bug - Code gets wiped

Bug reports.
johnsmith
Posts: 18
Joined: Sun Mar 18, 2012 2:13 am

Editor bug - Code gets wiped

Post by johnsmith » Wed Mar 21, 2012 12:57 am

Hello,
Sometimes (maybe once per day) one of my usercode files gets overwrited with blank editor-generated code. Suddenly everything disappears apart from the methods that are declared within the recording editor.
This usually happens when I build/play my project. If I try to add new code to the same file after the wipe, it gets wiped again after building. Only some single file is affected. The only option that helps me to get rid of this bug is to restart Ranorex.
I cannot seem to always reproduce this bug, but it's really evil. I even lost over 10 hours of work once and had to rewrite all the automation code from scratch.
From now on I'm backing up my files more often.

If I'll have more detail on reproducing the bug, I'll let you know.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Editor bug - Code gets wiped

Post by Support Team » Wed Mar 21, 2012 9:02 am

Hi,

are you directly write your code in your recording files (e.g. Recording1.cs)?
If so, that's no good idea, as this code will be overwritten through automatically code generation.
If you are going to write you own code, please either add user code items to your recording as described in following chapter of our user guide:
User Code Actions
or add a code module holding your user code as described in following chapter of our user guide:
Code Modules

Regards,
Tobias
Ranorex Team

johnsmith
Posts: 18
Joined: Sun Mar 18, 2012 2:13 am

Re: Editor bug - Code gets wiped

Post by johnsmith » Wed Mar 21, 2012 9:27 am

No, actually I never add code to the recording files. I'm writing all of my code into the .usercode files. And sometimes all of the data might get wiped in the .usercode.cs files.

I think this is a editor-related bug. I had this happen to me twice in the last few days...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Editor bug - Code gets wiped

Post by Support Team » Wed Mar 21, 2012 9:34 am

johnsmith wrote: If I'll have more detail on reproducing the bug, I'll let you know.
OK, then please keep us informed on how to reproduce this issue.
Thanks in advance!

Regards,
Tobias
Ranorex Team