I am having the same issues. I my case I read samples OK in a very short test, but it was only when I tried a fast loop to see haw many times a second I could read the sensor (thinking about trying real time motion tracking - 120 samples per second) that I experienced the freezes. My tight loops have completed 20,000 reads before lockup, but have also locked up at 9,000 reads. This is using Arduino GUI 1.0 release and the updated wire libraries that it comes with.
Looking around the web produces a LOT of issues that seem to be related to the Arduino wire library. Seems like it has bugs, and also “blocks” ie waits forever in some situations for a response. This is a big issue for the people with helicoptors as this causes expensive crash!
I have only just run into this issue and started looking, so don’t have any solution yet. Things I can see are:
a lot of issues with the Arduino Wire lib
apparently the additon of I2C (and maybe other functions) to the Wire lib has made it large and unwieldy and buggy
many requests & suggestions to modify the wire lib
3rd party I2C libs
I2C libs that are assembly - ie you have to do all your code in assembly…
This is as far as I have got and was checking back here for more ideas when I found your post. I’ll post any updates as I (hoepfully) progress.