Broken IDE

Arduino projects on the go
Post Reply
User avatar
Phil_G
Posts: 597
Joined: 15 Feb 2018, 23:32
Contact:

Broken IDE

Post by Phil_G »

Has anyone had the IDE start to load then just disappear, last time mine did this I was forced to do the dreaded update and had no end of bother with usbasp, ch340g & FTDI drivers and missing boards, missing libraries, it was a complete nightmare, took days to fix and is the reason I dont upgrade.
The only update I see for today was Adobe reader. I've tried going back a week with restore points to no avail.
Chrome broke at the same time, reinstalling cured that but I really, really, dont want to reinstall the Arduino IDE. Looks like its the JRE but I cant even find it under windows 10, I hate it I want XP back :D

Code: Select all

C:\Program Files (x86)\Arduino>arduino_debug
Looking for library 'user32'
Adding paths from jna.library.path: null
Trying user32.dll
Found library 'user32' at user32.dll
Looking for library 'shell32'
Adding paths from jna.library.path: null
Trying shell32.dll
Found library 'shell32' at shell32.dll
Looking for library 'Ole32'
Adding paths from jna.library.path: null
Trying Ole32.dll
Found library 'Ole32' at Ole32.dll
Loading configuration...
Initialising packages...
java.lang.NullPointerException
        at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:123)
        at processing.app.BaseNoGui.initPackages(BaseNoGui.java:487)
        at processing.app.Base.<init>(Base.java:257)
        at processing.app.Base.main(Base.java:140)

C:\Program Files (x86)\Arduino>
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Broken IDE

Post by Martin »

Yes Phil, I've seen the same.

On my PC the problem is usually with files in the folder:

C:\Users\Desktop\AppData\Local\Arduino15

Your user name and Arduino folder may be different, but they'll be similar. The AppData folder is hidden by default, so you may need to fiddle with the Windows view options and enable 'show hidden folders' or 'show system folders' or similar.

In that folder look for files that begin with package_ - and rename them. I normally change them to was_package_... in case I want to get them back, but to be honest I could just delete them because I've never needed to get them back (yet).

Once you've done that, try to restart the Arduino IDE, and you'll probably find that it magically starts - and when you look in the folder you'll find it's recreated correct package_ files automatically somehow.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Broken IDE

Post by Martin »

If that happened to me, I would completely delete my Arduino installation, and then go and download the latest one from the Arduino website... but I know you don't like doing that.

Sorry, I don't know what else to suggest.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Broken IDE

Post by Martin »

I just tried it on this Windows PC Phil, and mine is broken also. I deleted everything including the files in the AppData folder, reinstalled the latest (1.8.12) and it broke again after running once.

I suspect the guys who push out the library and board updates things have messed up. I'm sure there will be lots of people complaining on the internet and they'll probably have a fix in a day or two.

In the meantime, I can power up one of my other PCs (or switch this one over to the Linux distro) if I want to do any Arduino work - but I'll switch off my internet connection before I do, so those installations don't get automatically broken too!
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Broken IDE

Post by Martin »

The libraries are normally fine as they're stored in a separate folder within your 'sketches' folder and that's usually in your documents folder unless you configured things in a non-standard way. Those folders aren't deleted when you uninstall Arduino. I normally update the libraries when I'm informed that updates are available anyway - the library updates are usually to fix bugs or make things run faster, so are good to have - and it makes things easier for other users who don't have to search for old versions of libraries so that they can compile my sketches.

For recent updates, I've found that all the standard serial drivers, plus USBASP, seem to work straight out of the box. In the past I had to mess around with zadig or similar to configure drivers, but the developers seem to have fixed those issues.

I have had problems sometimes after an upgrade with some sketches not compiling - but usually that's because the developers have fixed some subtle bug somewhere inside the standard Arduino libraries, and maybe renamed a register or flag or interrupt service name to be more 'correct'. Usually a quick internet search explains what I need to change, and I think it's a good idea, where possible, to keep up to date, as it means new users are more likely to compile my sketches without problems.

I've installed loads of add-ons for non-standard Arduino boards at various times - Teensy, ESP32, STM32, Micro:Bit, and such. It's nice sometimes to do a clean install just to be rid of them! When I want to revisit such projects I find it doesn't take long to re-install those additions.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Broken IDE

Post by Martin »

If you get the IDE loading (by re-installing, or by deleting/renaming the package_ files in ...\AppData\...) then before compiling or loading any sketches, go to File...Preferences and untick the 'Check for updates on startup' option. Then exit the IDE.

The bug will already have struck (again) while you did that, so delete or rename the package files one last time...

From then on, the IDE should work as normal - it won't check for updates at startup, so it won't disable itself again.

As I expected, the Arduino forum is inundated with everyone reporting the same issue, so the developers will probably roll out a fix that will allow us to re-enable the 'Check for updates' option soon.
User avatar
Mike_K
Posts: 669
Joined: 16 Feb 2018, 06:35
Location: Hertfordshire

Re: Broken IDE

Post by Mike_K »

Hi Phil

I know this is slightly off-topic and you probably don't want to use Linux, but I have found that Arduino running on Ubuntu using a VirtualBox virtual machine under Windows 10 runs and compiles a lot faster than running under native Windows 10. Why Arduino runs faster on a virtual machine than under the native Windoze I've no idea. VirtualBox and Ubuntu are both free, so you can try it out and the only cost is time. And then you have a second copy of Arduino to use.

But taking this a step further, you said you'd love to have an XP machine again. Well, I have a virtual Windows 7 machine running under VirtualBox (and for that matter XP, 2000, Vista, 8.1 and 98SE machines too). You can even run another copy of Windows 10, but I think you need another licence. My virtual Win7 machine has another copy of Arduino for emergency use. There is a bit of setting up so that USB ports pass-through OK, but for a technical whizz like you, you'd find it easy. I can't see why you couldn't install XP under VirtualBox, install Arduino and keep that as a spare. You can download disk images of XP for VirtualBox and there are easy workarounds for the activation, as I believe the XP activation servers are long gone, even if you have a valid licence.

The final option to consider is not using Arduino IDE at all. I know that sounds a bit extreme, but I've been using CodeBlocks IDE for the last month or two and after a bit of a learning curve I don't go back to the Arduino IDE willingly. I now only reluctantly open the Arduino IDE to do bits I haven't figured out yet in CodeBlocks. There is also an Arduino Pro IDE in beta that might be worth another try.

And when I tried opening my Arduino, it too has the same problem as you, but not under my VirtualBox Ubuntu or Windows 7 copies that are both running 1.8.10. Strange.

Mike
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Broken IDE

Post by Martin »

Hi Mike,

Yes, I've reported before that Arduino runs much faster under Linux than Windows - on the exact same PC. I tried all sorts of things in the Windows settings - disabling virus checkers, auto indexing and such - nothing made much difference.

However, I have noticed a Windows Arduino IDE speed improvement since upgrading to a later version of the IDE. I've not tested yet to see if it's as fast as the Linux one, but there's no longer the very slow first compile that I was seeing previously.
Post Reply