Skip to content

Crash with odd carriage returns #114

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
matteosuppo opened this issue Feb 8, 2016 · 1 comment
Closed

Crash with odd carriage returns #114

matteosuppo opened this issue Feb 8, 2016 · 1 comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@matteosuppo
Copy link
Contributor

This is a sketch with only CR as end-of-line markers (\r instead of \r\n)

sketch_feb8a.zip

The builder crashes with

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
arduino.cc/builder.(*PrototypesAdder).Run(0x732dd8, 0xc820012690, 0x0, 0x0)
    /home/msuppo/Work/arduino/arduino-builder/src/github.com/arduino/arduino-builder/src/arduino.cc/builder/prototypes_adder.go:78 +0x17da
arduino.cc/builder.(*ContainerAddPrototypes).Run(0x732dd8, 0xc820012690, 0x0, 0x0)
    /home/msuppo/Work/arduino/arduino-builder/src/github.com/arduino/arduino-builder/src/arduino.cc/builder/container_add_prototypes.go:56 +0x4f2
arduino.cc/builder.runCommands(0xc820012690, 0xc820311aa0, 0x1d, 0x1d, 0x1, 0x0, 0x0)
    /home/msuppo/Work/arduino/arduino-builder/src/github.com/arduino/arduino-builder/src/arduino.cc/builder/builder.go:187 +0x12b
arduino.cc/builder.(*Builder).Run(0xc820311c98, 0xc820012690, 0x0, 0x0)
    /home/msuppo/Work/arduino/arduino-builder/src/github.com/arduino/arduino-builder/src/arduino.cc/builder/builder.go:118 +0xe53
arduino.cc/builder.RunBuilder(0xc820012690, 0x0, 0x0)
    /home/msuppo/Work/arduino/arduino-builder/src/github.com/arduino/arduino-builder/src/arduino.cc/builder/builder.go:218 +0x39
main.main()
    /home/msuppo/Work/arduino/arduino-builder/src/github.com/arduino/arduino-builder/main.go:320 +0x2183

I debugged and discovered that the source code is not correctly divided into lines because of the CR, so it tries to split the source after it had ended, somehow :S

facchinm added a commit to facchinm/arduino-builder that referenced this issue Feb 8, 2016
otherwise all processing on ino file will likely fail
solves arduino#114
facchinm added a commit to facchinm/arduino-builder that referenced this issue Feb 9, 2016
otherwise all processing on ino file will likely fail
solves arduino#114
facchinm added a commit to facchinm/arduino-builder that referenced this issue Feb 11, 2016
otherwise all processing on ino file will likely fail
solves arduino#114
@facchinm
Copy link
Member

Fixed by #115

@per1234 per1234 added conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants