"attempt to index field 'parent'" error in device

I am getting this error repeatedly on device. 

?:0: attempt to index field ‘parent’ (a nil value)
stack traceback:
    ?: in function <?:476>
    ?: in function <?:218>

This happens when I am about to change to a new scene(in director class). 

Since the error does not give any stack information or line numbers unlike other errors, I am assuming this has something to do with in-built code… probably widgets( I am using buttons,.a spinner and a scrollview in this particular scene). Not sure if I am right or wrong.

Any help please? 
Why does this error occur?

Bumping! 

Any thoughts on this error?

With your buttons, are you taking actions when the button is first pressed or when it’s released?

If you are deleting the widgets, as you move to another scene, it’s best to take action on the release. Otherwise, when you do release it will attempt to call a function that is no longer there because you have selected the widget and you will get error like this.

In this particular scene, all widget actions are on onRelease only

can you explain the code snippet from the ‘parent’ variable?

There is no “parent” variable which I am using. 

The error is probably from in-build Corona code, as I mentioned before. 
So we do not know what code causes the error.

I agree then. but without any code helping, no one can understand this error, except the staffs :slight_smile:

as @elbowroomapps has mentioned, you should probably check for any actions being done before moving to another new scene. deleting buttons, destroying images, etc. It could be that you want to clean them, but the function runs after you change scene, and already purge those objects, which resulted in a nil value, because the objects they’re instructed to remove is already gone.

The problem is I cannot replicate this error in the simulator. 

I got this error in a published app, so am unable to pinpoint the error :frowning:

so this error will not happen on the simulator?

that is strange indeed. :( 

how do you detect this error? via console with the device plugged in?

It is a published app. 
I detected the error using gameanalytics and Flurry.
I can’t seem to replicate the error myself, be it device or simulator. 

Bumping! 

Any thoughts on this error?

With your buttons, are you taking actions when the button is first pressed or when it’s released?

If you are deleting the widgets, as you move to another scene, it’s best to take action on the release. Otherwise, when you do release it will attempt to call a function that is no longer there because you have selected the widget and you will get error like this.

In this particular scene, all widget actions are on onRelease only

can you explain the code snippet from the ‘parent’ variable?

There is no “parent” variable which I am using. 

The error is probably from in-build Corona code, as I mentioned before. 
So we do not know what code causes the error.

I agree then. but without any code helping, no one can understand this error, except the staffs :slight_smile:

as @elbowroomapps has mentioned, you should probably check for any actions being done before moving to another new scene. deleting buttons, destroying images, etc. It could be that you want to clean them, but the function runs after you change scene, and already purge those objects, which resulted in a nil value, because the objects they’re instructed to remove is already gone.

The problem is I cannot replicate this error in the simulator. 

I got this error in a published app, so am unable to pinpoint the error :frowning:

so this error will not happen on the simulator?

that is strange indeed. :( 

how do you detect this error? via console with the device plugged in?

It is a published app. 
I detected the error using gameanalytics and Flurry.
I can’t seem to replicate the error myself, be it device or simulator. 

Did you ever find a solution to this? I’m having the exact same issue (in the simulator and device).