JJ3 (Customer) asked a question.

I am creating a program using Productivity Blocks. I bought a new computer last week because I was running out of memory. Now, Productivity Blocks is populating an error in Arduino causing Productivity Blocks to lock up.

The error in arduino is:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

I have to then use Task Manager to close Arduino. Reopening works for 3-5 minutes until the error comes back. How can I continue using Productivity Blocks so I can finish writing the program?


  • ADC Community_02 (Automationdirect.com)

    @JJ3 (Customer)​ After doing some research our QA team was able to determine that the issue is with the Arduino IDE not Productivity Blocks. There is a workaround that is working here on our end and would like for you to give it a try:

    1.) Ensure Java is installed on your computer.

    2.) Open command prompt.

    3.) Run the command:

    java -jar “C:\Program Files (x86)\Arduino\tools\ProductivityBlocks\tool\ProductivityBlocks.jar”

    4.) See if you can open and edit your project without issue (for us this is working!)

    5.) Use the ‘verify’ button to output the program text, which can now be pasted into the Arduino IDE.

    Note: If your project gets much bigger, the space on screen will start to become an issue. When space starts to run out, C++ code will become your only option.

     

     

    Expand Post
    Selected as Best
  • FACTS_AdamC (AutomationDirect)

    What OS and what processor is on your new PC?

     

    Are you able to upload any of the included examples to the board using Arduino without ProductivityBlocks?

  • JJ3 (Customer)

    The new laptop is Windows OS with an AMD Ryzen 9 6900HS processor.

     

    The area that I'm working on in Productivity Blocks is outputting this into Arduino:

     

    image

    Expand Post
  • ADC Community_02 (Automationdirect.com)

    What operating system is running on your new PC? Windows 11?

  • JJ3 (Customer)

    Yes, Windows 11

  • ADC Community_02 (Automationdirect.com)

    1.) In Productivity Blocks can you click on "save as" and attach the .apb file so we can try and duplicate?

    2.) Are you trying to use a specific function that causes the issue?

  • ADC Community_02 (Automationdirect.com)

    @JJ3 (Customer)​ After doing some research our QA team was able to determine that the issue is with the Arduino IDE not Productivity Blocks. There is a workaround that is working here on our end and would like for you to give it a try:

    1.) Ensure Java is installed on your computer.

    2.) Open command prompt.

    3.) Run the command:

    java -jar “C:\Program Files (x86)\Arduino\tools\ProductivityBlocks\tool\ProductivityBlocks.jar”

    4.) See if you can open and edit your project without issue (for us this is working!)

    5.) Use the ‘verify’ button to output the program text, which can now be pasted into the Arduino IDE.

    Note: If your project gets much bigger, the space on screen will start to become an issue. When space starts to run out, C++ code will become your only option.

     

     

    Expand Post
    Selected as Best
  • JJ3 (Customer)

    I had to select a different file path, but this is the best answer! Thank you for finding and sharing this work around. Now back to work for me!