Skip to content

More than one custom library get stuck arduino-cli in endless loop + SIGSEGV #973

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
xplsek01 opened this issue Sep 23, 2020 · 3 comments · Fixed by #1066
Closed

More than one custom library get stuck arduino-cli in endless loop + SIGSEGV #973

xplsek01 opened this issue Sep 23, 2020 · 3 comments · Fixed by #1066
Assignees

Comments

@xplsek01
Copy link

xplsek01 commented Sep 23, 2020

Bug Report

Current behavior

Cause infinite loop:
arduino-cli compile --libraries libraries/Lib1,libraries/Lib2 -b esp8266:esp8266:nodemcu:CpuFrequency=80,VTable=heap,FlashSize=4M1M,LwIPVariant=v2mss1460,FlashErase=none,UploadSpeed=115200 --verbose

The same for:
arduino-cli compile --libraries libraries/Lib1 --libraries libraries/Lib2 -b esp8266:esp8266:nodemcu:CpuFrequency=80,VTable=heap,FlashSize=4M1M,LwIPVariant=v2mss1460,FlashErase=none,UploadSpeed=115200 --verbose

SIGSEGV crash:
arduino-cli compile --libraries libraries/Lib1, libraries/Lib2 -b esp8266:esp8266:nodemcu:CpuFrequency=80,VTable=heap,FlashSize=4M1M,LwIPVariant=v2mss1460,FlashErase=none,UploadSpeed=115200 --verbose

Expected behavior

Compilation successful. No crash.

Environment

TestProject.zip

  • CLI version: 0.13.0
  • Linux Ubutnu (Gitlab-CI)
@ubidefeo
Copy link

ubidefeo commented Sep 23, 2020

@xplsek01
This is an interesting bug.
Funny that if you only have one library it compiles successfully

Mind that in order to reproduce I've tried to change the target board with an Arduino Uno.
Also your parameters don't seem to be recognised by the latest ESP8266 platform, I had to rename most of them
arduino-cli compile --libraries=libraries/Lib1 -b esp8266:esp8266:nodemcu:xtal=80,vt=heap,eesz=4M1M,wipe=none,baud=115200 --verbose

this will of course complain for the absence of lib2.h which will be resolved by removing the #include directive

I also had another issue with your test sketch because you omit void before setup() and loop() but once fixed it compiles correctly when only including the first library and removing a reference to Lib2 into the command line.

Thank you, we'll investigage

@xplsek01
Copy link
Author

@ubidefeo Can I ask you when do you plan to make a fix? Sorry, that I urge you but my other activities depends on it. If I should start to think about long-term workaround, or to wait. Thank you very much.

@ubidefeo
Copy link

@xplsek01
sorry for the late reply, we are having an incredibly busy week at Arduino.
@silvanocerza has found the source of the bug, and we have it planned for a fix in the next sprint beginning next week.
I guess it will be in the nightly in about a week or two, I'll make a note to notify you when a build is ready so you can test your specific case 👍

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

Successfully merging a pull request may close this issue.

4 participants