Arduino: The system cannot find the file specified error - debugging

When I go to verify or compile any script, an error saying, "The system cannot find the file specified."
Error code when I verify a blank script
I am coding for a robot and began getting this error after installing the "LIDAR-Lite_v3" library. I have uninstalled and reinstalled Arduino and cleared the "C:\Users\Ryano\OneDrive\Documents\Arduino" folder so that the LiDAR library was not in the libraries folder.
There is still an issue after doing this. When I first create a new sketch it verifies. When I save it, then it throws this error. It says that it is having issues compiling to the mega, but if I change the board type it gives exactly the same error with that particular board. This leads me to believe that the board is not the issue.
Also, it is only the sketches in "C:\Users\Ryano\OneDrive\Documents\Arduino" that don't work. Example sketches work just find and finish compiling.
I've looked at other questions concerning this type of issue, but none of them are particular to my case.

The error is caused by using the Arduino IDE with files located under the Windows OneDrive folder.
Arduino IDE 1.6.6 and newer use a tool named arduino-builder which is written in the Go programming language. Go does not correctly handle files in OneDrive, which resulted in this bug in arduino-builder.
Solutions:
A. Use a version of the Arduino IDE that has the bug fixed
That bug has now been fixed in the hourly build of the Arduino IDE so if you use that IDE version the problem will not occur:
http://www.arduino.cc/en/Main/Software#hourly
You should be aware that the hourly build is primarily intended for beta testing so you might encounter bugs that aren't present in the Arduino IDE production releases. However, since you're already encountering a bug in the production release, going from an IDE with a known show-stopper bug to one that might have some minor bugs seems like a good trade.
B. Don't use the Arduino IDE with files in OneDrive
You can work around the bug by not using the Arduino IDE with any files in OneDrive.
In this case it looks like you have your sketchbook located under OneDrive. You can change the location of the sketchbook folder via the Arduino IDE's File > Preferences > Sketchbook Location. Change that setting to any convenient folder on your computer as long as it's not in the OneDrive. The Arduino IDE does not automatically copy the contents of the previous sketchbook folder to the new location so you will need to do this manually.
If you're using the Windows App Store version of the Arduino IDE this solution will be a big more difficult since that IDE version stores some files in the OneDrive.
C. Other solutions
Other possible workarounds are described in the issue report thread:
https://github.com/arduino/arduino-builder/issues/254

Related

AnyLogic PLE v8.76 quit unexpectedly when launching on mac

I use AnyLogic PLE v8.76 on mac. It worked fine for a week, but today I got problem launching the software. I keep getting this message:
And this is the error shown:
I tried to download Anylogic again, but I still got the same problem...
I did not download any other softwares or change things on my mac.
Can somebody help me?
Thank you!
Best option, as often advised by the AnyLogic support team, is to clear the workspace.
Try the following:
Make hidden files and folders visible on your Mac - cmd+shit+.
Navigate to your user folder (Either from he side bar, or Macintosh HD -> Users->(yourname)
Find the .AnyLogic... folder, on mine it is called .AnyLogicProffesional
Delete the following two folders workspace8.x and configuiration8.x where the 8.x indicates your version number of the currently installed AnyLogic version.
These files keep settings and the currently loaded models on the disk and will remain even if you download a new version of AnyLogic, which is why downloading a new version does not always solve these kinds of problems.
If the issue still persists contact support, they might ask you to send the error report you got from your Mac (so copy and paste it to a document the next time you get it) as well as some error logs that get stored in these hidden files and folders. (Now you at least know where to find them ;-) )
If my solution did not provide the answer, please add an answer if you manage to find it.

Building project stored on another computer

I've developed an app for iOS and Android. My main computer runs Windows 10 and I've created my project entirely on it. To build to iOS you need to use a Mac, so I bought a cheap one second hand. I installed Unity and Xcode on the Mac. I at first tried copying the project across to the Mac, but this took a long time. Instead, I mounted my main PC as a network location and opened the project remotely from on the Mac. Building for iOS (or rather exporting the Xcode project) gets about halfway done, before it crashes. Looking through the log I find the following error:
UnauthorizedAccessException: Access to the path "/Volumes/C/Users/Peter/Documents/Unity/DD Party Status/Temp/StagingArea/Data/Managed/Unity.Analytics.StandardEvents.dll" is denied.
Opening this networked location in Finder shows me that Unity.Analytics.StandardEvents.dll, Unity.Analytics.Tracker.dll and UnityEngine.Purchasing.dll are all locked. For some reason Unity is unable to access these files to finish the build. Copying the files to my NAS and trying to build nets the same result. Can someone please help? I'd hate to have to copy the project in its entirety to the Mac every time I need a new build.
I got a little further, but I think this solves the main problem described here:
For me it was the purchasing.dll which always was locked. I noticed that the DLL was already locked in the library cache:
⁨
Library⁩/PackageCache⁩/com.unity.purchasing#2.0.6⁩/purchasing.dll
unlocking it here let me build further, although now I have a different gradle build error.

Btrieve 6.15 (Win 95) does not autoload in VB 6.0 IDE environment

I've recently bought a new tower and used third-party software to port across all my development tools (another story in itself), including VB 6.0, all my third-party tools, and Btrieve. The only problem I have with Btrieve is more an annoyance than anything. On this new tower, I have to remember to run my compiled application once before attempting to run it from inside the IDE or else it will not load, and subsequently return a corresponding error when it attempts to open the first file.
If anyone else has encountered this and knows how to fix it, I'd much appreciate it.
After checking this page on Wikipedia I realized that I needed to focus on two files: w32mkde.exe and wbtrv32.dll
By manually running the exe file, it would load the engine and my application would then run in the IDE, but I still had to manually start the exe. The desired and original behavior on my older machine was that running my program in the IDE would automatically launch the sever exe. From the Wiki page, I learned that it was wbtrv32.dll that was actually called by the program, which in turn would call the exe if needed.
I had recentl ported over my old machine to a new tower, and many of the ocx and dll files in \windows\syswow64 did not make it. There seems to be no pattern to which ones, but I had to re-register those as I found them. There must be some link there, because when I copied-over the W*.exe and W*.dll files from my production backup folder to the syswow64 folder, it suddenly worked again. Likely just a corrupt copy of the dll file. I believe the reason that the compiled version ran correctly is because those dll and exe files were installed to the application folder, and were apparently okay, but not being invoked when run from the IDE.
Hope this might help someone else some day.

Can't run a VS Universal Windows App project

I'm very new to Visual Studio and Universal Windows Apps Development. As a part of the course, I have this codeSHOW project provided.
I've cloned it successfully in VS 2015, but I can't run the project using the .sln file. Error:
Here's the error log: http://pastebin.com/c012Bba4
I have no clue how to fix it, and the issues on github go unanswered so I can't expect much from there.
This is an known issue in Visual Studio 2015.
The problem is with files with the exact same name under different folders in a Shared project, which in your case is "resources.resjson".
The only workarounds are either to make the file names unique and if that is not an option, to duplicate the files in the projects instead of sharing them out of the Shared project.
This is a VS2015 specific bug, the solution loads just fine on VS2013. You can get some insight into what is going wrong. First note that your got two message boxes that announced this error. Barely visible in your screenshot.
The failure.txt file gives more hints, you can see the stack traces of the two AggregateException that are raised when the solution is loaded. You'll see that two tasks are trying to load the same resources.resjon project item. Not correct of course, quacks like a standard concurrency bug.
Nothing actually goes wrong, Visual Studio can handle the exception and declares it "Recoverable", the projects are still loaded correctly. And compile just fine. Only other thing you need is the Bing Maps SDK, you can download the correct version here.
If you have VS2013 then prefer that version, it doesn't have this bug and loads the solution without any complaint. And minimizes the odds that you'll run into other quirky problems. Given the current stability of VS2015, not great, it is the best way to avoid losing time. Otherwise just ignore the mishap and close the message boxes, some future Update will no doubt fix the bug. You can report it at connect.microsoft.com if you wish. Not actually necessary I think, it looks like VS is phoning home.

Can't deploy Windows Phone App - An attempt was made to load a program with an incorrect format

I'm trying to deploy my app to a device and i get the following error
Error 27 An attempt was made to load a program with an incorrect format.
the odd thing is that the file and project this error relates to are both blank.
It was a WP7 app but i tried converting it to WP8 app in hope of fixing it but that didn't help. Anyone got any ideas how to figure out what's wrong?
the only thing i could find for this error talks about a specific assembly being compiled for the wrong platform. but this is not an option in the Windows Phone project settings
Check the files in your project. Files that are not part of the project should be marked as "Buid Action = none" and "Copy to Output Directory = Do not copy". Some examples are file files "text". Try this, worked for me.
Did you get any conversion warnings when you converted the project? I've worked around problems like this in the past by creating a new Windows Phone solution, re-creating the same projects in the new solution, creating any needed sub-folders into those projects, and then copying over the code and content files. This is usually quick if there aren't a lot of projects & folders.
Not sure if this is the case with you, or if you've already solved the issue (since it is an old thread), but this happens sometimes when you target the wrong CPU type. For example, your project targets x86 while you have a 64-bit machine.
Follow these steps to (hopefully) fix the issue:
Go to project properties
Go to Build tab
Select Any CPU from Platform dropdown
Save and recompile

Resources