Instance Creation Order does not seem to apply, causes YYC version to crash when referencing instances

F

fieryprophet

Guest
I have an issue where no matter how much I drag the instances in question around the instance creation order panel of the room editor that it never changes the actual instance ID and while the VM version of my game has no issues the YYC version complains constantly about not being able to find the instance. I've made changes to the instance itself hoping it would overwrite its order but it still refuses to spawn before the dependent instances.

1600115846194.png

instance_menu_new_game_digits_less and instance_menu_new_game_digits_less both refer to instance_menu_new_game_digits but it has a higher instance ID anyways (100038 vs 100036 and 100037 for the lower instances)

I added an instance_exists() around the offending lines and it STILL blows up on YYC, but not on VM

1600120510433.png

___________________________________________
############################################################################################
ERROR in
action number 1
of Mouse Event for Left Pressed
for object object_menu_new_game_digits_more:

Unable to find any instance for object index '100038' name '(null)'############################################################################################
gml_Object_object_menu_new_game_digits_more_Mouse_4 (line 7)
gml_Object__object_gui_text_Step_0 (line 22)
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
If the issue is in the left pressed event tnen it has nothing to do with the instance creation order, as that would only cause an issue in the create event... So you should be looking elsewhere. Did you clear the compiler cache before compiling with the YYC? It's the "broom" button at the top of the IDE.
 

TheouAegis

Member
Isn't that the error format for when you deactivate or destroy an object and then try to reference it in the same event?
 
F

fieryprophet

Guest
If the issue is in the left pressed event tnen it has nothing to do with the instance creation order, as that would only cause an issue in the create event... So you should be looking elsewhere. Did you clear the compiler cache before compiling with the YYC? It's the "broom" button at the top of the IDE.
I did clear the cache and still the same error.

Isn't that the error format for when you deactivate or destroy an object and then try to reference it in the same event?
These instances are not being deactivated or destroyed at any point, they are in the same room together from the outset.
 

Amon

Member
Try setting up another object that creates the instances in the order you want them created.
 

Roldy

Member
1. Show all the code for this event.
2. For a sanity check, in the create event for these instance have them print their id's so you know what is going on.
3. I am guessing you are fixated on the wrong thing and it is a different instance blowing up (e.g. instance_menu_new_game_controller)
 
F

fieryprophet

Guest
1. Show all the code for this event.
2. For a sanity check, in the create event for these instance have them print their id's so you know what is going on.
3. I am guessing you are fixated on the wrong thing and it is a different instance blowing up (e.g. instance_menu_new_game_controller)

1600156533157.png

I had it output the IDs and they matched what the debugger said they were. Again, the code works perfectly fine on the VM version of the game, it only blows up with the YYC version.
 

Roldy

Member
View attachment 34346

I had it output the IDs and they matched what the debugger said they were. Again, the code works perfectly fine on the VM version of the game, it only blows up with the YYC version.
Again, if instance 100038 exist at the time of code you wouldn't get the error.

This is occurring during the Step event of object_gui_text calling the mouse move event of an instance of object_menu_new_game_digits_more.... show your code. How did the step event of object_gui_text call mouse move of object_menu_new_game_digits_more/less

Unable to find any instance for object index '100038' name '(null)'############################################################################################
gml_Object_object_menu_new_game_digits_more_Mouse_4 (line 7)
gml_Object__object_gui_text_Step_0 (line 22)
Do not post images of your code:

use the </> code formatting tool provided when making post in this forum.

Show your code and the full error. Describe, step by step, the actions taken that lead to the error. If you are unable to do so, then create a simple and small stand alone project that reproduces the error with no user input. Either process with help illuminate the actual problem.
 
Last edited:

samspade

Member
View attachment 34346

I had it output the IDs and they matched what the debugger said they were. Again, the code works perfectly fine on the VM version of the game, it only blows up with the YYC version.
If you're using a with at the end, why not wrap the entire thing in a with statement? They have implicit existence checks as well.

Also @Roldy is right, if it says it doesn't exist, it doesn't exist. In theory it could be a bug, but the chance of that is exceedingly low and you are much better off believing the error message and trying to figure out why it doesn't exist. If you haven't already, you should run this in the debugger (with real time debugging turned on) and see what is there. It would also be helpful to put a few breakpoints in - such as right at the start of this block of code, so that you can examine the room state at that time.

I'm not sure if this would work, but you could try creating a clean up event for this object as well and putting a break point in it, then running in the debugger. I believe that would trigger if the object got removed at any point. It may not be perfect, but it might at least tell you when it was getting removed (assuming it exists in the first place).
 
Top