ankane / or-tools-ruby

Operations research tools for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libc++abi: terminating due to uncaught exception of type std::bad_any_cast: bad any cast

btc opened this issue · comments

libc++abi: terminating due to uncaught exception of type std::bad_any_cast: bad any cast

I see this error on occasion. e.g. here

I'm wondering if you have an idea of what causes it? It's not a big deal, as a retry usually addresses the issue. Yet, I'm curious.

Thanks again for creating this wrapper. We are making good use of it.

Hi @btc, it means there's an issue with the bindings, but haven't been able to narrow it down. What OS and full version of Ruby are you on?

@ankane

macOS Sonoma 14.4.1
Ruby 3.3.0

GIT
  remote: https://github.com/ankane/or-tools-ruby.git
  revision: 0376b08b58c38118704c96b85d3e47a8faf94129
  ref: 0376b08b58c38118704c96b85d3e47a8faf94129
  specs:
    or-tools (0.11.1)
      rice (>= 4.3)

I'm happy to collect more diagnostic information when I encounter this type of crash again.

Thanks. The thread backtrace from Crash Reports would be most helpful.

I've run into this error as well, so far only in specs running in our CI, but I was able to recreate it, and capture and log the core dump using logbt.

Gem info:

GEM
  remote: https://rubygems.org/
  specs:
    or-tools (0.11.1)
      rice (>= 4.1)

The code was running in a Docker container from an image based on the ruby:3.2-bullseye image (as far as I can tell, we don't do anything with the C++ version or compiler, so whatever is the default for Debian bullseye should apply). I've attached the output from logbt below. Let me know if you prefer a different format (with explicit instructions for how to generate it, because C++ is well beyond my ken) or need a reproducible example to tinker with.

or-tools-core-dump.txt