I2C not readable after executing code that returns OS Error

I’ve written a program that uses an MCP4725 DAC to send a voltage to a motor controller. If it returns an OS error of any sort (I’m still troubleshooting some of the code), then that bus becomes unreadable using i2cdetect until I unplug the DAC. I just get all “–” for everything and it takes longer to load.

I’d like to be able to reset the i2c remotely since this is a remote-operated bot. I also want to understand the behavior. Can anyone advise?

Duplicate topic with 253919