Understand fault handler

thank you for all the advice so far!
so I’ve now been able to get the parser to work and have the following output

Crash Info:
        Crash location = SHT$$INIT_ARRAY$$Limit [0xFFFFFFFF] (based on PC value)
        Caller location = SHT$$INIT_ARRAY$$Limit [0xFFFFFFFF] (based on LR value)
        Stack Pointer at the time of crash = [1FFFDBE4]
        Target and Fault Info:
                Processor Arch: ARM-V7M or above
                Processor Variant: C24
                Forced exception, a fault with configurable priority has been escalated to HardFault
                MPU or Execute Never (XN) default memory map access violation on an instruction fetch has occurred

I think I understand the that most important information is:

MPU or Execute Never (XN) default memory map access violation on an instruction fetch has occurred

and the lines of my code it gets angry at are:

 if (diffx[store] >= 0) { dirPin[0] = 1; }
 else if (diffx[store] < 0) { dirPin[0] = 0; }
 if (diffy[store] >= 0) { dirPin[1] = 1; }
 else if (diffy[store] < 0) { dirPin[1] = 0; }

does anyone know why this might cause this error to occur?

many thanks
George