During animation playback, data-blocks are reallocated, so storing
pointers to the resulting data is not okay. Instead, the data should
be retrieved from the context. This works when the applied search
item is the "dummy" item added for non-matches. However, it still
crashes for every other item, because the memory is owned by the
modifier value log, which has been freed by the time the exec function
runs.
I think the solution to that second problem is to allow uiSearchItems
to own memory for every search item, or to adjust the exec callback
so it just gets the UI string, not a pointer to the item. Ideally the
search wouldn't get any pointers at all, I suppose. That seems like
a bigger change though, so I'd like to get feedback on this first.