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
 Auto Recovery fails on power loss
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nooe
New Member

9 Posts

Posted - Nov 21 2008 :  4:28:40 PM  Show Profile  Reply with Quote
I'm surprised that auto recovery failed when my pc lost power. Firefox remembered my tabs:)

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 22 2008 :  04:47:24 AM  Show Profile  Reply with Quote
Which IDE and Visual Assist do you use?
Go to Top of Page

nooe
New Member

9 Posts

Posted - Nov 22 2008 :  07:51:08 AM  Show Profile  Reply with Quote
Hi,

I'm using VS 2003 and VA X 10.4.1649.0.

Thanks!
Go to Top of Page

nooe
New Member

9 Posts

Posted - Nov 22 2008 :  07:53:32 AM  Show Profile  Reply with Quote
One thing not mentioned in the Auto Recovery description is how often it caches files. Is it per keystroke, on a timer, or on an event?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Nov 24 2008 :  12:39:06 PM  Show Profile  Reply with Quote
I believe the file is cached when it is parsed. This should happen when you pause typing for a few moments, giving VA time to catch up.

Do you have:

VA Options -> Performance -> Enable Auto Recovery

turned on?

If you look in the directory:

C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\\vs7\\history\
you may be able to find the file VA cached, and recover your changes manually.

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

nooe
New Member

9 Posts

Posted - Nov 24 2008 :  12:45:36 PM  Show Profile  Reply with Quote
I have Enable Auto Recovery set, but I have no directory:

C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\\vs7\\history

But I do have C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\\Autotext, Dict, and Misc.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Nov 25 2008 :  09:08:18 AM  Show Profile  Reply with Quote
Which OS are you using? Under winXP you should have a directory:

C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\
since VA stores its symbol database under here. The path is different for Vista, and might be different if you have changed some of your environment variables.

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

nooe
New Member

9 Posts

Posted - Nov 25 2008 :  09:17:24 AM  Show Profile  Reply with Quote
I'm using Win XP.
I do have the directory C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\And I do have the subdirectories Autotext, Dict, and Misc.
But, I do not have the subdirectory vs7\\history.
What environment variable(s) does VA use?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Nov 25 2008 :  09:20:35 AM  Show Profile  Reply with Quote
On my winXP test machine I have the following directories:

C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\\vs7
C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\\vs7_1

C:\\Documents and Settings\\ USERNAME \\Application Data\\VisualAssist\\Autotext
C:\\Documents and Settings\\ USERNAME \\Application Data\\VisualAssist\\Dict
C:\\Documents and Settings\\ USERNAME \\Application Data\\VisualAssist\\Misc

How close is this to what you have? Notice there are two groups of directories, in two different locations.

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

nooe
New Member

9 Posts

Posted - Nov 25 2008 :  09:24:22 AM  Show Profile  Reply with Quote
Oops.
I was looking at the wrong directory. I was looking at:
C:\\Documents and Settings\\USERNAME\\Application Data\\VisualAssist
I should have been looking at:
C:\\Documents and Settings\\ USERNAME \\Local Settings\\Application Data\\VisualAssist\\.

I do have the history subdirectory.

Is there a way to have the changes cached more frequently, eg, per File/Save event or some keystroke command?

thanks!!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Nov 26 2008 :  09:49:12 AM  Show Profile  Reply with Quote
Changes should be cached very frequently. Under "normal" conditions VA should parse the file every few lines of code, or more often. If the colouring has been updated, so that new local variables and new functions are coloured correctly then VA has parsed the file, and the file should have been cached.

We try to avoid keeping to many old copies of each file, since old versions of VA have sometimes produced a lot of files in the cache directory, which caused problems.

Using VS2003 and VA 1707 (the beta release) I have just tested this in a virtual machine. I edited a file, adding a comment, but did not save this edit. I then turned off the machine (pulled the power) without closing the IDE or shutting anything down.

After booting the machine, loading VS2003 and my solution I then opened the file I had edited, via VA's Open File in Solution dialog. VA told me that there were unsaved changes, and offered to retrieve them. I said yes and the edit was restored.

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

nooe
New Member

9 Posts

Posted - Dec 01 2008 :  09:48:23 AM  Show Profile  Reply with Quote
Thank you for the information. I did end up finding cached files, but for some reason one of the files was not as up to date as my editing when I lost power.

Does VA only cache/parse active windows? I was switching between files quite frequently.

The Auto Recovery description in the documentation says, "You get a prompt dialog if your IDE restarts and Visual Assist X sees copies in the cache. "

But this did not happen. I was unaware that I would need to use VA's open file dialog to get this prompt. Is this written somewhere? I couldn't find it in the documentation.

Thank you for your attention.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 01 2008 :  10:59:23 AM  Show Profile  Reply with Quote
To be honest I am not quite sure when VA will prompt you about unsaved files. This is a feature I very rarely use, since I try to avoid crashing the IDE

If the file is opened by the IDE when you re-load the solution then you should be prompted when the solution is loaded.

If not then how ever you open the file, I would expect VA to show this dialog. This makes sense, since it is when you open the file that you want to be told about this.

As for changing files, how are you changing between files? I would expect VA to be parsing all edits to your files, so the files in the cache should be up to date.

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

nooe
New Member

9 Posts

Posted - Dec 01 2008 :  11:13:58 AM  Show Profile  Reply with Quote
Well, sometimes VS 2003 does crash. I have no idea what the culprit is. I have never seen the VA restore file prompt.

By switching between files, I meant, eg, using Alt-O for switching between .cpp/.h files.
VA does parse all of my files, but VA does not parse continuously. As was said, it might be a brief moment between the end of a keystroke and when VA starts parsing. If I Alt-O prior to the start of parsing the active window, then does the now nonactive window get parsed?

The scenario was this:

I was editing a .h file. I Alt-O'd to the .cpp file. I was editing when I lost power.
When power was restored and I reopened VS 2003, VA Auto Recovery did not cause a restore dialog to come up. I retyped what was lost.

Later, after I finally found the cached files, I looked to see how up to date the cached .h file was. It was a few minutes behind my last edit.

I realize my lost work was my fault, ultimately. But it would be nice if I could get the VA restore dialog to work. Otherwise, I well just hit CTRL-s more vigilantly.

Thanks again!
Go to Top of Page

nooe
New Member

9 Posts

Posted - Dec 01 2008 :  11:38:09 AM  Show Profile  Reply with Quote
ok, I've been watching the update times for the files I am working on for active and nonactive windows. Both active and non-active windows are getting cached within 3 seconds of edits regardless of switching between files and whether the open file is in the active window.

VA is working correctly regarding caching edits.

I have no idea why I had the problem that I did have. It could have been the McAfee On Access Scan bottlenecking the disk I/O. It could have been something else. I just don't know.

I just don't understand why the restore dialog did not show up.



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 02 2008 :  06:41:43 AM  Show Profile  Reply with Quote
Unfortunately I have no idea what happened here. This should "just work", and it should be reliable. The file caching seems to be working correctly for you now.

The obvious reason for VA not offering to restore the file is that the file caching failed before the power cut, but I do not see why that should have happened.

If you ever encounter a problem like this again it would be very interesting to know what was in the cache directory. This might give us some clues as to what is causing this problem.

I do hope that you do not see this problem again though.

zen is the art of being at one with the two'ness
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