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) Insufficient Memory Error (Read 11281 times)
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Insufficient Memory Error
Jun 4th, 2015 at 5:12am
Print Post  
I've got Visual Micro 1.1505.19 installed for Visual Studio Community edition.
If I try to do a Peek Definition on analogRead, I get an Error: Insufficient memory to continue the execution of the program. Same for digitalRead, pinMode, etc.
The PC I'm using has 4GB RAM and no more than 75% of the RAM is in use.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Insufficient Memory Error
Reply #1 - Jun 4th, 2015 at 12:02pm
Print Post  
Hi,

Where and when do you see the error?

Thanks
  
Back to top
IP Logged
 
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Re: Insufficient Memory Error
Reply #2 - Jun 4th, 2015 at 2:45pm
Print Post  
When I'm in visual studio editing the ino file. If I right click on the analogRead function and select Peek Definition I get the error. If I select Go to definition, nothing happens.
I have an include file. The Adafruit NeoPixel library. If I right click on string.show() (for example) Peek Definition works.
« Last Edit: Jun 4th, 2015 at 2:56pm by Jim M »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Insufficient Memory Error
Reply #3 - Jun 4th, 2015 at 2:59pm
Print Post  
Okay I see thanks.

All I can say is that I don't think Visual Micro is not involved with this issue. All Visual Micro does is to ensure that you have a correctly configured standard Microsoft C++ project with source locations and pre-processor definitions for the chosen Board/Platform.

Once the c++ is configured we leave the standard Visual Studio C++ intellisense engine to do whatever it does.

I can only guess (and probably wrongly) that you are out of memory. I am never sure if a hidden proportion of memory is used or reserved by MS or if the amount of free disk space also an effect.

What if you close a few other apps? Does the issue for away?
  
Back to top
IP Logged
 
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Re: Insufficient Memory Error
Reply #4 - Jun 4th, 2015 at 3:05pm
Print Post  
It's the only app running and I have 1.1GB free RAM.

I'll search around the Visual studio folks and see about intellisense errors. I'll let you know.
  
Back to top
 
IP Logged
 
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Re: Insufficient Memory Error
Reply #5 - Jun 4th, 2015 at 3:13pm
Print Post  
Odd. The Programs & features shows version 15.05.2400.
I'm going to uninstall visual micro, clear the addins from Visual studio, CCleaner the registry. Then re-install visual micro. Let's see if that helps.
A visial Studio posting I read about insufficient memory said an add-in may be the culprit.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Insufficient Memory Error
Reply #6 - Jun 4th, 2015 at 3:13pm
Print Post  
Thanks. Does F12 got to the definition?
  
Back to top
IP Logged
 
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Re: Insufficient Memory Error
Reply #7 - Jun 4th, 2015 at 4:31pm
Print Post  
I've got it fixed, but I'm not happy with the solution.
I created a new Arduiono project and pasted in my code from the original ino file.
It works now. However, when creating a new project, it doesn't give me a choice where to put it. It just creates it in my d:\users\<user>\documents\arduino-1.6.x\ folder
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Insufficient Memory Error
Reply #8 - Jun 4th, 2015 at 5:23pm
Print Post  
Hi,

1)
Great. If it happens again please switch to a different board and back to your required board. The change of board causes visual micro to reset intellisense (as does other things such as adding a library or saving .ino files that contain new methods). but first zip the sketch and email to info [at] visualmicro.com. I suspect that either a pre-processor def or an include path caused the intellisense to get confused. or it might simply be an infrequent vs2013 bug.

2)

Yes correct. This is how arduino works. It has something called a sketchbook folder which defaults to myDocuments\Arduino. You can change the path in the ide locations config window. The sketchbook is where arduino saves and loads sketches and also where custom libraries and hardware are stored.

If you take a look at the standard visual studio "File>New>Project" window in the C++ section you will find a new Arduino Project option which works how VS normally works. Both resulting projects are the same the only difference being you have access to change the location as you would normally expect with a VS project.
  
Back to top
IP Logged
 
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Re: Insufficient Memory Error
Reply #9 - Jun 5th, 2015 at 3:30am
Print Post  
Will do. Thanks.

Oh, I've already been using the debug. It's awesome. Worth every penny.
  
Back to top
 
IP Logged
 
Jim M
Junior Member
**
Offline


Posts: 16
Joined: May 11th, 2015
Re: Insufficient Memory Error-Found cause & Fix
Reply #10 - Jun 6th, 2015 at 2:54am
Print Post  
I was looking at the project folder for the 1st and second projects I had. The project_1 folder has an SDF file (SQL Server Compact DB) that as 199MB, the seconf project (Same code) has an sdf file that was just 68MB. If I disable the DB (Tools->Options->Text Editor->C/C++->Disable Database) and delete the sdf file, Intellisense doesn't seem to work. If I then re-enable the DB, intellisense works again and there is no memory error. There is also an option to rebuild the DB (Tools->Options->Text Editor->C/C++->Rebuild Database). My memory error is now gone. The sdf file must have been corrupted.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Insufficient Memory Error
Reply #11 - Jun 6th, 2015 at 3:03pm
Print Post  
Well found. I can't believe that Microsoft still has this issue. It was more of a problem for vs2008.

This will be useful for others so great post thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint