Skip to content

Create new sketch fails for ESP8266 with version 4 #1090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Harry4Offies opened this issue May 21, 2019 · 12 comments
Closed

Create new sketch fails for ESP8266 with version 4 #1090

Harry4Offies opened this issue May 21, 2019 · 12 comments

Comments

@Harry4Offies
Copy link

Describe the bug
Installed latest V4.3.1_win64.2018-10-10_08-21-58.tar.gz.
Creation of a new ESP8266 sketch failed after a few seconds with

To Reproduce
Steps to reproduce the behavior:

  1. Go to Arduino Creat new Sketch and click on it

  2. Configure like screenshot
    Sketchsettings

  3. Wait a few seconds

  4. See error (sreen shot and logging)
    ErrorScreen
    Logging.txt

Expected behavior
A simple empty sketch to be created

Desktop (please complete the following information):

  • OS: Windows 10
  • N.A.
  • N.A.
@jonnieZG
Copy link

jonnieZG commented May 28, 2019

Same here. I have tested with WEMOS D1 R2 mini and several others, but the same problem persist. It breaks when I try to use 2.5.1 or 2.5.2 - but 2.5.0 and earlier seem to be working. I'd say it's a Java Regex Pattern related problem.

image

And here's the entire log of the event. Just fast forward to the end and you'll see a StackOverflowError caused by an internal Java regex Pattern resolution error. I've seen it happen before on several occasions in other Java apps, so my solution was to rephrase a problematic regex pattern.

log.zip

Another test that proves that something about 2.5.1 and 2.5.2 platform setup is bad:

  1. Create a 2.5.0 project - it passes
  2. Open the project properties and change its platform from 2.5.0 to 2.5.2 - it breaks with the same StackOverflowError

@smartmicrodevel
Copy link

Same issue here, would love to use 2.5.2!
Any workaround?

@jonnieZG
Copy link

Same issue here, would love to use 2.5.2!
Any workaround?

I couldn't find any, so I'm stuck on 2.5.0.

@BbIKTOP
Copy link

BbIKTOP commented Jun 18, 2019

"Latest" nightly build works ok but does not compile due to some empty parameters it tries to pass to the esptool.py. Tried to modify ExternalCommandLauncher constructor that does String#split with regex, but cannot build it. So I changed upload.py to eliminatine empty args:

import sys
import os


i=0
while(i<len(sys.argv)):
    if str(sys.argv[i])=='':
        sys.argv.pop(i)
    else:
        i=i+1

sys.argv.pop(0) # Remove executable name

But looks like nobody maintains Sloeber now. It's sad. Probably it's time to move to the PlatformIO (

@smartmicrodevel
Copy link

Same issue here, would love to use 2.5.2!
Any workaround?

I couldn't find any, so I'm stuck on 2.5.0.

Tried increasing stack size of JVM via -Xss512m but even that won't help. What happend to the guys who maintained this?

@jonnieZG
Copy link

jonnieZG commented Jun 19, 2019

Tried increasing stack size of JVM via -Xss512m but even that won't help.

There is a recursive loop that Regex parser falls into. Increasing memory won't help, the Regex has to be rephrased.

What happend to the guys who maintained this?

I guess that Life is what happened. ;) Maintaining an open source is OK when you are young and you don't have any other worries, but later on in life all these things fall down on your list of priorities, especially if they don't pay, even more if they require additional investments on your behalf.

@tvand
Copy link

tvand commented Jun 21, 2019

I tried to debug the problem. It is in /io.sloeber.core/src/io/sloeber/core/tools/Helpers.java#setTheEnvironmentVariablesPostProcessing()

The problem happens when variables are used twice in a recipe. I will try to provide a patch but meanwhile you may work around the problem by changing

tools.esptool.upload.pattern="{cmd}" "{runtime.platform.path}/tools/upload.py" --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" {upload.erase_cmd} --end --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" write_flash 0x0 "{build.path}/{build.project_name}.bin" --end

to

tools.esptool.upload.pattern="{cmd}" "{runtime.platform.path}/tools/upload.py" --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" "{upload.verbose}" {upload.erase_cmd} --end --chip esp8266 --port "{serial.port}" --baud "{upload.speed}" write_flash 0x0 "{build.path}/{build.project_name}.bin" --end

(i.e. remove the second "{upload.verbose}") in platform.txt.

@tvand
Copy link

tvand commented Jun 21, 2019

I guess that Life is what happened. ;) Maintaining an open source is OK when you are young and you don't have any other worries, but later on in life all these things fall down on your list of priorities, especially if they don't pay, even more if they require additional investments on your behalf.

The latest activity in the repository was the removal of requests for donations. Go figure.

@tvand
Copy link

tvand commented Jun 21, 2019

Fixed in #1073

@jonnieZG
Copy link

jonnieZG commented Jun 22, 2019

Ok, seems to be working now.

  1. Go to Window >> Preferences >> Install/Update >> Available Software Sites and add this location (you can name it Sloeber Nightly or whatever you like) http://eclipse.baeyens.it/update/V4/nightly/
  2. Help >> Check for Updates
  3. Select only Sloeber and Sloeber Plugin and install that. Leave other updates alone, because that will most likely screw other things up due to dependency inconsistencies. If you really want to, you can always make a backup of your properly working Sloeber installation directory and try various combinations of these updates until you find those that work fine.

Should be working fine when done.

@amirna2
Copy link

amirna2 commented Sep 2, 2019

Still failing on Mac OSX using latest Eclipse CDT Version: 2019-06 (4.12.0) and the latest nightly plugin build version 4.3.1.201902260606.
Used the steps above: #1090 (comment)

Note: I am trying to create a project for a different platform than mentioned here (ESP32).
But other platforms are equally failing.

@erdemuncuoglu
Copy link

Hi @amirna2
Your issue has a solution. Check my comment in #1102.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants