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
Normal Topic Object reference not set to an instance of an object (Read 6989 times)
boardloader
Newbies
*
Offline


Posts: 2
Joined: Nov 3rd, 2016
Object reference not set to an instance of an object
Nov 3rd, 2016 at 2:52pm
Print Post  
During compilation, after update Visual Micro and Arduino IDE, appeared strange error like "Object reference not set to an instance of an object".
And even when I try to compile very simple project "Blink", I got following messages:

Compiling debug version of 'Blink' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'
     Preprocess: "{runtime.tools.avr-gcc.path}\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=106011 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "C:\Users\F\AppData\Local\Temp\VMicroBuilds\Blink\mega_atmega2560\Blink.cpp" -o "nul"
   Object reference not set to an instance of an object


     An error was encountered during the 'Deep Search' discovery process.
     Either resolve the error or switch off the 'Deep Search Includes' option.
     Tip: When deep search is switched off, headers must be #included in the [project_name.ino] for all required libraries (for example: #include <SPI.h>)
     Tip: Deep search must be off if the project source contains links/shortcuts to code outside of the project structure. The source will have been #included using a relative path preceeded by ..\ (for example: #include "..\..\foo\foo.h")

I tried to switch off Deep Search, but after this got Error compiling core:

Compiling debug version of 'Blink' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'
     Process: "{runtime.tools.avr-gcc.path}\bin\avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=106011 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o lse.S.o"  
Error compiling core

What I did wrong?
Thanks.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12237
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Object reference not set to an instance of an object
Reply #1 - Nov 3rd, 2016 at 3:07pm
Print Post  
Please open the visual micro explorer > board manager then click re-scan twice or restart the ide

Thanks
  
Back to top
IP Logged
 
boardloader
Newbies
*
Offline


Posts: 2
Joined: Nov 3rd, 2016
Re: Object reference not set to an instance of an object
Reply #2 - Nov 3rd, 2016 at 4:07pm
Print Post  
Thank you for the quick response.
Now all works good!


  
Back to top
 
IP Logged
 
Saurbaum
Newbies
*
Offline


Posts: 2
Joined: Dec 27th, 2016
Re: Object reference not set to an instance of an object
Reply #3 - Dec 27th, 2016 at 10:15am
Print Post  
I'm having this same error and restarting the IDE or hitting rescan isn't fixing it for me.

Is there a specific version of the Arduino IDE I should have downloaded?
  
Back to top
 
IP Logged
 
Saurbaum
Newbies
*
Offline


Posts: 2
Joined: Dec 27th, 2016
Re: Object reference not set to an instance of an object
Reply #4 - Dec 27th, 2016 at 10:39am
Print Post  
No idea what I did with settings and updating libraries but eventually it started compiling.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12237
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Object reference not set to an instance of an object
Reply #5 - Jan 3rd, 2017 at 9:35pm
Print Post  
I found the issue which could sometimes happen after visual micro deleted the temporary build folder prior to re-build.

The latest release prevents the issue from happening and also includes a number of important fixes to "library search/discovery".
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12237
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Object reference not set to an instance of an object
Reply #6 - Jan 16th, 2017 at 6:43pm
Print Post  
New release in the gallery fixes this issue
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint