Hello,
I'm trying to compile code for a project that uses a ChipKIT board. The first time I compile, everything works great, but when I try to compile again with the exact same code, I get the following error:
Arduino: 1.6.13 (Mac OS X), Board: "OpenBCI 32"
panic: runtime error: index out of range
goroutine 1 [running]:
panic(0x1519c0, 0xc4200100a0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
arduino.cc/builder.findIncludesUntilDone(0xc42006f500, 0xc4203aacc0, 0x151ce0, 0xc42035d680, 0xc4202d01b6, 0x8, 0x0, 0x0)
/Users/jenkins/jenkins/workspace/arduino-builder-macosx/src/arduino.cc/builder/container_find_includes.go:321 +0x138f
arduino.cc/builder.(*ContainerFindIncludes).Run(0x244c58, 0xc42006f500, 0x41bc3c3c, 0x0)
/Users/jenkins/jenkins/workspace/arduino-builder-macosx/src/arduino.cc/builder/container_find_includes.go:149 +0x5e4
arduino.cc/builder.runCommands(0xc42006f500, 0xc4201a9af8, 0x22, 0x22, 0x1, 0x0, 0x0)
/Users/jenkins/jenkins/workspace/arduino-builder-macosx/src/arduino.cc/builder/builder.go:189 +0xcd
arduino.cc/builder.(*Builder).Run(0xc4201a9d48, 0xc42006f500, 0xc42003bda8, 0x15cc60)
/Users/jenkins/jenkins/workspace/arduino-builder-macosx/src/arduino.cc/builder/builder.go:124 +0xb90
arduino.cc/builder.RunBuilder(0xc42006f500, 0xc42003bda8, 0x244c58)
/Users/jenkins/jenkins/workspace/arduino-builder-macosx/src/arduino.cc/builder/builder.go:220 +0x35
main.main()
/Users/jenkins/jenkins/workspace/arduino-builder-macosx/src/arduino.cc/arduino-builder/main.go:316 +0x912
/Applications/Arduino.app/Contents/Java/arduino-builder returned 2
Error compiling for board OpenBCI 32.
If I close the code window (not quit the IDE, but just close the window) and the reopen the sketch, I can compile again. But only once. I am using the library found here
and I'm running the DefaultBoard.ino sketch from the examples folder.
This problem was posted on the Digilent forum,
and I also reached out to ChipKIT
http://chipkit.net/forum/viewtopic.php?f=7&t=3753&p=15664#p15664
majenko was able to replicate the problem in 1.6.12 and 1.6.13. It seems that something was changed between 1.6.11 and 1.6.12 that is causing this compilation problem.