0

I am getting crashes related to boost/asio for my dynamic library, within ableton.

I heard it might be due to clashing boost versions - so I switched to statically linking boost, and I'm still getting crashes

My audio plugin works fine in all DAWs, but Ableton.

Boost 1.81.0 used in plugin Ableton Live 11.2.7 Mac OS 12.6.2 Monterey

EXC_BAD_ACCESS (code=1, address=0x10c) at boost::asio::detail::scheduler::concurrency_hint

int concurrency_hint() const
{
  return concurrency_hint_;
}

I've created a whole reproducible example of the problem. Once installing this plugin, if opened in ableton, on mac OS, a crash occurs.

https://github.com/tobq/ableton-crash

Tobiq
  • 2,489
  • 19
  • 38
  • this symptom means `this` was null i.e. the function was called like `null_pointer->concurrency_hint()` – user253751 Feb 07 '23 at 16:23
  • 1
    What you really need is a stack trace so you can see how you got to the crash location. Have you tried to get that? Or even better debug the crash while it is happening. – john Feb 07 '23 at 16:27
  • Even if you link statically there can be symbol clash. Make sure you only export the symbols you need. If you build your plugin using CMake, you can create an exports header with [GenerateExportHeader](https://cmake.org/cmake/help/latest/module/GenerateExportHeader.html), then define the visibility of all symbols to be hidden and finally mark your types as exported `class MyPlugin PLUGIN_API { ... };` Check out [Craig Scott's presentation](https://youtu.be/m0DwB4OvDXk?t=157) where it explains what the CMake function is doing and why this is useful. (Basically you want to hide boost symbols) – Jorge Bellon Apr 05 '23 at 18:48

0 Answers0