Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Open config file (Read 16047 times)
Greg Smith
Newbies
*
Offline


Posts: 4
Location: Bristol, UK
Joined: Jul 3rd, 2013
Open config file
Jul 3rd, 2013 at 2:21pm
Print Post  
Hello All,

I'm new here today Smiley

Using latest build of ATMEL Studio 6.1.2674 with SP1 and the VisualMicro plugin for Arduino...

I -often- see the following error when trying to build or enter 'debug'...



Compiling 'ArduinoEx1' for 'Arduino Nano w/ ATmega328'
Binary sketch size: 4820 bytes (16% of a 30720 byte maximum) (1.00 secs)
System.Exception: Visual Micro: Unable to save new program settings file
C:\Users\Admin\Documents\Arduino\ArduinoEx1\Visual Micro\Compile.vmps.xml ---> System.IO.IOException: The requested operation cannot be performed on a file with a user-mapped section open.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.Xml.XmlDocument.Save(String filename)
   at Visual.Micro.ProgramConfiguration.ProgramSettingsReader.Save()
   --- End of inner exception stack trace ---
   at Visual.Micro.ProgramConfiguration.ProgramSettingsReader.Save()
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.CompileDo(Project oProject, Boolean IsDebugStartCommand)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.Compile(Project oProject, Boolean IsDebugStartCommand)


The problem will resolve itself after a while if I keep trying the same operation, or, try other buttons at random.

Any ideas?

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Open config file
Reply #1 - Jul 3rd, 2013 at 2:26pm
Print Post  
Thanks for the report. I don't know why other are not hitting this problem but will investigate for the next release in a few days.

This error suggest that Visual Micro has the file open more than once. If you can email the file it would be useful to see its contents.

C:\Users\Admin\Documents\Arduino\ArduinoEx1\Visual Micro\Compile.vmps.xml 

I am assuming that you do not have this file open in Atmel Studio, notepad or any other app?

Thanks

« Last Edit: Jul 3rd, 2013 at 2:30pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Greg Smith
Newbies
*
Offline


Posts: 4
Location: Bristol, UK
Joined: Jul 3rd, 2013
Re: Open config file
Reply #2 - Jul 3rd, 2013 at 2:31pm
Print Post  
Tim@Visual Micro wrote on Jul 3rd, 2013 at 2:26pm:
I am assuming that you do not have this file open in Atmel Studio, notepad or any other app?


You are quite correct. I don't.

I'll email the contents of the said file using the address we've corresponded on earlier.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Open config file
Reply #3 - Jul 3rd, 2013 at 2:40pm
Print Post  
Thanks the file looks fine.

I'll look into it. 

If you want a short term fix I suspect that vm is opening and closing the file too often and that something line a virus checker is causing additional "slowness" on your machine.

If possible, you might try switching off your virus checker for a few minutes then compiling multiple times to see if the problem improves. Just interested to know why you have this difference.

Thanks
  
Back to top
IP Logged
 
Greg Smith
Newbies
*
Offline


Posts: 4
Location: Bristol, UK
Joined: Jul 3rd, 2013
Re: Open config file
Reply #4 - Jul 3rd, 2013 at 2:45pm
Print Post  
Hi again.

I'm actually at work at the moment, so will give the suggestion a try later, albeit not a 'fix'  Grin

My machine is a (Windows 7 Ultimate x64) Core I5 with 16Gb ram and a 3.4Ghz clock, so 'slowness' is unlikely, but the virus checker may well be holding up file open/close operations as you say.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Open config file
Reply #5 - Jul 3rd, 2013 at 2:48pm
Print Post  
Yes it is strange, I run same as you but also test on slower machines. 

Thanks
  
Back to top
IP Logged
 
Greg Smith
Newbies
*
Offline


Posts: 4
Location: Bristol, UK
Joined: Jul 3rd, 2013
Re: Open config file
Reply #6 - Jul 3rd, 2013 at 3:03pm
Print Post  
Looks like you were right.
If I turn off the resident scanner, it works without fault.
So yes, vm is opening and closing the config frequently and getting tangled up with the scanner.
Thanks for the suggestion. Really should have thought of that myself. By 'trade' I'm a software engineer with over 35 years in the game. Silly how you can overlook the ******* obvious  Cheesy
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Open config file
Reply #7 - Jul 3rd, 2013 at 3:11pm
Print Post  
Great, I will reduce the number of saves of the settings files during compile.

Thanks for this test.

  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Open config file
Reply #8 - Nov 28th, 2013 at 4:26pm
Print Post  
Not sure if this is supposed to be fixed yet, but I have the same issue.  I just this morning installed an upgraded version of Trend Micro, and got that rather cryptic message.  I didn't have the problem with the old version, ever: wonder why?  I found I had to close and reopen the sketch between each build.

It might help others to know it can be worked around by entering the sketchbook directory as an exception in the Trend Micro file monitoring lists.  Probably other virus software has a similar feature.  I suppose it opens a security hole, but I can't imagine it's too serious.

The Visual Micro version I am using in Atmel Studio 6.1 is 1.1309.11
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Open config file
Reply #9 - Nov 29th, 2013 at 12:49pm
Print Post  
Thanks for this additional report. In future versions we will try to see if we can avoid the need for this.
  
Back to top
IP Logged
 
_DigitalCowboy_
Newbies
*
Offline


Posts: 1
Joined: Jun 24th, 2014
Re: Open config file
Reply #10 - Jun 25th, 2014 at 11:54pm
Print Post  
Tim@Visual Micro wrote on Nov 29th, 2013 at 12:49pm:
Thanks for this additional report. In future versions we will try to see if we can avoid the need for this.

Is there any update for this issue.  I just started using the Visual Micro plugin with Visual Studio 2010 and I am experiencing this issue the majority of the time when I try to build and pretty much every time I try to debug...even a little simple empty setup/loop sketch.   
If I shutdown VS2010 and restart I can get a couple of compiles but then I get the error consistently.  If I shutdown my antivirus I can get clean compiles but that's not a solution.
  
Back to top
 
IP Logged
 
Frank C.S. Wang
Newbies
*
Offline


Posts: 2
Joined: Feb 4th, 2015
Re: Open config file
Reply #11 - Feb 4th, 2015 at 12:47am
Print Post  
I also have the same problem, and already solved it by adding the arduino project directory into the exception list of Trend Micro software. 

I am using Visual Studio 2013 community, core i7, 16GB RAM, SSD, win7 x64. Hope this help guys have the same problem.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Open config file
Reply #12 - Feb 4th, 2015 at 12:25pm
Print Post  
Thanks for posting your solutions, it's mainly trend that reports this issue. I don't hear about it from other virus checkers.
« Last Edit: Feb 4th, 2015 at 12:25pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint