Skip to content

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

Closed
@cmaglie

Description

@cmaglie

This is Issue 962 moved from a Google Code project.
Added by 2012-06-23T22:59:36.000Z by [email protected].
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";

Metadata

Metadata

Assignees

Labels

Component: IDEThe Arduino IDEComponent: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilationType: Bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions