Java Error Keeps Crashing Arduino IDE

Hi, I'm using Arduino 1.8.19 version, and I am getting constant crashes when I open sketches. I'm on a Mac OS using Big Sur version 11.7.9

Here's a sample java error I'm getting:

Exception in thread "Timer-0" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutput Stream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteA rrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutpu tStream.java:153)
at org.apache.commons.compress.utils.IOUtils.copy(IOU tils.java:69)
at org.apache.commons.compress.utils.IOUtils.copy(IOU tils.java:49)
at org.apache.commons.compress.utils.IOUtils.toByteAr ray(IOUtils.java:167)
at cc.arduino.contributions.GPGDetachedSignatureVerif ier.verify(GPGDetachedSignatureVerifier.java:77)
at cc.arduino.contributions.SignatureVerifier.isSigne d(SignatureVerifier.java:55)
at cc.arduino.contributions.DownloadableContributions Downloader.checkSignature(DownloadableContribution sDownloader.java:211)
at cc.arduino.contributions.libraries.LibraryInstalle r.updateIndex(LibraryInstaller.java:89)
at cc.arduino.contributions.ContributionsSelfCheck.up dateLibrariesIndex(ContributionsSelfCheck.java:205 )
at cc.arduino.contributions.ContributionsSelfCheck.ru n(ContributionsSelfCheck.java:75)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

I then have to restart the IDE, and it happens over and over again now sometimes simply after opening a sketch.

I can't get anything done!

Any ideas?

Thanks,

Mike

The developer of the Teensy, Paul Stoffregen, has requested I make a link back to a Teensy forum post regarding this issue, so when/if a solution is found, it can benefit everyone.

Here is a link to the Teensy forum post regarding this issue. They referred me here by the way.

Thank you,

Mike

1 Like

Hi @phillmj,

My guess is the admins, might end up moving this to a different forum, as this one is specific to Arduino IDE 2.x,

But I also meant to ask you on the PJRC forum, if you have tried your code on IDE 2.x

You mentioned over there that your code is over 30K lines.
That you are running: Mac OS using Big Sur version 11.7.9

Also that you installed 2.1.1 but it still shows 1.8.19.
It has been awhile since I have used my mac, but I had both 1.x and 2.x installed. They both were int the launch area with different icons. You might might check to see if you have both and try the 2.x. Else would suggest that you try to install it again and see if that at least gets you up and running.

KurtE (on both forums)

I moved your topic to a more appropriate forum category @phillmj.

In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

@pert, Please help me to understand. How is this topic about "Using Arduino" as opposed to a software issue, which is where I posted it originally?

For the record, I certainly did take the time to consider where to post the topic, so your reprimand is useless for future posts because I already did that. If you can can explain why you moved this here, that would be helpful.

Thank you KurtE, as usual helpful and thoughtful.

On the PJRC forum they mentioned 1.8.19 is for lockable Teensy, and that's what I'm using. So it's useless for me to try 2.11 at this time, until it supports lockable Teensy.

Paul shared a workaround which I'm testing, which increases the java memory space. I'll let you know if it works.

Thank you much!

Mike

Check the sub-category where you originally posted. The problem is related to IDE 1.x and not to IDE 2.x.

1 Like

I have this a lot 1.8.18n and 1.8.19. I close the IDE and try again, many times it fixes it. Most of the time I find it with a mistook in the code where I maybe put a "{,],)," in the wrong place. I usually Ctrl Z back till it runs then use Ctrl Y to find the error. That is rude and crude but it works most of the time. Many times it locks up the IDE so I have to kill it (I use Linux) and restart it.

I use an external editor, Geany, so this is easy to do.

Thank you, fair enough, but the whole thing was moved to "using Arduino" which surely isn't right.

Thank you gilshultz, I appreciate it.

I don't think I have any misplaced code syntax - the code compiles just fine, and it lets me know when I've missed a ; or other marking.

Glad it works for you though.

1 Like

Sorry that is the only way I know of finding the problem. It is not unique to this particular version of the IDE it has happened to me on several other versions.The only other thing I do when I feel I am going bonkers is load another known good sketch and that so far has compiled correctly, but I first reload the IDE. I then go back to the bad one.

Based on history, it is right; in the past "Using Arduino" applied to both the boards, the IDE and other stuff. When IDE 2.x came along, it was placed in the software section as it was (and is) still under development. There is a revamp of the forum on the way (although it's a bit quiet around that at the moment) where the two (three) IDEs will be in the same main category.

2 Likes

Thank you, I understand. I really appreciate you explaining.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.