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) VS2017, IDE 1.8.5=Object reference not set to an instance of an object (Read 5013 times)
WxMan
Newbies
*
Offline


Posts: 6
Joined: Apr 15th, 2018
VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Apr 15th, 2018 at 7:00pm
Print Post  
I'm running VS2017 and Arduino IDE 1.8.5. I've looked but not found any resolution to this error. I've tried the rescan solution without success.  Any help is appreciated.   

The script is a new script with empty setup/loop functions. It should at least compile. (Other scripts do not compile either).  Compilation from Arduino IDE on other scripts that fail are OK, but VS2017 VMicro versions are not. 

The configuration finds my MonteinoMega board so I'm assuming that configuration is OK. All locations exist in the preprocess command. The VS2017 Debugger is also installed.

Error showing up is as follows:

Compiling debug version of 'VS_ISS_WxStn' for 'MoteinoMEGA'
     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=atmega1284p -DVM_DEBUG_BREAKPAUSE -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUGGER_TYPE_SERIALUSB=18 -DVM_DEBUGGER_TYPE_USBAPI=17 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUG_ENABLE=1 -DVM_DEBUG   -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_MOTEINOMEGA -DARDUINO_ARCH_AVR -I"C:\Users\xxx\Documents\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Users\xxx\Documents\Arduino\hardware\Moteino\avr\variants\MoteinoMEGA" noMEGA\Debug\VS_ISS_WxStn.cpp" -o "nul"
   Object reference not set to an instance of an object


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #1 - Apr 15th, 2018 at 7:06pm
Print Post  
Maybe this??...

When you open board manager in the arduino ide it can delete boards it does not know about.

If you open platform explorer>board manager in visual micro and click re-scan it should sort the issue out.

tip: If you want to use arduino board manager then add the .json index files to the arduino ide instead of visual micro. Opening Visual Micro or clicking re-scan will detect the changes from the arduino ide
« Last Edit: Apr 15th, 2018 at 7:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
WxMan
Newbies
*
Offline


Posts: 6
Joined: Apr 15th, 2018
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #2 - Apr 15th, 2018 at 7:47pm
Print Post  
I've tried rescan:
Perhaps it is a more suttle issue. I'm realatively new to VMicro, Arduino IDE and Sketches, but not to VS or C. 

IDE DropDown shows MonteinoMEGA boards below a separator line, and does not show up in the IDE board manager.

Similar issues with VMicros in VS2017. (See attached)
It shows up under Installed tab but not in the Manage Boards tab?  Is that an issue?  IDE seems to compile OK, but VMicro is more particular.


« Last Edit: Apr 15th, 2018 at 7:56pm by WxMan »  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #3 - Apr 15th, 2018 at 8:07pm
Print Post  
That's right if you install a board from a zip then it's not in board manager.

Where did you install from?
  
Back to top
IP Logged
 
WxMan
Newbies
*
Offline


Posts: 6
Joined: Apr 15th, 2018
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #4 - Apr 15th, 2018 at 8:12pm
Print Post  
From a ZIP if I remember correctly.  How do I get it to Manager?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #5 - Apr 15th, 2018 at 8:20pm
Print Post  
I need to try it so I can see the config. where did you get the zip from?

info: Some boards do not have board manager support so the install if a different
  
Back to top
IP Logged
 
WxMan
Newbies
*
Offline


Posts: 6
Joined: Apr 15th, 2018
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #6 - Apr 15th, 2018 at 8:35pm
Print Post  
This board might have support, but I got zip files from here:

https://github.com/LowPowerLab/Moteino/tree/master/MEGA/Core
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #7 - Apr 15th, 2018 at 8:49pm
Print Post  
Hi,

There are lots of different boards out there and users can install in a few ways so it's always best to say what you have installed and to where.

The link you have posted show more than one package that can be installed and it's important to know which you installed.

I also point you to the large "Obsolete" message near the top of the link you have posted along with a link to the current version which is provided via board manager.

Please let me know which core you have installed from the link you posted thanks. It's going to avoid a lot of circles if weinstall and test the same
« Last Edit: Apr 15th, 2018 at 8:49pm by Tim@Visual Micro »  
Back to top
IP Logged
 
WxMan
Newbies
*
Offline


Posts: 6
Joined: Apr 15th, 2018
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #8 - Apr 15th, 2018 at 9:01pm
Print Post  
Oops. Sorry about that obsolete link. I know how precious time is! It's a real spaghetti trail to find the right one, but here it is.
https://github.com/LowPowerLab/Moteino/tree/master/MEGA/Core

I've also pasted the zip file in case it's needed.
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS2017, IDE 1.8.5=Object reference not set to an instance of an object
Reply #9 - Apr 15th, 2018 at 9:22pm
Print Post  
That link is also obsolete. If you read down below the zip files it says so and points you to the board manager .json file

The correct guide is here

The guide provides the following arduino board manager url:-

https://lowpowerlab.github.io/MoteinoCore/package_LowPowerLab_index.json

You can add the url to arduino ide>file>preferences>board support urls.

Then open board manager and install the package

Delete the files/folder you previously installed via zip and then restart visual micro.

All should then be well and you will see the latest boards (4) listed
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint