Requesting Help With a Bug

For a really long time, there has been a bug in the game that made the player unable to pick up items or interact with characters. People have been reporting this bug for years, but I’ve never been able to replicate it, because it only occurs under hyper-specific circumstances that take a long time to reproduce.

Today, someone finally provided a set of relatively simple steps that allowed me to encounter the bug. After years of hearing about it but never being able to experience it, I have finally reproduced the bug for the first time…

…and I’m definitely going to need some help with this one.

This bug is different. This bug is weird. This is, like, the Final Boss Battle of bugs.

I am definitely not going to be able to solve this one without the help of a Unity generalist who has a deep understanding of the inner workings of Unity, because I think the problem is occurring within Unity itself, rather than an issue that is specific to a situation within Yandere Simulator.

If you are a Unity expert, or if you have an extraordinary amount of time on your hands to help me test various scenarios that may help me reproduce the bug faster, click Continue Reading.

I will describe the only steps that have ever allowed me to encounter the bug. (I think that the 5th step is perhaps the most important step and that the first 4 steps may not even be necessary, but that’s something I can’t confirm at this point in time.) The steps are as follows:

  1. Grab the Magical Girl Wand from the Drama Club
  2. Kill the President of Gardening Club with the wand
  3. Put his body behind the gardening shed
  4. Put the wand behind the gardening shed
  5. Use the Pass Time feature on Ryoba’s phone to fast-forward time to 3:30 PM. (This requires the passage of more than 10 real-life minutes.)

From that moment forward, you will be unable to interact with anything that normally has a button prompt attached to it, and students will stop reacting to anything you do.

Here’s a video of someone making the bug happen:

After triggering the bug and checking what is happening in some of the scripts, I can explain what is happening, but I cannot explain why it is happening.

After following the above steps…

Raycasts stop detecting colliders.

Yes, that’s right. After triggering the bug, almost any raycast that is fired at a collider will not report that it is hitting the collider.

Don’t know what a raycast is? I’ll explain. To allow the player to grab a pickup, the game fires a raycast from the protagonist’s head to the nearest pickup. If the raycast hits the collider of the pickup, the game gives the player the option of grabbing that object.

(Similarly, a student shoots a raycast out of their eyes at the player in order to confirm whether or not the player is currently visible or is hidden from sight.)

This feature functions perfectly until the player follows the set of steps outlined above. From that moment onward, raycasts stop detecting colliders.

…but only some of the time, which makes this whole situation even weirder.

Questions You Might Have

Let me take a moment to pre-emptively answer a few questions that some of you might have.

Does the console report any errors?

No. Even after the bug has occurred, not a single red error symbol appears in the console output. Unity does not report any errors at all.

Is there something unique about the magical girl wand that would cause this bug to occur?

No. The magical girl wand was created by duplicating a baseball bat and changing its model. It is functionally identical to any other long blunt weapon in the game. In fact, I theorize that the bug can occur through the use of any weapon, not just the magical girl wand. (However, I would need someone to test this theory for me before I could begin stating it as a fact.)

Is there something unique about the President of the Gardening Club that would cause this bug to occur?

No. I believe that he was included in the bug’s repro steps because he is the easiest student to kill (alone and far away from any witnesses). I think that you could substitute any other character while following the steps to reproduce the bug, and get the same results. (However, I would need someone to test this theory for me before I could begin stating it as a fact.)

Is there something unique about the area behind the gardening shed that would cause this bug to occur?

No. That’s just the most convenient place to put the Gardening Club President’s corpse to avoid the possibility that someone will discover him. (However…you guessed it, I need someone to test this theory.)

What does the “Pass Time” feature do?

It increases the speed of time to 5x the normal speed. In other words, Time.timeScale = 5. It does this until the schoolday has advanced to the point in time that the player desires.

Are the pickup colliders are changing in some way between 7:00 AM and 3:30 PM?

No, not in the slightest. I compared the pickup colliders before and after the bug, and they’re the exact same. The colliders do not shrink or disable or change position or anything else along those lines.

Are the pickup objects switching to a different layer between 7:00 AM and 3:30 PM?

Nope. Before and after the bug, the pickups are still on the same layer that they always are.

What other circumstances does this bug occur under?

This bug will also occur if the player is attempting the Alphabet Killer Challenge, which involves killing 89 students in a specific order. The bug occurs after killing 27 students. If I kill 27 students with debug commands, I don’t get the bug. So, something about MANUALLY killing 27 students is what causes the bug. It takes a long time to kill that many students. So, once again, we find that the passage of a lot of real-life time seems to be key to making this bug happen. Perhaps it’s somehow making Unity’s raycasting system break?

Is there something special about 3:30 PM that would cause this bug to occur at that time?

I don’t think so, but between 7:00 AM and 3:30 PM, the game performs many operations, so something happening over the span of that 8.5-hour period may be contributing towards the bug. Actually, I don’t know if the “raycasts stop detecting colliders” bug happens exactly at 3:30 PM or sometime prior to 3:30 PM. I would need someone to test this. However…

Important Facts

If I use debug commands to skip directly to 3:30 PM, the bug does not occur.

It appears that the bug only occurs if the player reaches 3:30 PM using the Pass Time feature.

This causes me to wonder if Unity’s raycast detection system is somehow dependent on timeScale, meaning that if the player spends a long amount of time at an accelerated timeScale, the raycast detection system will become unreliable and stop detecting colliders. But, I have no way to prove this without very extensive testing.

It may be possible that the bug also occurs if the player stands perfectly still for 8 hours and 30 minutes, allowing the clock to reach 3:30 PM naturally. But it would require literally hours of real-life time in order to test this.

The bug might actually be occurring around 3:00 PM, or 2:00 PM, or maybe even sometime prior to 12:00 PM. However, someone would need to test this in order for me to know it for a fact.

Okay, now that I’ve gotten the basic information out of the way, it’s time for some of the really weird facts about this bug…

The Weirdness

If I instantiate a cube and put it in-between the protagonist’s raycast and the object they’re raycasting at…

…the raycast reports that it hit a colllider, and can print out the name of the object that the collider belongs to (“Cube”). It just can’t detect any colliders of any objects that existed from before the bug occurred. What do we conclude from this? Perhaps Unity’s raycasts lose the ability to detect objects that have existed in the scene for a long time? Well, it gets weirder…

If I delete the pickup’s collider and then give it a new collider, the raycast can detect it, and I can grab the pickup like I’m supposed to be able to.

However!

After a short span of time, no raycast will be able to detect that collider anymore.

How much time? I’ve tested twice, and it was different on both occasions:

The first time, it was exactly 120 frames. The second time, it was exactly 60 frames.

It’s weird that it wasn’t the same span of time on both occasions, but…the fact that it was a denomination of 60 on both occasions? Okay, that can’t be a coincidence. That is probably part of the puzzle right there.

Oh, and one more thing. Even after this bug has occurred, raycasts can still connect with door colliders and let the player open and close doors. The difference between door colliders and pickup colliders? Door colliders are marked as “static” objects. So, maybe this raycast bug only affects non-static colliders?

Conclusion

I’ve been working on Yandere Simulator for 7 years, and working in software development for over 10 years. In all that time, I have never encountered a bug like this.

  • Making the bug happen requires standing still for more than 10 real-life minutes.
  • To confirm if it happens without the Pass Time feature, you’d need to stand still for hours of real-life time.
  • The bug appears to break the basic functionality of the game engine (Unity) rather than causing script errors.
  • It’s possible to make the game return to normal, but only for 1 or 2 seconds before the bug returns.

I wasn’t kidding when I called this the “Final Boss Battle” of bugs. This is some weird stuff right here.

I’m sorry to anyone who is affected by this bug while attempting the Alphabet Killer Challenge, but…this bug is absolutely NOT getting fixed unless I get some help figuring it out.

So, how can you help? Well…

Testing Requests

The speed of a bug getting fixed is directly proportional to the amount of USEFUL information I am receiving about the bug. When someone says something like, “I encountered a bug, but I don’t know what made it happen,” I am being provided with ZERO meaningful information that helps me replicate the bug and begin searching for the cause of it.

The only reason I was able to learn anything about this bug today was because someone finally – after several years – gave me a clear, concise set of steps to reproduce the bug easily.

It’s a bug that takes over 10 minutes of real-life time to trigger, and will probably be encountered by less than 1% of all players. It is simply not pragmatic to spend my time attempting to trigger and investigate a bug like this one. In the span of time it would take me to trigger the bug once, I could fix multiple regular bugs. It’s just not smart for me to spend a bunch of my time trying to fix this one.

If you are personally being affected by this bug and you really want to see it get fixed, you’re going to need to do some research for me – and because it involves over 10 minutes of standing still, most of it will be extremely tedious.

This is the information I need:

  • Does this bug require the use of the magical girl wand, or can it be triggered with any weapon?
  • Does this bug require you to kill the Gardening Club Leader specifically, or can it be triggered upon any character’s corpse on school grounds for an extended amount of time?
  • Can this bug happen even if a corpse is disposed of, or does it only happen if a corpse is left lying on the ground for over 8 hours of in-game time?
  • Does the bug occur even if there is not a corpse present for a long period of time?
  • Does this bug only occur through the use of the Pass Time command, or can it occur by just standing still for 8.5 hours of in-game time?
  • Does it really require 8.5 hours of in-game time, or does it actually require substantially less time than that for the bug to trigger?

If you would be willing to make numerous attempts to deliberately trigger the bug under varying circumstances to find out the exact criteria that triggers the bug, I might be able to make some more headway towards fixing it.

However, even though I would really like to understand and fix this bug…I’m putting this one at the absolutely bottom of the priority list, considering the fact that almost nobody is ever going to run into this one.

By the way! If you’re a programmer / software engineer / Unity specialist, and you know what’s going on here…for the love of God, please tell me. This bug has become my god damn “White Whale.”

Thanks for coming to my TED Talk.