1

we've been using RocksDB for years, building from source on Windows through Visual Studio and stuff.

Today, I felt lazy and thought to myself, hey, there's VCPKG right..haven't updated RocksDB for like a year or so..

After getting my VCPKG to work with Visual Studio 2022 which was sort of an unexpected pain in the ass, building RocksDB was a walk in the park (of course).

I was handed with debug and release builds almost right away. Great right?

So I deleted all the internal RocksDB-related headers, copied over the VCPKG-baked static lib and... crash. Tried both debug and release mode. Here's the call stack:

> Rocksdb::Comparator::timestamp_size() Line 110    C++
rocksdb::InternalKeyComparator::InternalKeyComparator(const rocksdb::Comparator * c, bool named) Line 242   C++
rocksdb::ImmutableCFOptions::ImmutableCFOptions(const rocksdb::ColumnFamilyOptions & cf_options) Line 835   C++
rocksdb::ImmutableCFOptions::ImmutableCFOptions() Line 829  C++
rocksdb::`dynamic initializer for 'dummy_cf_options''() Line 43 C++

It crashed at the library loading stage, control is not even passed to my main() yet.

It basically calls InternalKeyOperator on NULLPTR

right over here

  explicit InternalKeyComparator(const Comparator* c, bool named = true)
  : Comparator(c->timestamp_size()), user_comparator_(c) {
if (named) {
  name_ = "rocksdb.InternalKeyComparator:" +
          std::string(user_comparator_.Name());
}

}

above 'c' is nullptr.

Ideas?

Vega4
  • 969
  • 1
  • 11
  • 25

0 Answers0