That sort of thing can certainly happen in software development. The tough part is figuring out what WAS the problem. If you can identify the root cause, at least you've learned something (and maybe you can write down notes in case you forget). In theory, next time you find a similar problem you won't have to spend so much time on it.Oh boy I was trying to use a Pool Manager for my Projectiles in Unity and instead of Despawning they Destroyed themself in the Second Spawning Wave.... I spent about 16hours trying out everything with no Success... unitl I recreadet my Bullets and now they dont Destroy themself anymore. This makes no sense because they are exactly the same!
The saddest part is that i feel no relief but anger spending so much time on fixing something that makes only a small aspect of the overall game...
Are there others here who experienced similar things?
There may also be good general practices, like certain coding styles or design methodologies, that can help prevent certain problems from occurring. That's probably a huge topic on its own though.