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 Cannot compile: Object reference not set to an instance of an object (Read 3239 times)
Julle
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Oct 7th, 2015
Cannot compile: Object reference not set to an instance of an object
Sep 13th, 2016 at 1:44pm
Print Post  
Hi All.

Just installed Visual Studio 2015 Pro, Arduino IDE 1.6.11 and Visual Micro.
However, I'm not able to compile, I get an error:

"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:\ProjectsHome\ArduinoIDE\hardware\arduino\avr\cores\arduino" -I"C:\ProjectsHome\ArduinoIDE\hardware\arduino\avr\variants\mega" "C:\Users\abc\AppData\Local\Temp\VMicroBuilds\Blink\mega_atmega2560\Blink.cpp" -o "nul"
   Object reference not set to an instance of an objec
t"

What can cause this issue?
I believe the settings for the Arduino IDE location should be just fine.

Thanks, Alex.

« Last Edit: Sep 13th, 2016 at 1:45pm by Julle »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12208
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot compile: Object reference not set to an instance of an object
Reply #1 - Sep 13th, 2016 at 5:48pm
Print Post  
Hi,

Open Board Manager in the Micro Explorer and Click the Rescan button then restart the ide.

They have been messing with the index file location. There is now one location for users who have never installed other hardware and one for users who only use the atmel avr below the arduino ide.

The rescan should sort it out for now.
  
Back to top
IP Logged
 
Julle
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Oct 7th, 2015
Re: Cannot compile: Object reference not set to an instance of an object
Reply #2 - Sep 14th, 2016 at 7:02am
Print Post  
Thanks! That solved the issue!

Regards, Alex.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint