bad argument #-2 to 'insert' (Proxy expected, got nil)

Good Morning,

I’ve made some changes to my startup code in one of my games and no I’m getting this error message.  It is directly related to purging/ removing scenes.  If I take this code out this error goes away.

storyboard.purgeOnSceneChange = true

I don’t want to take this out for memory management reasons.

I’ve seen this error documented multiple times via google but I’ve never seen a defintive answer as to what the issue is or where I should be looking.

I have another game I’m working on where the purge scene is set to true and I am not having this problem.

Can someone give me a clue?

Thanks,

Arthur

When a scene is purged, it’s removeScene() function is called.  Perhaps you have something in the problem app’s removeScene() that you don’t have in the other app that’s generating this issue.

Rob

Hi Rob, I don’t have a removeScene in either module. I have create, enter, exit and destroy. Thanks Arthur

Sorry about that… too early in the morning.   “destoryScene”…  the even that is called when scenes are destroyed…

Thanks Rob, I don’t do anything in destroy scene. It is an empty function? I’m at a loss as to how I even go about debugging this. Any idea on what values I should display! Arthur

I don’t know how committed you are to Storyboard, but upgrading to Composer might address this.  Composer is “Storyboard 2.0” so many of the concepts are the same.  It’s not backwards compatible, so you will have to make some code adjustments.  We are deprecating Storyboard in favor of Composer, so it’s now the officially supported scene manager.

Rob

Hi, I can’t afford to switch now. U guys came out with composer after we already were 2years into development of our game. All future games will be in composer, but we r stuck with storyboard for now. Any ideas on how I can debug this? Thanks Arthur

Hello?

Can I please at least get some debugging advice.  I’ve tried to make my startup the same as my other game but I am still running into this issue.  If I set

storyboard.purgeOnSceneChange = true

The scene blows up when I come BACK to it.  First time is fine but when I come back to it I get that error message above.

I’ve gotten a lot of hits on google for this error message, but I never see the issue resolved where they left

storyboard.purgeOnSceneChange = true

Arthur

Post some code?

Hi Rob,

I don’t think posting code would have been helpful since it is three modules and close to a 1,000 lines of code.

Anyway I resolved the issue this morning.  I ripped out all of the code in the create scene section and added it back in piece by piece until it broke again.

At the end of the day think this was a scope issue.  The only changes I made had to do with what was local to certain sections of code. When I made everything local within the entire LUA file the issue went away.

Regards,

Arthur

When a scene is purged, it’s removeScene() function is called.  Perhaps you have something in the problem app’s removeScene() that you don’t have in the other app that’s generating this issue.

Rob

Hi Rob, I don’t have a removeScene in either module. I have create, enter, exit and destroy. Thanks Arthur

Sorry about that… too early in the morning.   “destoryScene”…  the even that is called when scenes are destroyed…

Thanks Rob, I don’t do anything in destroy scene. It is an empty function? I’m at a loss as to how I even go about debugging this. Any idea on what values I should display! Arthur

I don’t know how committed you are to Storyboard, but upgrading to Composer might address this.  Composer is “Storyboard 2.0” so many of the concepts are the same.  It’s not backwards compatible, so you will have to make some code adjustments.  We are deprecating Storyboard in favor of Composer, so it’s now the officially supported scene manager.

Rob

Hi, I can’t afford to switch now. U guys came out with composer after we already were 2years into development of our game. All future games will be in composer, but we r stuck with storyboard for now. Any ideas on how I can debug this? Thanks Arthur

Hello?

Can I please at least get some debugging advice.  I’ve tried to make my startup the same as my other game but I am still running into this issue.  If I set

storyboard.purgeOnSceneChange = true

The scene blows up when I come BACK to it.  First time is fine but when I come back to it I get that error message above.

I’ve gotten a lot of hits on google for this error message, but I never see the issue resolved where they left

storyboard.purgeOnSceneChange = true

Arthur

Post some code?

Hi Rob,

I don’t think posting code would have been helpful since it is three modules and close to a 1,000 lines of code.

Anyway I resolved the issue this morning.  I ripped out all of the code in the create scene section and added it back in piece by piece until it broke again.

At the end of the day think this was a scope issue.  The only changes I made had to do with what was local to certain sections of code. When I made everything local within the entire LUA file the issue went away.

Regards,

Arthur