Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Tool has problems with VirtualStore — Parallax Forums

Propeller Tool has problems with VirtualStore

RossHRossH Posts: 5,463
edited 2012-10-29 05:08 in Propeller 1
I've struck this problem yet again, so I am again posting to let others know that the Propeller tool does not "play nice" with Micro$oft's VirtualStore functionality.

For those who don't know about VirtualStore, it is a mind-bogglingly stupid "feature" introduced by Micro$oft in Vista, but it also seems to infect Windows 7, and will no doubt infect Windows 8 as well. It is apparently intended to support programs that need to write to files in certain "protected" folders (such as the "Program Files" folders).

If you try to write to a file protected by VirtualStore, then instead of modifying the real file, VirtualStore will sometimes (and only sometimes) create a second copy of the file instead. Unfortunately, this means that two different programs can end up seeing two different versions of the same file.

The problem typically occurs when you use two different programs to access the same file, and especially if one of them is a "legacy" program such as the Propeller Tool. In my case I tend to edit my Spin programs in a modern text editor - but then I may use the legacy Parallax Propeller tool to compile them. If you do this you can end up with two different files - e.g. you edit one version of the file, but end up compilng the other. Confusing? You bet!

In the most recent instance of this problem, every other program I have would find the version of the file in the Program Files folder - but the Propeller Tool would only find an older (and incorrect) version of the file stored in the VirtualStore folder. The end result was that the program would run correctly when compiled under Homespun, but not when compiled with the Propeller Tool - and until I realized what was going on, nothing I did seemed able to fix it.

This kind of thing seems to happen at random, but once it has occurred it can be very difficult to track down. The only real solution I have found is to disable VirtualStore.

There are many reports of this kind of problem on the web - but here is one that is short and clear, and may help you resolve the problem if it hits you. I would recommend at least perioidically looking in the VirtualStore folder and seeing what files VirtualStore has squirrelled away in there. You will find that even Windows itself sometimes puts files in there.

Ross.

Comments

  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2012-10-28 00:22
    Why not use Propellent or my spin.exe port of the spin compiler? Both are command line tools that you could use with your "modern editor".

    Also, don't store your spin files in the program files folder. Instead put them someplace like your user folder or documents folder or something.
  • RossHRossH Posts: 5,463
    edited 2012-10-28 01:16
    Roy Eltham wrote: »
    Why not use Propellent or my spin.exe port of the spin compiler? Both are command line tools that you could use with your "modern editor".

    Also, don't store your spin files in the program files folder. Instead put them someplace like your user folder or documents folder or something.

    Hi Roy,

    I don't tend to use the Propeller Tool very often except when I am working with Spin programs - I was just warning those who do. The Propeller Tool stores Spin files in the Program Files folder - for example, it installs the libraries and examples there. The same problem may not exist with other programs that don't do that, but it certainly does for the Propeller Tool.

    Ross.

    P.S. By "modern" editor, I really just meant any non-legacy editor. For instance, Notepad always seems to edit the real file, whereas the Propeller Tool always seems to edit the VirtualStore file.
  • RaymanRayman Posts: 14,670
    edited 2012-10-28 14:41
    I think the ideal thing is to not edit anything in the Program Files folder...
    Usually, I'll copy the whole Prop Tool folder with all the drivers somewhere else so this kind of trouble doesn't happen...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-10-28 14:53
    Rayman wrote: »
    I think the ideal thing is to not edit anything in the Program Files folder...
    Usually, I'll copy the whole Prop Tool folder with all the drivers somewhere else so this kind of trouble doesn't happen...

    Does the Prop Tool find the library okay? What if you want to add a file to the library will the Prop Tool find the non-program files version?

    I frequently have stuff end up in the virtual store which is a big pain. I have a shortcut on my desktop to "C:\Users\Duane\AppData\Local\VirtualStore\Program Files (x86)\Parallax Inc\Propeller Tool v1.2.7 (R2)" so I can find my recently saved files.

    I'm off you read the link RossH gave in post #1. Thanks.
  • JavalinJavalin Posts: 892
    edited 2012-10-29 01:39
    >Also, don't store your spin files in the program files folder. Instead put them someplace like your user folder or documents folder or something.
    works perfectly in Win7 if you do the above. :-) Virtual store is only about accessing programs from the program files, or windows directory.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-29 02:21
    So Microsoft is trying to impose a method where items that are not part of the original software are kept out of the /Windows and /programs sub-directories.

    And you can avoid the whole mess by keeping your programs in your /user location.

    Linux has had a system that it a lot simpler to enforce this with Unix rights. Creating a virtual duplicate is just going to confound users that never catch on to the fact that there is a virtual duplicate, or a way to avoid creating one.
  • JavalinJavalin Posts: 892
    edited 2012-10-29 02:31
    actually it kinda works and most "users" would never be aware of it. Its been implemented within the Terminal server range of products for a long time.

    It solves the problem where an application stores configuration files (i.e. userconfig.ini) and registry settings in its Program files and HKLM hive locations respectively, and doesn't account for multiple users of the app by storing settings in the users profile and the HKCU hive, as it should do.

    Essentially, Microsoft is trying to protect you from badly written applications. I am not suggesting that the propeller tool is a bad application BTW.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-10-29 02:39
    Javalin wrote: »
    >Also, don't store your spin files in the program files folder. Instead put them someplace like your user folder or documents folder or something.

    But what about files you want to add to the library folder? I don't see an option of changing where the Prop Tool looks for the library folder. So any object you want accessible from multiple projects (such as F32) will need to be the in the program files' "library" folder. The Prop Tool will only find child objects from within the same folder as the parent object or the library folder.

    I frequently save a different version of one of my library objects and these often end up in the VirtualStore.
  • JavalinJavalin Posts: 892
    edited 2012-10-29 02:48
    Yeah. I have often wished that Parallax would add a second library folder which is checked on compliation time - this to store "my library code" for example, that wasn't in the program files folder, that didn't get forgotton when you upgrade your PC and wasn't at risk of being overwritten when you update the application.

    So the process would look like:
    -> Try the parallax library
    -> Try the user library folder
    -> Try the current directory
  • RaymanRayman Posts: 14,670
    edited 2012-10-29 04:58
    I think it would be better if the Prop Tool would let you specify a library folder...

    But, what I do is keep any modified files in a project folder. I have a different folder for each project I'm working on...
  • JavalinJavalin Posts: 892
    edited 2012-10-29 05:08
    so do I, but you get into problems when you have say i2c code which goes cross project, so you have to keep multiple copies of it........
Sign In or Register to comment.