question on terminal and simulator

Hi guys. I think I need to know a lot more about the terminal. to be able to find where the error is made

and to be able to understand the terminal better to fix the errors.


I have this in the terminal


stack traceback:
    [C]: ?
    [C]: in function ‘insert’
    ?: in function ‘insert’
    …ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:763: in function <…ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:224>
    ?: in function ‘dispatchEvent’
    ?: in function ‘gotoScene’
    …/victormbarba/Desktop/Donde Esta El Gato 2/page4.lua:354: in function <…/victormbarba/Desktop/Donde Esta El Gato 2/page4.lua:352>
    ?: in function <?:218>
2013-10-03 12:58:12.183 Corona Simulator[2897:f03] RuntimeErrorNotification: Failed to parse error message: ERROR: table expected. If this is a function call, you might have used ‘.’ instead of ‘:’


What is – stack traceback?

then I see [C]: ? – why is that, why the C inside these [] , and what is the question mark – ?


The I see another [C]: – in function ‘insert’ – I don’t think I have any function named ‘insert’

as you can see there are many things there.

I do need help to find where is the error, so I can fix it

any help I would really appreciate it.

“Stack traceback” is a general computing term to do with a program’s memory. Roughly speaking it is a list of the function calls that the application was processing when an error occured (someone feel free to explain that in simpler terms if you can). I wouldn’t worry too much about that for now, just remember it means that an error has occurred.

“insert” is a function which all lua tables have. In your case, this could be because you are trying to insert an object into a display group which no longer exists. You may not be calling the function “insert” directly, but perhaps you are doing  something like this:

local myImage = display.newImageRect(myGroup, "myimagefile.png", 128, 128)

Adding a group to the parameters will cause the group to try and “insert” the object into itself. The same applies to inserting table rows into a table view, objects into a scroll view etc.

Now, in terms of reading the terminal my golden rule is: start at the top, and work your way down.

As you say, you see this line

[C]: in function 'insert'

which means nothing to you. However if you go down a bit more, you have this line:

ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:763

Presumably one of your files is called “recamara.lua”. The message is telling you that the error can be found by looking at line 763. Usually this line is the location of the error itself, however sometimes it is only the line where a function begins, and the error is somewhere within the function.

Thank you very much, I had a mis spelling in line 763.

so far so good. I keep working on my app.


one little thing about terminal…


I think that it’s a computer program, like any other.

and “someone” decided to write

– “Stack traceback”  – instead of “an error has occurred”

like in my case…

instead of

– ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:763: in function
<…ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:224>

they could have written –

– in the file “recamara.lua, in line 763, you have this “scrollView:insert(ve)”, one way of fixing it is like this --scrollView:insert(ventanaSV)”

instead of speaking a language that one or two people can understand.


it’s just my humble opinion.


so if someone know that language and wants to be a millionaire, just write a plug in to translate from “terminal language” to “English”


I will buy that plug in, right now.

Sorry to disappoint you but all languages has error informations written like this and it’s is really minimalistic.

Your ‘stack traceback’ meaning is a bit wrong.

I’ll describe it for you.
Let’s say you lost your keys. So what will you do? You will try to remember what have been doing before. Let’s say you often lose your keys so you write all your actions on list. To find keys you look at the last position on list. You were in bathroom and next to bathtub. Why were you there? You look down on list and look what was before it. Ah, you were send there from living room! Why were you send? You look on list again…
And ‘stack traceback’ is like this list because it’s aim is to trace back things you were doing before something (error) happened. It’s called ‘stack’ because as you write on list things from top to bottom - computer remembers things in stack manner - the newest things are in top and the older ones are underneath

And what’s more you won’t be said what to do to fix error by text in console - it’s your (programmer job) to correct it.

Showing error must be minimalistic and essential thats why you just have basic informations (and that’s plenty). You get what failed, in which file and in what line.
You get informations like: you lost keys, you lost it in bathroom, it was next to bath tube and you get list of you latest actions from list to see what led you to losing your keys.

:slight_smile:

I just wish there were a “teacher” and a “school” that I can go to

here in my area. (Murrieta, Ca. USA) – (in the middle of San Diego and L.A.)

but I guess that’s a dream only.

The only way I can learn it’s on this forum

so for me, all the people that have helped me

are the greatest teachers in the world

the corona forum is the best school in the universe!

It might help you Victor to read this blog post:

http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

thank you Rob, that helps a lot.

I just nee more time…

everyday I learn a little bit more

thanks to all of you in Corona forum.

“Stack traceback” is a general computing term to do with a program’s memory. Roughly speaking it is a list of the function calls that the application was processing when an error occured (someone feel free to explain that in simpler terms if you can). I wouldn’t worry too much about that for now, just remember it means that an error has occurred.

“insert” is a function which all lua tables have. In your case, this could be because you are trying to insert an object into a display group which no longer exists. You may not be calling the function “insert” directly, but perhaps you are doing  something like this:

local myImage = display.newImageRect(myGroup, "myimagefile.png", 128, 128)

Adding a group to the parameters will cause the group to try and “insert” the object into itself. The same applies to inserting table rows into a table view, objects into a scroll view etc.

Now, in terms of reading the terminal my golden rule is: start at the top, and work your way down.

As you say, you see this line

[C]: in function 'insert'

which means nothing to you. However if you go down a bit more, you have this line:

ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:763

Presumably one of your files is called “recamara.lua”. The message is telling you that the error can be found by looking at line 763. Usually this line is the location of the error itself, however sometimes it is only the line where a function begins, and the error is somewhere within the function.

Thank you very much, I had a mis spelling in line 763.

so far so good. I keep working on my app.


one little thing about terminal…


I think that it’s a computer program, like any other.

and “someone” decided to write

– “Stack traceback”  – instead of “an error has occurred”

like in my case…

instead of

– ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:763: in function
<…ctormbarba/Desktop/Donde Esta El Gato 2/recamara.lua:224>

they could have written –

– in the file “recamara.lua, in line 763, you have this “scrollView:insert(ve)”, one way of fixing it is like this --scrollView:insert(ventanaSV)”

instead of speaking a language that one or two people can understand.


it’s just my humble opinion.


so if someone know that language and wants to be a millionaire, just write a plug in to translate from “terminal language” to “English”


I will buy that plug in, right now.

Sorry to disappoint you but all languages has error informations written like this and it’s is really minimalistic.

Your ‘stack traceback’ meaning is a bit wrong.

I’ll describe it for you.
Let’s say you lost your keys. So what will you do? You will try to remember what have been doing before. Let’s say you often lose your keys so you write all your actions on list. To find keys you look at the last position on list. You were in bathroom and next to bathtub. Why were you there? You look down on list and look what was before it. Ah, you were send there from living room! Why were you send? You look on list again…
And ‘stack traceback’ is like this list because it’s aim is to trace back things you were doing before something (error) happened. It’s called ‘stack’ because as you write on list things from top to bottom - computer remembers things in stack manner - the newest things are in top and the older ones are underneath

And what’s more you won’t be said what to do to fix error by text in console - it’s your (programmer job) to correct it.

Showing error must be minimalistic and essential thats why you just have basic informations (and that’s plenty). You get what failed, in which file and in what line.
You get informations like: you lost keys, you lost it in bathroom, it was next to bath tube and you get list of you latest actions from list to see what led you to losing your keys.

:slight_smile:

I just wish there were a “teacher” and a “school” that I can go to

here in my area. (Murrieta, Ca. USA) – (in the middle of San Diego and L.A.)

but I guess that’s a dream only.

The only way I can learn it’s on this forum

so for me, all the people that have helped me

are the greatest teachers in the world

the corona forum is the best school in the universe!

It might help you Victor to read this blog post:

http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

thank you Rob, that helps a lot.

I just nee more time…

everyday I learn a little bit more

thanks to all of you in Corona forum.