• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

SOLVED Could someone give me some insights on why my children were acting weird?

flyinian

Member
Did I get you with the title? :banana:

I'm just looking for insight on why my children were acting "weird" for a lack of a better word.


UPDATE:
1. The children within question all have the event_inherited(); at the top of each event.

2. I have other children with the same parent and those work fine.

3. All other code is inherited and works fine while the draw code doesn't want to inherit a specific variable that is used for sub image. Again, this code works fine with other children.

4. if I over ride the code that isn't working within the child, it works as intended.

5. I've cleared the cache.

6. I've been having this problem for a few days now and I've been able to fix it by duplicating a working child and using it to replace the broken child. This can be a hit or miss for it to work. if it doesn't work, I pick a different child that works and repeat the process as mentioned before until it works. This is literally changing nothing but, the object itself..as far as I know.


Prior to this post, I've managed to find a solution/temporary fix to this issue so, I'm not in a need of help but, I'd like to know what may be causing this or if anyone else has experienced this. I'm thinking this may just be one of those things that there is no answer to or it's either a bug of the IDE. Either way, I'm glad I can fix it.



ORIGINAL:
Parent : worked
Child 1 : Worked
Child 2 : Broken
Child 3 : Broken
Child 4 : Worked
Child 5 : Worked

Child 1, 4 & 5 worked fine while child 2 & 3 weren't working properly.

I was having issues with updating a sub image of an instance when arguments were met. This code was placed in the parent and inherited by the children. They all had the inherit code.

After about 2 or so hours I decided to recreate the broken children by duplicating a child that worked.

I initially duplicated child 1 and it wasn't working properly when used as a replacement for child 2. So, I used a different child that worked, duplicated it and renamed it and tested to see if it worked and it did. I repeated the steps for child 3 and it worked. Retested the children and so far the issue I was having has been fixed.

Everything was identical besides a few variables that were used for data retrieval(Different for each child and shouldn't have any effect on the sub image updating. I also copy & pasted variables from the working children into the broken children and didn't change anything.). This includes the object's names. The broken children name's were replaced with something else.

Could someone enlighten me?
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
This sounds very like a cache issue. GM will cache files so that compiling is faster, but sometimes the cache can become "stale" and cause very weird issues, just like this one. Normally, the first thing you should do when you encounter any weird issues like this is to clear the compiler cache using the "broom" icon at the top of the IDE. This will then mean that the next run of your game will be a clean one, creating a new cache, and hopefully resolving this kind of issue.
 

flyinian

Member
This sounds very like a cache issue. GM will cache files so that compiling is faster, but sometimes the cache can become "stale" and cause very weird issues, just like this one. Normally, the first thing you should do when you encounter any weird issues like this is to clear the compiler cache using the "broom" icon at the top of the IDE. This will then mean that the next run of your game will be a clean one, creating a new cache, and hopefully resolving this kind of issue.
The funny thing is that I thought it might have been a cache issue but, I was like, "nah" and yeah....Thanks for the enlightenment. I'll probably just clear cache on a more frequent basis now.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
It might not have been, but from the description of the issue it certainly sounds like the kind of thing associated with a stale cache...
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
Is there any downsides to frequent cache clearing? Besides longer compile times?
No, none... although when you're working on a large game longer compile times is a pretty major one!

My basic rules of thumb are:
  • Clean the cache before doing a YYC test or build (YYC is very sensitive to cache issues).
  • Clean the cache before doing a full EXE build.
  • Clean the cache when anything weird happens.
  • Other than that, don't bother. :)
 

flyinian

Member
No, none... although when you're working on a large game longer compile times is a pretty major one!

My basic rules of thumb are:
  • Clean the cache before doing a YYC test or build (YYC is very sensitive to cache issues).
  • Clean the cache before doing a full EXE build.
  • Clean the cache when anything weird happens.
  • Other than that, don't bother. :)
Sounds good. Thanks for the information.
 

flyinian

Member
How has this thread not devolved even the slightest with such a great topic title?
I know, right. I was expecting at least one person to take the title for a ride. Nocturne already did in the profile update that I posted so, there's that....I probably killed the chance when I marked it solved.
 

flyinian

Member
This sounds very like a cache issue. GM will cache files so that compiling is faster, but sometimes the cache can become "stale" and cause very weird issues, just like this one. Normally, the first thing you should do when you encounter any weird issues like this is to clear the compiler cache using the "broom" icon at the top of the IDE. This will then mean that the next run of your game will be a clean one, creating a new cache, and hopefully resolving this kind of issue.
So, I've fixed the original problem I was having. However, I now have a group of children not inheriting a specific code/variable while the other groups are. Every child group have the same parents but, exists in different rooms. I've double checked the code and all looks good. The "event_inherited();" are in place. I'm at the point where I may just recreate the objects that are in question. Do you have any ideas what may be causing this? Assuming It's not user error.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
So, I've fixed the original problem I was having. However, I now have a group of children not inheriting a specific code/variable while the other groups are. Every child group have the same parents but, exists in different rooms. I've double checked the code and all looks good. The "event_inherited();" are in place. I'm at the point where I may just recreate the objects that are in question. Do you have any ideas what may be causing this? Assuming It's not user error.
Tbh, if recreating the objects resolves things, then this does actually sound like it is a bug with the inheritance system... You should make a YYZ of the project then file a bug with YYG and get them to look at it.
 

Nidoking

Member
I'm going to suggest that user error is more likely. Could you provide an example of a variable that's not being inherited the way you expect? The only way someone will be able to find the problem is if you post the part of the game that has the problem.
 

flyinian

Member
Tbh, if recreating the objects resolves things, then this does actually sound like it is a bug with the inheritance system... You should make a YYZ of the project then file a bug with YYG and get them to look at it.
Okay, Ill recreate the children in question and see what happens. Thanks for the reply.
 

flyinian

Member
I'm going to suggest that user error is more likely. Could you provide an example of a variable that's not being inherited the way you expect? The only way someone will be able to find the problem is if you post the part of the game that has the problem.
I would post code and all that good stuff but, I'm not sure where to start. Which is a big problem for me for a lot of my problems I face when coding.

I'm going to recreate the children that are in question and see what happens and then I'll proceed from there.

Thanks for the reply.
 

Nidoking

Member
I would post code and all that good stuff but, I'm not sure where to start. Which is a big problem for me for a lot of my problems I face when coding.
The place to start is to identify:
  • Something that you want to happen in your game that is not happening.
  • What is happening instead of the thing you want to happen.
  • What parts of your game are intended to cause the effect you want.
I see that you've updated your post with more information, still very non-specific. So I'm going to say it again. If you would like any specific help, you will need to provide an example of one of the working objects, and the parts that are being inherited correctly, as well as an example of one of the non-working objects and the corresponding parts that aren't working correctly. Concrete details are absolutely required to discuss a problem like this. If you've made a mistake somewhere, we can't see it. We literally cannot see it because it is not here for us to see. Your vague descriptions are not enough to work with.
 

flyinian

Member
So...it appears to be working as intended now. Idk, what I did exactly to fix it. I guess recreating the children in question and brute force fixed the problem.

The only thing I did was recreate the children in question and deleted a small group of code that was commented out.

I may look into submitting a bug report.


@Nocturne Thanks for the help.
@woods Heck, I think they were adopted saboteur kids.
@Nidoking I appreciate the replies and I think initially I was just trying to find common problems and/or known bugs that may cause the issue I was having. I also wasn't looking for a lot of help because I wasn't sure where to start on explaining the issue I was having at the moment and I guess I was hoping it was something small and simple to fix. My thought process was that if code from a parent worked in children 1 - 5 then children 6 - 10 should work the same.

Thank you for the replies.
 
Top