Skip to content
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

Stack overflow error compiling code with backslashes, Linux and Windows only [imported] #962

Closed
cmaglie opened this issue Nov 15, 2012 · 2 comments
Assignees
Labels
Component: IDE The Arduino IDE Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation Type: Bug
Milestone

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 962 moved from a Google Code project.
Added by 2012-06-23T22:59:36.000Z by n...@gammon.com.au.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

What steps will reproduce the problem?

  1. Compile program in forum thread: http://arduino.cc/forum/index.php/topic,111262
  2. Note, code has a long char string continued over multiple lines with backslashes at the end of each line

What is the expected output? What do you see instead?

I expect a clean compile.

I get:

Exception in thread "Thread-3" java.lang.StackOverflowError
at java.util.regex.Pattern$Loop.match(Pattern.java:4312)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4244)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4095)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3362)
at java.util.regex.Pattern$Branch.match(Pattern.java:4131)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4185)
at java.util.regex.Pattern$Loop.match(Pattern.java:4312)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4244)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4095)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3362)
at java.util.regex.Pattern$Branch.match(Pattern.java:4131)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4185)
at java.util.regex.Pattern$Loop.match(Pattern.java:4312)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4244)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4095)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3362)
...

What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?

Version 1.0.1 on Ubuntu.
Version 1.0 on Windows.
Version 1.0.1 on OS/X.

The error does not occur on OS/X.

Board: Uno

Please provide any additional information below.

Problem part of code:

const char progdata[] PROGMEM =
":100000000EC015C014C013C012C011C010C00FC064
:100010000EC00DC00CC00BC00AC009C008C011241E
:100020001FBECFE5D2E0DEBFCDBF02D02AC0E8CFF1
:100030000F931F93DF93CF9300D0CDB7DEB787E345
:1000400090E021E0FC01208388E390E021E0FC01C6
:10005000208388E390E028E330E0F901308121E05B
:100060002327FC0120838FEF9FEF9A838983898167
:100070009A818C01C8010197F1F78C011A830983D9
:06008000E8CFF894FFCF69
:00000001FF";

Fixed by changing to:

const char progdata[] PROGMEM =
":100000000EC015C014C013C012C011C010C00FC064"
":100010000EC00DC00CC00BC00AC009C008C011241E"
":100020001FBECFE5D2E0DEBFCDBF02D02AC0E8CFF1"
":100030000F931F93DF93CF9300D0CDB7DEB787E345"
":1000400090E021E0FC01208388E390E021E0FC01C6"
":10005000208388E390E028E330E0F901308121E05B"
":100060002327FC0120838FEF9FEF9A838983898167"
":100070009A818C01C8010197F1F78C011A830983D9"
":06008000E8CFF894FFCF69"
":00000001FF";

@ffissore ffissore added the New label Feb 27, 2014
@cmaglie cmaglie removed the New label Feb 27, 2014
@ffissore ffissore self-assigned this Jan 28, 2015
@ffissore
Copy link
Contributor

Answer posted on the original issue

@ffissore
Copy link
Contributor

Fixed by #3779

@ffissore ffissore added this to the Release 1.6.6 milestone Sep 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants