If you do
for (var i = 0; object_exists(i); i++) { show_debug_message(object_get_name(i)); }
(or sprite_exists / sprite_get_name for sprites)
Does this show all of your objects/sprites, or does it stop before the one you’re trying to use?