I first query musicbrainz to get a list of matching results, and then I spawn a number of simple_thread_task's, one for each result which does the individual queries. Every one of these threads is spawned from a threaded_process_callback which gets a abort_callback& from foobar and passes it down to all the simple_thread_tasks.
Occasionally, when a user aborts a search I will get access_violations (which crash) attempting to do anything with the abort_callback (i.e. abort->is_aborting()). Unfortunately, all VS2019 will tell me is that abort_callback comes from foobar.exe and provides no useful information, so I can't tell if the ptr is now garbage, or if some value inside the object has been corrupted.
It's real intermittent so sometimes I can abort 20 times in a row and they all exit gracefully, and then other times, the first abort causes it to happen.
I'm encountering this using 1.6.5 and SDK 2021-02-23. Users have reported it in 1.6.6b7 as well.
There is certainly a chance that I'm doing something wrong, but it feels like this is an issue with foobar. @Peter, if this is something you think is worth investigating, you can get the latest beta here with the corresponding pdb.