SetVectorParameterValue throws exception for UMaterialInstanceDynamic after load, called by a TimerManager managed timer.

Weird thing is that if my UMaterialInstanceDynamic instance is instantiated in the same timer function, then call SetVectorParameterValue(…) succeeded, and I can see the material changed. However, after I add this variable as a class member, and init it in constructor but call it in timer function, it fails with the following exception.

Description:

  1. exception message: Access violation reading location. 0xFFFFFFFFFFFFFFFF.

  2. code line: Runtime\Core\Private\HAL\MallocTBB.cpp:106

  3. Called by SetVectorParameterValue called of a UMaterialInstanceDynamic* ptr which is initialized in the Actor’s constructor, and the material.

  4. Upper call stack: TimerManager managed timer, call this function.

I have no idea what is wrong, any help?