Add some checks into setData():
- check if index.isValid()
- check if the internal pointer is correct
and finally
- don't call reset() inside setData - what sense does it make to do that? You should emit dataChanged(index) here, not reset the model...
After you do that see if the problem persists as I expect it's calling reset() from setData() that causes the error (it's possible that the proxies get confused). Why do you want to reset the model here anyway?
Bookmarks