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) Deep search for libraries ... Object reference not set to an instance of an object (Read 5131 times)
qrtio
Junior Member
**
Offline


Posts: 12
Joined: Mar 24th, 2019
Deep search for libraries ... Object reference not set to an instance of an object
Mar 24th, 2019 at 1:46pm
Print Post  
Same for me here, suddenly overnight existing projects do not compile anymore, on two independent machines.

All latest versions, a minimal sketch compiles fine on arduino ide.

vMicro gives errors:

Code
Select All
Compiling 'test' for 'Arduino/Genuino Uno'
Build Folder: "file:///C:/Users/qrti/AppData/Local/Temp/VMBuilds/test/uno/Release"
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Architecture Tools: "file:///C:/Program%20Files%20(x86)/Arduino/hardware/tools/avr/bin/"
Api: 1903180
Sketch Book: "file:///D:/User/Arduino"
Sketch Include Paths
Core Include Paths
Include Path "file:///C:/Program%20Files%20(x86)/Arduino/hardware/arduino/avr/cores/arduino"
Include Path rd"

Deep search for libraries ...
   Object reference not set to an instance of an object
Build failed for project 'test'
 

« Last Edit: Mar 24th, 2019 at 1:59pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #1 - Mar 24th, 2019 at 1:58pm
Print Post  
@qrtio Your arduino ide path doesn't look right. It's a different problem to this report so I might switch you onto a new forum thread. Can you please switch on the "Show build properties" then click reply and attach your output as a .txt file.

It can only be config changes that cause things to fail suddenly but in the arduino world there are a few different config points such as arduino ide location, board support packages (cores) etc. that visual Micro depends on.

The build properties will more clearly show the issue but also check your IDE location to ensure your arduino is accessible in the program files location it displays. Also confirm what location you have enabled for the arduino ide and which version you are running.

Thanks
« Last Edit: Mar 24th, 2019 at 1:59pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
qrtio
Junior Member
**
Offline


Posts: 12
Joined: Mar 24th, 2019
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #2 - Mar 24th, 2019 at 3:07pm
Print Post  
here it is ...

arduino IDE 1.8.9

installation
C:\Program Files (x86)\Arduino\arduino.exe

vMicro path
C:\Program Files (x86)\Arduino

« Last Edit: Mar 24th, 2019 at 3:22pm by qrtio »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #3 - Mar 24th, 2019 at 3:29pm
Print Post  
Thanks looks okay. 

Is this the same code failing on both machines?

.. Does a new empty project work? 
.. Please zip your project and email to info[at]visualmicro.com.
.. Which VS IDE version?

Thanks very much
« Last Edit: Mar 24th, 2019 at 3:29pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
qrtio
Junior Member
**
Offline


Posts: 12
Joined: Mar 24th, 2019
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #4 - Mar 24th, 2019 at 3:36pm
Print Post  
visual studio community 15.9.9

vMicro 1903.18.1 
(tried also some old versions, same error)

the project is a new empty one
(sending an existing project seems useless)

yes, same failing on both machines

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #5 - Mar 24th, 2019 at 3:41pm
Print Post  
I might have posted the wrong link so deleted my prev message so I removed it.

Please see if this release gives a better error report

https://1drv.ms/u/s!AsT00oFsGAmRm-Y5ih6-FNma2bI36w

edit: Please also confirm the arduino ide in the program files folder is building okay?
« Last Edit: Mar 24th, 2019 at 3:43pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
qrtio
Junior Member
**
Offline


Posts: 12
Joined: Mar 24th, 2019
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #6 - Mar 24th, 2019 at 3:58pm
Print Post  
yes, the arduino IDE works without complaints, even complicated projects compile

I'll check your new version later ...
  
Back to top
 
IP Logged
 
qrtio
Junior Member
**
Offline


Posts: 12
Joined: Mar 24th, 2019
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #7 - Mar 24th, 2019 at 4:36pm
Print Post  
tested the version of your link

I did not go into logs detail but the error message is the same as before
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #8 - Mar 24th, 2019 at 5:01pm
Print Post  
Oh, the last output you posted has the full error

It's a .net error, I will look into it. 

Code (C++)
Select All
Error: TryResolveSketchMacrosForInclude
C:\Users\qrti\AppData\Local\Temp\VMBuilds\test\uno\Release\test.cpp
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
   at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
   at System.Security.Cryptography.MD5.Create()
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.GetHash(String source)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.CompileRecipeCaptureError(String sRecipe, FileInfo codeFile, MCUPreferencesMap brdPrefs, List`1 includePaths, List`1 extraCmdParams)
   at CUPreferencesMap properties, List`1 includePaths, String srcFilename)
   at String sourceFilePath, Board brd, List`1 includePaths)
System.NullReferenceException*: Object reference not set to an instance of an object
   at UntilDone(String sourceFilePath, Board brd, List1 includePaths, Boolean isTopLevel)
   at ntilDone(List1 sourceFilePaths, Board brd, List1 includePaths, SketchLibraryListUnSorted knownLibs)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino._compile(SketchBuilder lsketch, String primaryClassName, Boolean verbose, Boolean isDebug)
 

« Last Edit: Mar 24th, 2019 at 5:02pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #9 - Mar 24th, 2019 at 5:06pm
Print Post  
This seems to be an issue attempting to use the .net MD5 system when FIPS mode has been enabled on the windows o/s

If you run visual studio as administrator does it work?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #10 - Mar 24th, 2019 at 5:17pm
Print Post  
Unless you are using your computers in the US federal government then you do not need

This seems to have been an issue for various visual studio uses for some time now. This user posts a useful article that should resolve things for you.

https://blogs.msdn.microsoft.com/smondal/2016/04/12/exception-has-been-thrown-by...

You can switch off FIPS mode but also try to work out what has suddenly switched it on. I had never heard of it before and we only use MD5 to make a unique cache key. Maybe we need an alternative mechanism but it's good to know the cause

Code (C++)
Select All
Here, fipsalgorithmpolicy registry subkey was set to 1 (Enabled).

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy]
"Enabled"=dword:00000001

>>> SOLUTION I disabled FIPS setting “Enabled” DWORD value to Zero. <<<<

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy]
"Enabled"=dword:00000000 




This is the microsoft article that explains in more depth

FIPS
« Last Edit: Mar 24th, 2019 at 5:18pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
qrtio
Junior Member
**
Offline


Posts: 12
Joined: Mar 24th, 2019
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #11 - Mar 24th, 2019 at 6:00pm
Print Post  
running as administrator did not help, but switching off FIPS did the trick, vMicro works well as before now

I'm running a beta version of a packer software that requested to switch on FIPS for some time, being tired of the nagging I activated it on both machines, not in my wildest dreams I suspected this could be the culprit

sorry for the fuzz and thank you for your kind and competent help
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep search for libraries ... Object reference not set to an instance of an object
Reply #12 - Mar 24th, 2019 at 6:03pm
Print Post  
Great thanks, it was a useful report. We needed better error reporting in that area anyway Smiley
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint