Mbed_event_queue fault exception on call_every()

Hi all,

I’m getting a hard fault exception when running this code: (the debug method will flush the serial buffer to ensure it prints before proceeding)

_com->debug("starting event queue stuff. %p", (void*)_queue);

    if (_timeout_ms != 0) {
        _timeout = _queue->call_in(_timeout_ms, this, &DCMotorState::onTimeout);
        _com->debug("done timeout");
    }
    _stallCheck = _queue->call_every(500, this, &DCMotorState::onStallTimeout);

    _com->debug("done stall");

This is the exception with some output:

D: starting event queue stuff. 0x20002a24
D: done timeout

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0 : 20013124
R1 : 200130E0
R2 : 00000000
R3 : 015AA508
R4 : 20013124
R5 : 20013128
R6 : 20002A68
R7 : FFFFFFFF
R8 : 00000000
R9 : 00000006
R10 : 00000000
R11 : 00000000
R12 : 0800F255
SP : 200029D8
LR : 0800B697
PC : 015AA508
xPSR : 00000000
PSP : 200029B8
MSP : 2001FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000001
UFSR : 00000000
DFSR : 00000008
AFSR : 00000000
Mode : Thread
Priv : Privileged
Stack: PSP

– MbedOS Fault Handler –

++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x15AA508
Error Value: 0x20003AAC
Current Thread: shared_event_queue Id: 0x200021D8 Entry: 0x80114A9 StackSize: 0x800 StackMem: 0x20002220 SP: 0x200029D8
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=P3EE01_E2_F411VE
– MbedOS Error Info –

No idea why this is occurring, I’m not sure if its on me or mbed, but I’m not too sure how to proceed with debugging as the error is not very descriptive