Compilation error 'panic: runtime error: index out of range'

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Compilation error 'panic: runtime error: index out of range'

Post by majenko » Thu Jan 12, 2017 2:08 am

This will be a file naming issue. Your library folder is called "ArduinoThread" yet there is no "ArduinoThread.h" file within it. One of the more strict rules of UECIDE is that a library has to be "xxx/xxx.h" where xxx is the same for both the folder and the master header file.

It needs this so that it can treat each library as a discrete entity in its own right - that way it can then look for libraries this library depends on and automatically include them - something the Arduino IDE can't do ;)

So if you rename the folder "Thread" then it should work fine, and that library will be known as "Thread".
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

photomankc
Posts: 23
Joined: Sat Nov 12, 2011 4:34 am

Re: Compilation error 'panic: runtime error: index out of range'

Post by photomankc » Fri Jan 13, 2017 3:15 pm

That makes sense. Good catch. I see now that I need to right-click the Library side-bar item and add the Library, which does as you indicate and plops in an include pointing at "FolderName.h". Change or remove that include and the library disappears in the side-bar. I get it now. Thanks!

ETA: With a bit of fix-up on the naming of things the project compiles great! Much faster than ArduinoIDE too!

jam123
Posts: 10
Joined: Tue Aug 02, 2011 3:43 am

Re: Compilation error 'panic: runtime error: index out of range'

Post by jam123 » Mon Feb 06, 2017 5:54 am

Same problem here trying to compile with a library for a Sabertooth motor controller. Arduino 1.6.12. Chipkit max32. Just wanted to add meself here in case there is any news.

williamhdean
Posts: 1
Joined: Mon Feb 20, 2017 11:01 pm

Re: Compilation error 'panic: runtime error: index out of range'

Post by williamhdean » Mon Feb 20, 2017 11:04 pm

Thanks for the work. Question - when trying to install UCIDE on linux, where are the instructions for installing after I get the jar file? Sorry ... Newb.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Compilation error 'panic: runtime error: index out of range'

Post by majenko » Mon Feb 20, 2017 11:22 pm

On linux you should really use the repository (assuming a debian based system like ubuntu) - it'll keep you up to date properly.

Add to /etc/apt/sources.list:

Code: Select all

deb http://majenko.co.uk/debian stable main
deb http://majenko.co.uk/debian unstable main
Run:

Code: Select all

$ sudo apt-get update
$ sudo apt-get install majenko-keyring
$ sudo apt-get update
$ sudo apt-get install uecide
If you don't have a debian based Linux (say you're on Fedora Core, or Gentoo or something) then you should download the ZIP version. In there is a script to run that executes java with the jar file. Just like Arduino.

If you want to run the jar file manually you can:

Code: Select all

$ java -jar uecide.jar
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

jpswensen
Posts: 1
Joined: Fri Mar 18, 2016 9:12 pm

Re: Compilation error 'panic: runtime error: index out of range'

Post by jpswensen » Mon May 15, 2017 11:17 pm

Any update on getting this solved? I was giving a PID control tutorial to the Robotics Club at the university and we spent more time dealing with this problem than actually getting any tutorial'ing done.

I have a student in lab who is now struggling with the same thing. It would be really nice to develop for all our boards out of the same IDE, but maybe that isn't possible unless I switch to UECIDE?!?!?!

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: Compilation error 'panic: runtime error: index out of range'

Post by EmbeddedMan » Tue May 16, 2017 1:45 am

jpswensen,

Just to clarify - are you trying to run all 4 boards under UECIDE, and you get these compile errors in that situation? Or are you using chipKIT-core in the Arduino IDE?

*Brian

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Compilation error 'panic: runtime error: index out of range'

Post by majenko » Tue May 16, 2017 10:37 am

The index out of range thing is a known bug in Arduino Builder, which UECIDE doesn't use. I haven't seen it mentioned recently though so it may be fixed in the 1.8.x series? I'll dig one out and have a play.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Compilation error 'panic: runtime error: index out of range'

Post by majenko » Tue May 16, 2017 10:54 am

Well the OpenBCI DefaultBoard sketch compiles cleanly in IDE version 1.8.2 with chipKIT Core 1.4.1 installed. No Wukkas, to quote Dave....
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

jam123
Posts: 10
Joined: Tue Aug 02, 2011 3:43 am

Re: Compilation error 'panic: runtime error: index out of range'

Post by jam123 » Wed May 31, 2017 9:26 pm

>>Same problem here trying to compile with a library for a Sabertooth motor controller. Arduino 1.6.12. Chipkit max32. Just wanted to add meself here in case there is any news. <<

I just tried arduino 1.8.2 and it is still broken for me.

Post Reply