Using RTC on ESP32 stops threads

I have started a thread (using the built-in thread() function) which runs and prints fine (a simple one just using print() to get started). I then connect to my WiFi successfully. But as soon as I call rtc.set_utc(timestamp) the running thread stops and I can’t start new threads.

I want to run a thread that uses some of the RTC functions (amonst other things).

Are sure that the RTC code has no runtime errors.
For instance, could you try running the RTC Keep Time example
, if it runs correctly, Make a thread and call that thread.
Then if there are errors, we can start debugging from there.