If you have done embedded design for any amount of time you most likely have found yourself in I2C hell. It has gotten to the point for myself that I avoid I2C parts if at all possible.
I2C Hell
If you have not done embedded design for long let me tell you what I2C hell is through an example.
Lets say you have an I2C EEPROM, these are cheap and common. So you write your driver for the EEPROM and life is good, everything is working great. One day you are debugging your code and you hit the reset button, after which the EEPROM no longer works. So you start debugging your code and it just will not work. Out of frustration you figure the EEPROM is bad and swap to a new board and life is good. You tell your buddy that the other board has a bad EEPROM chip, to show him you power it up and to your amazement it works perfect.
At this point the young engineer says "that is an anomaly" while the old engineer says "there is not such thing as an anomaly. Anomaly are just bugs you don't understand yet!"
So your EEPROM bug most likely was that you hit reset, or restarted debugger, during the middle of an I2C transaction with EEPROM. So the EEPROM is waiting on another I2C clock pulse. So when you restarted the program the EEPROM was now out of sync with the micro. So you start getting NACK errors and framing errors on the I2C bus.
The I2C specification does have a means to reset the bus, specifically if you send 9 I2C clock pulses to an I2C device it is suppose to reset it. However there a lot of I2C chips that do not support this, very few even document if they do or not.
So now you say well since this only happens when I stop debugger or hit reset during an I2C transaction it is a not a problem. Specifically the user will not be doing that so they will never get out of sync. You are correct the odds are much lower that it will not happen, but I assume you did turn on the watchdog timer? The watchdog timer could reset the board at any point in time, thus this problem can occur in customer units.
Note many devices have hard wired batteries these days, as such if this did happen for a customer there is nothing they can do but return the defective unit. Most likely by the time the defective unit gets to an engineer to determine the problem the battery has died. So when he powers up the unit it works perfect and you have another "no problem found" return.
The only way I have found to be sure that you do not have this problem in the field with customer units is to make sure you can reset I2C devices. More often than not this means implementing a power switch for the I2C devices to power them off and back on. Keep in mind when you power a chip off you have to make sure all the pins on that device go low (to ground). For example if the I2C clock and data pins are still high when you cut power to you chip it may not power the chip off as the I2C pins could back feed power.
This powering off the I2C chips often takes more board real estate than the I2C chip itself. Additionally some chips like battery fuel gauges have no easy method to power off. So on these chips you have to test that they do accept the 9 clock reset and make sure your I2C driver supports this.
Note that I have seen this same problem on some SPI parts. At one company they had a custom ASIC designed. The integrated the LDO and lots of glue logic into the ASIC to reduce the cost of the device. As it turns out the SPI bus would lock up in the same manner. The only fix was to kill power to ASIC and turn it back on. Since it had the LDO to power micro and glue logic we had to add that hardware back on the board.
As you see I2C is hell and why I try to avoid I2C parts. This points out that it might be a good idea to test your I2C parts as to what happens when you stop in the middle of a transaction and if the do respond to the 9 clock reset or not.
Note generally what I have ended up doing is in the code, the first thing I do is power off all the I2C chips. Then I power them back on. This way on every reboot I start with the chips in a known state. This solves most of the I2C hell problem. I do have my I2C drivers logging errors and attempting the 9 clock reset. When this does not work, I will try power cycling I2C chips. When that does not work there is not much left to do than do a watchdog (hard) reset and hope you can recover.