Memory Permission Error 034143C0

Hello! I’ve just started using VexCode V5 Pro for programming our robot, and have been using it fine up to this point, but I have run into a critical point of failure with my code. Based on some other notes in this forum, it seems like the ‘Memory Permission Error’ has appeared in many shapes and sizes, each with its own number. They all usually relate to pointers, of which I am not using. Is there something I’m missing here? I feel like this is a massive noobie mistake on my part.

You can find the code here if you want to take a look:

I have deducted through some debugging that the problem lies in the rotgyro.cpp class, because whenever I comment it out, the issue stops. That being said, it is related to the object instantiation because when assigning an empty RotGyro object, it doesn’t break, but as soon as I assign it to something it breaks. I’ve tried removing the constructor to no avail, I’ve tried having an empty class definition to no avail and am feeling quite confused as to what is going on here. It will also arbitrarily work sometimes which I find curious. Any tips would be greatly appreciated. Thank you!

same answer as I posted earlier.

main includes the RotGyro class which uses a sensor (rotGyro) that probably does not yet exist (because global constructors from main.cpp will most likely run before globals constructors in robot-config.cpp)

The number is the memory address of the bad access, that’s why it’s almost never the same.